We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
armasm --cpu cortex-m3 -o test.o test.sthis however doesn't work I realized i had to replace the "--cpu cortex-m3" with "--device stm32". This makes me wonder if there are different arm tools or variations in different software or if the book was just wrong? Or is this what your supposed to use on linux (I'm using windows)?
Hi everyone,I recently got an Arm cortex m3 microcontroller (stm32f103ret6). I'm interested in programming in assembly only. I received some software with the kit I bought (keil uvision, IAR workbench kickstart and ride7) but i find all of these a little confusing to use.
I have also seen "startup code" on some programs, looking at the code it looks like it sets up the interrupt vector table and stack. is this absolutely necessary or can you get away with omitting this code and just setup the vectors you will be using? If someone can elaborate on this.
Hi, First of all, one thing here is Cortex M3 has been designed to be programmed almost entirely in C. There is no asm wrappers or startup code required. So my best advice would be to try using C, coz thats what it has been designed for ! However, you could easily make it run you assembly language program, provided you give it the proper startup values. Unlike most other processors, M3 doesn't start executing from location 0. It expects the initial value of Stack Pointer at location 0x00000000, and the starting address of your program at location 0x00000004. If you place these properly, there shouldnt be any trouble running you r code..
The assembly examples in the book are written using RealView Development Suite (RVDS). The command line options for KEIL ARM-MDK (Microcontroller Development Kit) are slightly different. KEIL ARM ARM-MDK is target at microcontroller devices, while RVDS is targetted at supporting the general ARM architecture.If you want to learn assembly programming with KEIL ARM-MDK, the easiest way to to use the uVision IDE to create a new project. The Cortex-M3 book has already got examples of creating C projects. Creating assembly project is similar, and this will create the correct compiler and linker settings for you.Please notice that the errors in the book is listed onhttp://www.arm.com/miscPDFs/21948.pdfregards,joseph