Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chibios_hwdef.py: allow re-use of bootloader from other boards #26178

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

peterbarker
Copy link
Contributor

This should be useful for people wanting to make OEM setups but don't want to re-build (or copy...) the bootloader.

env added HAS_EXTERNAL_FLASH_SECTIONS=0
env added CHIBIOS_BUILD_FLAGS=USE_FATFS=yes CHIBIOS_STARTUP_MK=os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32h7xx.mk CHIBIOS_PLATFORM_MK=os/hal/ports/STM32/STM32H7xx/platform.mk MCU=cortex-m7 ENV_UDEFS=-DCHPRINTF_USE_FLOAT=1
Padded 16 bytes for bootloader.bin to 38816
Embedding file bootloader.bin:/home/pbarker/rc/ardupilot/Tools/bootloaders/CubeOrange_bl.bin
Embedding file defaults.parm:/home/pbarker/rc/ardupilot/build/e0-CubeOrange/processed_defaults.parm
Embedding file hwdef.dat:/home/pbarker/rc/ardupilot/build/e0-CubeOrange/hw.dat

Note it getting the bootloader from CubeOrange, not e0-CubeOrange That's because of this hwdef:

diff --git a/libraries/AP_HAL_ChibiOS/hwdef/e0-CubeOrange/hwdef.dat b/libraries/
AP_HAL_ChibiOS/hwdef/e0-CubeOrange/hwdef.dat
new file mode 100644
index 00000000000..34acb794376
--- /dev/null
+++ b/libraries/AP_HAL_ChibiOS/hwdef/e0-CubeOrange/hwdef.dat
@@ -0,0 +1,3 @@
+include ../CubeOrange/hwdef.dat
+
+USE_BOOTLOADER_FROM_BOARD CubeOrange

image

Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@peterbarker peterbarker merged commit 1862b5d into ArduPilot:master Feb 10, 2024
41 checks passed
@peterbarker peterbarker deleted the pr/use-other-bootloader branch February 12, 2024 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants