Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


System workbench not compiling .asm files

I am trying to compile my project that contains some assembly code. Each line of the assembly code has the following

Error: bad instruction

Im guessing b/c the IDE is not placing the correct options to compile the file. How can I compile the .asm files correctly?

France

Hi,

To be “compiled” correctly, assembly files must have extension “.s” or “.S” (the second will run the file through the C Pre-Processor), not “.asm”; I’m not sure how these are processed but, obviously, they are not recognized correctly by the compiler.

Hope this helps,

Bernard (Ac6)


I tried both extensions s and S. Still getting the same issue. It seems its complaining about almost every line. Every comment line that begins with a ; and has comments after it (for example)

Any other suggestions?


France

OK, now I understand.

In the ARM world there is two different syntaxes for ASM code: the ARM (UAL) syntax (used by Keil and IAR) and the GCC syntax.

As your comment start by semicolons, obviously your file use the ARM syntax, while System Workbench fr STM32 uses the GCC syntax.

There is a few differences between both:

  • Comments are introduced by sharp # characters in GCC
  • labels must be followed by a colon : and instructions do not have (but may be) indented
  • Immediate values may be introduced by ‘#’ or ‘$’ characters
  • ...

There is a good quick-reference paper at this addressQuestion; I suggest you look at it to convert your ASM files.

Sorry to not have a quick solution for your problem,

Bernard (Ac6)