Hello,
Cross-compiling bootloader (at least for n0110) with gcc 15 leads to an error with the linker :
/usr/lib/gcc/arm-none-eabi/15.2.0/../../../../arm-none-eabi/bin/ld: output/release/device/n0110/bootloader/jump_to_firmware.o(jump_to_firmware): Unknown destination type (ARM/Thumb) in /tmp/ccarcTNa.ltrans0.ltrans.o
/tmp/ccarcTNa.ltrans0.ltrans.o: in function `Bootloader::UpsilonRecoveryMenu::postOpen()':
/home/thomas/Projets/numworks/bootloader/bootloader/interface/menus/upsilon_recovery.cpp:44:(.text._ZN10Bootloader19UpsilonRecoveryMenu8postOpenEv+0x27e): dangerous relocation: unsupported relocation
/usr/lib/gcc/arm-none-eabi/15.2.0/../../../../arm-none-eabi/bin/ld: output/release/device/n0110/bootloader/jump_to_firmware.o(jump_to_firmware): Unknown destination type (ARM/Thumb) in /tmp/ccarcTNa.ltrans0.ltrans.o
/tmp/ccarcTNa.ltrans0.ltrans.o: in function `Bootloader::Slot::boot() const':
/home/thomas/Projets/numworks/bootloader/bootloader/slots/slot.cpp:80:(.text._ZNK10Bootloader4Slot4bootEv+0xfc): dangerous relocation: unsupported relocation
This can be reproduced by making the bootloader :
make MODEL=n0110 bootloader -j
I asked an LLM chatbot and it answers me that the jump_to_firmware label in bootloader/jump_to_firmware.s (first linker error) must be specified as a function, proposing to add the following (lines 7 and 11) :
.syntax unified
.section .text.jump_to_firmware
.align 2
.thumb
.global jump_to_firmware
.type jump_to_firmware, %function
jump_to_firmware:
msr msp, r0
bx r1
.size jump_to_firmware, .-jump_to_firmware
This change allows GCC to compile. If an ARM assembly developer can review it, I think it could be interesting to add this change to follow the last GCC versions.
Hello,
Cross-compiling bootloader (at least for n0110) with gcc 15 leads to an error with the linker :
This can be reproduced by making the bootloader :
make MODEL=n0110 bootloader -jI asked an LLM chatbot and it answers me that the jump_to_firmware label in bootloader/jump_to_firmware.s (first linker error) must be specified as a function, proposing to add the following (lines 7 and 11) :
This change allows GCC to compile. If an ARM assembly developer can review it, I think it could be interesting to add this change to follow the last GCC versions.