Simple problem: Started an STM32G051K8U7 microcontroller project using Arm Compiler v6.20.1 in Keil uVision IDE, built a project all good, everything works just fine can debug the program using ST-Link debugger - no problems.And at some point I decided to compile the program with Arm Compiler v5.06 - all good! However, I wanted to revert back to Arm Compiler v6.20.1 and it would not build it anymore. I have no idea what happened, no files actually got changed in my project directory, but there are 247 errors complaining about the startup file.RTE/Device/STM32G051K8Ux/startup_stm32g051xx.s(2): error: unexpected token at start of statement ;* File Name : startup_stm32g051xx.s ^
RTE/Device/STM32G051K8Ux/startup_stm32g051xx.s(2): error: unexpected token at start of statement ;* File Name : startup_stm32g051xx.s ^
Any Idea how I can bypass this issue? It happened to both computers using different MDK Arm versions.
Arm Compiler 6 expects `gas` format assembler by default.
Adding the option "-masm=auto" (select Assumbly Option > Auto select in the Asm options view in the IDE) to your assembler command line should work around this particular error.https://developer.arm.com/documentation/101754/0620/armclang-Reference/armclang-Command-line-Options/-masm
If you wish to re-write source, see the Migration guide below for more detail:https://developer.arm.com/documentation/100068Specifically:https://developer.arm.com/documentation/100068/latest/Migrating-from-armasm-to-the-armclang-Integrated-Assembler
Thanks Ronan, Paying more attention to the file extension of the file from which all warnings are being generated would have been useful.Thanks for your prompt answer.