Skip to content

Commit

Permalink
Fixed panda "make recover" undefined reference __aeabi_llsr (#522)
Browse files Browse the repository at this point in the history
In v0.5.8, panda.bin compile optimization flag was changed from O2 to
Os to keep its size below 32768. However, the compiler also optimized
away __aeabi_llsr (long long right shift function). The fix is to
manually link libgcc.a

An alternative fix is to use O1 instead of Os. But that might be less
long term solution.

Resolves: #522
  • Loading branch information
kernyan committed Feb 6, 2019
1 parent 2cee2e0 commit 3dc9fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion panda/board/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ obj/$(PROJ_NAME).bin: obj/$(STARTUP_FILE).o obj/main.$(PROJ_NAME).o


obj/bootstub.$(PROJ_NAME).bin: obj/$(STARTUP_FILE).o obj/bootstub.$(PROJ_NAME).o obj/sha.$(PROJ_NAME).o obj/rsa.$(PROJ_NAME).o
$(CC) $(CFLAGS) -o obj/bootstub.$(PROJ_NAME).elf $^
$(CC) $(CFLAGS) -o obj/bootstub.$(PROJ_NAME).elf $^ -lgcc
$(OBJCOPY) -v -O binary obj/bootstub.$(PROJ_NAME).elf $@

clean:
Expand Down

0 comments on commit 3dc9fb9

Please sign in to comment.