mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 18:47:24 -07:00
Bootloader cleanup (UNTESTED!)
- Clean up bootloader asm - Remove fromflash.c - it's not worth doing in C, do it in ASM - Clean up linker script - Force use of symbol inside bootphase2 (otherwise linker garbage-collects it) - Link bootloader with gcc instead of ld
This commit is contained in:
parent
cc7580be7a
commit
86d3195518
5 changed files with 87 additions and 114 deletions
|
@ -7,7 +7,7 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
|
||||
# DO NOT use thumb mode in the phase 1 bootloader since that generates a section with glue code
|
||||
ARMSRC = fromflash.c
|
||||
ARMSRC =
|
||||
THUMBSRC = usb.c bootrom.c
|
||||
ASMSRC = ram-reset.s flash-reset.s
|
||||
|
||||
|
@ -27,7 +27,7 @@ include ../common/Makefile.common
|
|||
all: $(OBJDIR)/bootrom.s19
|
||||
|
||||
$(OBJDIR)/bootrom.elf: $(VERSIONOBJ) $(ASMOBJ) $(ARMOBJ) $(THUMBOBJ)
|
||||
$(LD) -g -Tldscript-flash --oformat elf32-littlearm -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
|
||||
$(CC) $(LDFLAGS) -Wl,-T,ldscript-flash,-Map,$(patsubst %.elf,%.map,$@) -o $@ $^ $(LIBS)
|
||||
|
||||
clean:
|
||||
$(DELETE) $(OBJDIR)$(PATHSEP)*.o
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue