We write our simplest program for ARM Cortex-M3

 
We write our simplest program for ARM Cortex-M3 Good afternoon! Today I want to tell you how to write a minimal program that will run on ARM Cortex-M3 and at the same time print "Hello, World!". We will try to disassemble by steps the necessary minimum, which we need for this. We will start on the QEMU emulator. Therefore, anyone can reproduce, even if he does not have the glands at hand.
 
 
So, let's go!
 
here ). Next, we need to write the main logic of our program, the start code that will give control to the program, and the linker script.
 
 
On the habr already enough not bad articles about how to blink a diode on a piece of iron from scratch. Therefore, here I will not delve into what and how it works, but I will give only a minimal set of necessary knowledge necessary for the start.
 
 
Our hello world in the file test.c:
 
 
static volatile unsigned int * const UART_DR = (unsigned int *) 0x4000c000;
static void uart_print (const char * s) {
while (* s! = '
+ 0 -

Add comment