ARM-software / vscode-cmsis-csolution

Extension support for VS Code CMSIS Project Extension
https://marketplace.visualstudio.com/items?itemName=Arm.cmsis-csolution
Other
23 stars 5 forks source link

Certain define types don't work well when building assembler files #16

Closed Overlap0190 closed 1 year ago

Overlap0190 commented 1 year ago

Type: Bug Report

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Clone this repository https://github.com/RobertRostohar/Demo_EW/
  2. Open the Blinky folder in VS Code
  3. Open the Blinky.csolution.yml file for editing
  4. Add following defines section to the Debug build type.
    defines:
    - DEBUG
    - INIT_COUNT=2
    - CONFIG_FILE=config/config.h

    The build-types section should look like this:

    build-types:
    - type: Debug
      compiler: AC6
      defines:
        - DEBUG
        - INIT_COUNT=2
        - CONFIG_FILE=config/config.h
      misc:
      ...
    - type: Release
      ...
  5. Build the project with Target Type B-U585I-IOT02A and Build Type Debug
  6. The build should fail with this assembler file:
    \<path-to-repo\>/Blinky/Board/B-U585I-IOT02A/RTE/Device/STM32U585AIIx/startup_stm32u585xx.s

and print the following error message:

"<command line>", line 6 (column 18): Error: A1516E: Bad symbol 'config', not defined or external
    6 00000000 CONFIG_FILE SETS config/config.h

Expected behavior The build should not fail with assembler files and this kind of string like defines. When I edited the command line build of the mentioned assembler file:

\<path-to-repo\>/Blinky/Board/B-U585I-IOT02A/RTE/Device/STM32U585AIIx/startup_stm32u585xx.s

like this:

-Wa,armasm,--pd,"CONFIG_FILE SETS \"config/config.h\""

I was able to successfully build the whole project but I'm not sure if that would be the correct approach.

mcgordonite commented 1 year ago

This repository just covers the VS Code extension for csolution. For issues with the build tools or csolution format itself, please create an issue on https://github.com/Open-CMSIS-Pack/devtools/.