Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
74 stars 56 forks source link

With generator, csolution does not want to convert when using / instead of \ #336

Closed fred-r closed 2 years ago

fred-r commented 2 years ago
> tree
.
|-- RTE
|   |                               `-- Device
|   |                               `-- STM32U585ZITx
|   |       |                       `-- STM32U585xx_FLASH.ld
|   |       |                       `-- STM32U585xx_FLASH.ld@0.0.1
|   |       |                       `-- stm32_external_env.h
|   |       |                       `-- stm32_external_env.h@0.0.1
|   |       |                       `-- stm32u585xx_flash.icf
|   |       |                       `-- stm32u585xx_flash.icf@0.0.1
|   |       |                       `-- stm32u585xx_flash.sct
|   |       |                       `-- stm32u585xx_flash.sct@0.0.1
|   |       |                       `-- system_stm32u5xx.c
|   |                               `-- system_stm32u5xx.c@0.0.1
|   |-- _gpio-toggle.AC6_B-U585I-IOT02A
|   |   `-- RTE_Components.h
|   `-- _gpio-toggle.GCC_B-U585I-IOT02A
|       `-- RTE_Components.h
|-- gpio-toggle.cproject.yml
`-- gpio-toggle.csolution.yml

5 directories, 14 files

> csolution.exe -s gpio-toggle.csolution.yml convert

>

==> here nothing happens, though initially csolution as generating the cprj and reporting a missing gpdsc. As I know a gpdsc is missing (from previous execution), I run the generator:

> csolution.exe run -g STM32Cube_BasicTrace_CodeGen -c gpio-toggle.AC6+B-U585I-IOT02A -p gpio-toggle.cproject.yml -s gpio-toggle.csolution.yml
info csolution: generator 'STM32Cube_BasicTrace_CodeGen' reported:
...

> tree
.
|-- RTE
|   |                               `-- Device
|   |                               `-- STM32U585ZITx
|   |       |                       `-- STM32U585xx_FLASH.ld
|   |       |                       `-- STM32U585xx_FLASH.ld@0.0.1
|   |       |                       `-- stm32_external_env.h
|   |       |                       `-- stm32_external_env.h@0.0.1
|   |       |                       `-- stm32u585xx_flash.icf
|   |       |                       `-- stm32u585xx_flash.icf@0.0.1
|   |       |                       `-- stm32u585xx_flash.sct
|   |       |                       `-- stm32u585xx_flash.sct@0.0.1
|   |       |                       `-- system_stm32u5xx.c
|   |                               `-- system_stm32u5xx.c@0.0.1
|   |-- _gpio-toggle.AC6_B-U585I-IOT02A
|   |   `-- RTE_Components.h
|   `-- _gpio-toggle.GCC_B-U585I-IOT02A
|       `-- RTE_Components.h
|-- STM32_basic_trace.gpdsc
|-- gendata.json
|-- gpio-toggle.AC6+B-U585I-IOT02A.cprj
|-- gpio-toggle.AC6+B-U585I-IOT02A.generate.yml
|-- gpio-toggle.GCC+B-U585I-IOT02A.cprj
|-- gpio-toggle.IAR+B-U585I-IOT02A.cprj
|-- gpio-toggle.cproject.yml
`-- gpio-toggle.csolution.yml

5 directories, 20 files

==> this is a success.

And now, I can run the convert:

> csolution.exe -s gpio-toggle.csolution.yml convert
.../gpio-toggle.AC6+B-U585I-IOT02A.cprj - info csolution: file generated successfully
.../gpio-toggle.GCC+B-U585I-IOT02A.cprj - info csolution: file generated successfully
.../gpio-toggle.IAR+B-U585I-IOT02A.cprj - info csolution: file generated successfully

Initially, the convert was working fine. Log from yesterday:

> csolution.exe -s gpio-toggle.csolution.yml convert
...\STM32_basic_trace.gpdsc - warning csolution: generator 'STM32Cube_BasicTrace_CodeGen' from compoace&Configurable@0.0.1': reading gpdsc failed
...\STM32_basic_trace.gpdsc - warning csolution: generator 'STM32Cube_BasicTrace_CodeGen' from compoace&Configurable@0.0.1': reading gpdsc failed
...\STM32_basic_trace.gpdsc - warning csolution: generator 'STM32Cube_BasicTrace_CodeGen' from compoace&Configurable@0.0.1': reading gpdsc failed
.../gpio-toggle.AC6+B-U585I-IOT02A.cprj - info csolution: file generated successfully
.../gpio-toggle.GCC+B-U585I-IOT02A.cprj - info csolution: file generated successfully
.../gpio-toggle.IAR+B-U585I-IOT02A.cprj - info csolution: file generated successfully

The only thing I changes is the way to declare my generator:

Working fine:

      <gpdsc name="$P\STM32_basic_trace.gpdsc"/>
    </generator>

Causing the issue:

      <gpdsc name="$P/STM32_basic_trace.gpdsc"/>
    </generator>

But \ character is not Linux compliant so I'd like to use the / character.

jkrech commented 2 years ago

@fred-r, I assume you run the latest released version of the tools on windows, right?

fred-r commented 2 years ago
> csolution.exe --help
CMSIS Project Manager 0.9.5 (C) 2022 ARM

Triggered on a Windows 10 machine with MinGW terminal.

jeromecoutant commented 2 years ago

Hi I made a patch before linux build: sed -i 's/$P\\//' xxx.pdsc

I would prefer to avoid it :-) thx

jkrech commented 2 years ago

@fred-r can you please confirm that version 0.9.6 of csolution works correctly with gpdsc file path specified using / ?

ReinhardKeil commented 2 years ago

Is this solved by now?

fred-r commented 2 years ago

Both / and \ are working fine with: CMSIS Project Manager 1.1.0 (C) 2022 ARM