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

Allow for a custom application start vector on stm32 boards #212

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

oliver-joos
Copy link
Contributor

@oliver-joos oliver-joos commented May 22, 2022

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.

To set a custom application start vector define in your "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.
Copy link
Member

@hathach hathach left a comment

Choose a reason for hiding this comment

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

look good

@hathach hathach merged commit a2bfccc into adafruit:master Jun 8, 2022
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.

2 participants