ARMv7-A Bare Bones: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m Added this article to the ARM page category
Amending code errors
Line 37:
.global _start
_start:
movldr sp, =STACK_TOP
bl start
1:
Line 47:
 
<syntaxhighlight lang="c">
#include <stdint.h>
 
#define UART0_BASE 0x1c090000
void start()
Line 63 ⟶ 65:
* memory map provided in the CoreTile TRM (see below).
*/
. = 0x80010000;
 
/* Make sure our entry stub goes first */
Line 72 ⟶ 74:
.bss : { *(.bss COMMON) }
 
STACK_BASE = .;
. += 0x10000;
STACK_TOP = .;
}
</pre>
Line 84 ⟶ 86:
$ arm-none-eabi-gcc -ffreestanding -Wall -Wextra -Werror -c start.c -o start.o
$ arm-none-eabi-ld -T linker.ld _start.o start.o -o kernel.elf
$ qemu-system-arm -M vexpress-a15 -cpu cortex-a15 -kernel kernel.binelf -nographic
</pre>