Part Number: MSP432P401R
Tool/software: Linux
I am using "openocd" as my GDB server.
Using telnet, I have successfully flashed a *.out file to the Launchpad that was previously built with Code Composer.
I can also step through (but not flash) the same file/program if I use the GDB client.
So I have some confidence I have a basic procedure that will work for me.
I am trying to get down to the least possible code & files as a starter.
My question is what I am missing from (below) that prevents me from flashing the resulting *.elf file generated.
this is my linker.script.ld file:
_estack = 0x20010000;
MEMORY
{
FLASH ( rx ) : ORIGIN = 0x08000000, LENGTH = 256K
RAM ( rxw ) : ORIGIN = 0x20000000, LENGTH = 64K
}
and this is my core.S source:
.syntax unified .cpu cortex-m4 .fpu vfpv4 .thumb .global vtable .global reset_handler
.type vtable, %object vtable: .word _estack .word reset_handler .size vtable, .-vtable .equ somevar, 5 .type reset_handler, %function reset_handler: LDR R0, =_estack MOV SP, R0 LDR R0,=somevar main_loop: B main_loop .size reset_handler, .-reset_handler
These are the build steps:
arm-none-eabi-gcc -x assembler -c -O0 -mcpu=cortex-m4 -mthumb -Wall -g core.S -o core.o
arm-none-eabi-gcc core.o -g -mcpu=cortex-m4 -mthumb -Wall --specs=nosys.specs -nostdlib -lgcc -T./linker.script.ld -o main.elf
The above works (with minor size changes of course) for an STM32 device.
Looking through existing projects is a lot of information... not exactly helpful.