mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 14:25:11 +03:00
Revert "Remove -nostartfiles linker option from bootloader (#5996)"
This reverts commit 17b4aa2466
.
Removing the -nostartfiles caused the Taranis bootloader to include
a number of strange functions. Instead define _fini to avoid the linker
issues.
This commit is contained in:
parent
9cbd0b9813
commit
429d55769c
3 changed files with 16 additions and 2 deletions
|
@ -73,6 +73,7 @@ set(BOOTLOADER_SRC
|
|||
../usb_bsp.c
|
||||
../usb_driver.cpp
|
||||
../flash_driver.cpp
|
||||
init.c
|
||||
boot.cpp
|
||||
bin_files.cpp
|
||||
)
|
||||
|
@ -111,7 +112,7 @@ remove_definitions(-DCLI)
|
|||
remove_definitions(-DUSB_SERIAL)
|
||||
add_definitions(-DBOOT)
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-mcpu=${MCU} -mthumb -lm -T${RADIO_SRC_DIRECTORY}/targets/${TARGET_DIR}/stm32_ramboot.ld -Wl,-Map=bootloader.map,--cref,--no-warn-mismatch,--gc-sections")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-mcpu=${MCU} -mthumb -nostartfiles -lm -T${RADIO_SRC_DIRECTORY}/targets/${TARGET_DIR}/stm32_ramboot.ld -Wl,-Map=bootloader.map,--cref,--no-warn-mismatch,--gc-sections")
|
||||
|
||||
add_executable(bootloader ${BOOTLOADER_SRC})
|
||||
add_dependencies(bootloader ${BITMAPS_TARGET} firmware_translations)
|
||||
|
|
|
@ -527,3 +527,7 @@ int main()
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
void *__dso_handle = 0;
|
||||
#endif
|
||||
|
|
9
radio/src/targets/common/arm/stm32/bootloader/init.c
Normal file
9
radio/src/targets/common/arm/stm32/bootloader/init.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
void _init (void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void _fini(void)
|
||||
{
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue