MKD-Toolbox Toolchain Issue when using legacy compiler for armasm

MKD-Toolbox Toolchain Issue when using legacy compiler for armasm

Hello Folks!

I am not sure if i am right here in this forum but, I stepped over an issue with the MDK-Toolbox adding an option not recognized by the armclang compiler.

It is used in a GitLab CI Pipeline for automating
- Conversion (from µvision, uvprojx => csolution)
- Compiling and Linking
- Testing
- Merge

Specs:
- Ubuntu Docker Image
- VCPKG
    - MDK-Toolbox        1.1.0
    - CMake                3.31.5
    - Ninja                1.12.0
    - armclang            6.23.0
    - CMSIS-Toolbox        2.8.0

Commands used:
- uv2csolution $UVPROJX_FILE
- cbuild $CSOLUTION_FILE --packs --update-rte --verbose
    
Occured Error:
FAILED: CMakeFiles/Group_Application_MDK-ARM.dir/ProjectX/MDK-ARM/startup_stm32l452xx.o
/root/.vcpkg/downloads/artifacts/2139c4c6/compilers.arm.armclang/6.23.0/bin/armclang -DSTM32L452xx -D_RTE_ -D__MICROLIB -I/ProjectX/MDK-ARM/RTE/_ProjectX -I/root/.cache/arm/packs/ARM/CMSIS/6.1.0/CMSIS/Core/Include -I/root/.cache/arm/packs/LVGL/lvgl/9.3.0-dev2 -I/root/.cache/arm/packs/LVGL/lvgl/9.3.0-dev2/src/core -mcpu=Cortex-M4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard --target=arm-arm-none-eabi -c -mlittle-endian -masm=auto -g -O1 -masm=auto "-x assembler" -c -o CMakeFiles/Group_Application_MDK-ARM.dir/ProjectX/MDK-ARM/startup_stm32l452xx.o /ProjectX/MDK-ARM/startup_stm32l452xx.S
armclang: error: language not recognized: ' assembler'

Please note the space "' a" between "'" and "a".

Workaround:
After many test, I figured out, the uv2csolution conversion creates a ProjectX.cproject.yml with the line "- -x assembler".
Therefore i removed this line with "sed", so the "cbuild" command does not run in an issue any more.
Now the the cbuild compiles and links the project successful.

The section created by uv2csolution looks like:

"
groups:
    - group: Application/MDK-ARM
      files:
        - file: startup_stm32l452xx.s
          misc:
            - ASM:
                - -masm=auto
                - -x assembler
"

Expected Behavior:
Warning for using legacy compiler like:
"A1950W: The legacy armasm assembler is deprecated. Consider using the armclang integrated assembler instead."

Questions:
Am I right to suspect the conversion to be the main issue causing an obsolet error?
Why are some options redundant like "-c"?
Why is the option "-masm=" set twice with different values?
Since there are many arm chips out using an assembler startup script based on armasm, is there a conversion tool to gnuasm for those armasm?
How can I compile the armasm based file seperately and link it later?

0