rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit 2be6540a84ad1d316c47601fe4dfd89df8be53e5
parent 22533963504a2cde90c65e92bdadf99eb0943894
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Wed, 12 Apr 2023 11:08:42 +0900

try to embed boot2

Diffstat:
MMakefile | 1+
Mboot2.s | 2+-
Mmain.c | 7-------
Mmemmap.ld | 7+++----
4 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile @@ -14,6 +14,7 @@ all: led.uf2 clean: rm -f *.o *.elf *.uf2 *.bin + rm -f boot2_crc.s rm -f bincrc bin2uf2 rm -f boot2/*.o rm -f boot2/*.bin diff --git a/boot2.s b/boot2.s @@ -1,7 +1,7 @@ .cpu cortex-m0plus .thumb - .section boot2 + .section .boot2 .global setup_xip .thumb_func setup_xip: diff --git a/main.c b/main.c @@ -1,11 +1,4 @@ -extern void init(void); -extern void led_p2(void); - void main(void) { - init(); - while(1) { - led_p2(); - } } diff --git a/memmap.ld b/memmap.ld @@ -6,11 +6,10 @@ MEMORY SECTIONS { - .boot2 : { + .text : { + . = 0x0; *(.boot2) - } > FLASH - - .text : AT (0x10000100) { + . = 0x100; *(.vectors) *(.text) _etext = .;