-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Parameterize flash storage layout for atmel-samd and nrf #2371
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
Conversation
tannewt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor things. Overall this looks like an awesome improvement! Thanks!
|
@tannewt ok, ready for re-review |
tannewt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, looks good! Lets make sure and warn folks to back up their files on non-Express boards with the next release.
Use preprocessor macros to define the size and position of flash regions. This reduces all the different linker
.ldfiles to a single template file,boards/common.template.ld.The needed preprocessor values are made available in
ports/*/ld_defines.c. . At build time, that file is run through the C preprocessor, generatingld_defines.pp. Thentools/gen_ld_files.pyreadsld_defines.pp,common.template.ld, and generatescommon.ldin the board build directory.(There is provision for more than one template file, but so far, we only need one).
I also did a lot of cleanup and refactoring of the
mpconfigboard.mkfiles, moving a number of definitions to common places.This is working for
atmel-samdandnrf.stm32f4andcxd56remain to be done.Testing: I built and tested various
atmel-samdboards, and they seem to work. I built somenrfboards, and tested the CPB builds with the central/peripheral demo.pca10059 doesn't work properly, but it didn't work before either (see #2339). We can debug that separately.
This is preparatory to storing bonding information on nrf.