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

common bootloader implementation #54

Closed
wants to merge 10 commits into from

Conversation

tridge
Copy link
Member

@tridge tridge commented Aug 8, 2024

This is a revival of #48, this time with more testing.
Key features:

  • common bootloader code for all MCUs in bootloader/main.c
  • builds for E230 F031 F051 F415 F421 G071 and L431
  • tested successfully on all MCUs
  • adds some protection in the jump code to prevent invalid jump address or stack pointer

This also includes some Makefile improvements:

  • gets rid of recursive make (faster, QUIET= works, generally good to avoid recursion)
  • fixes dependencies on headers, source etc, so builds if anything changes

I could break up this PR into separate pieces if needed.

UPDATE: @AlkaMotors requested this be in a separate repo:
https://github.com/tridge/AM32-bootloader

@tridge tridge force-pushed the pr-common-bootloader branch 7 times, most recently from 32f13bd to 8624f3a Compare August 10, 2024 23:14
this is a step towards removing the recursive make, and making it
easier to add new MCUs
makes no difference to the binary
all bootloaders built from common source, using blutil.h for MCU
specific functions and macros
generate targets separately, avoiding the need to recursively call
make

This also fixes disabling quiet, like this:

  make FOXEER_F421 QUIET=

also see "Recursive Make Considered Harmful" paper by Peter Miller
support is in e230makefile.mk
changes to headers will now trigger a rebuild
@tridge
Copy link
Member Author

tridge commented Aug 20, 2024

closing for https://github.com/tridge/AM32-bootloader instead

@tridge tridge closed this Aug 20, 2024
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.

1 participant