Allow for a custom application start vector on stm32 boards #212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this PR we can set a custom application start in "board.h":
#define BOARD_FLASH_APP_START 0x08020000
The default start vectors are still 0x08004000 on stm32f3 and 0x08010000 on stm32f4.
Other common start vectors on stm32f4 are 0x08008000 and 0x08020000.
A script or makefile of another project can set the app start like that:
CFLAGS="-DBOARD_FLASH_APP_START=0x08004000" make -C <path-to-tinyuf2> BOARD=... BOARD_DIR= ... all
This works fine, but is not overly obvious. I agree to abandon the idea of a shorter name "APP_START" in my PR #162. But I would prefer to set the app start using
make ... BOARD_FLASH_APP_START=0x08004000 all
. However this requires some changes to tinyuf2 makefiles.