The presence of a separate build for the bootloader code has always been a wart with this platform. Sharing of code between the two has required great care. We've had bugs with mismatched include paths, macro definitions and compiler flags, etc... And of course it's not possible for one to see the other; in theory we'd like the ability to call back into IMR code after startup, to use the space for temporary storage, etc... So let's finally do it. This really isn't that complicated when you see it in isolation: + Move the module manifest metadata into an "rimage_modules.c", and put them in their own NOLOAD section where we can grab them later with objcopy. + Make a new "imr" memory region in the main linker and just paste the bootloader linkage (which is now using its own specific sections) in there. + After zephyr.elf is built and cache-remapped, we can extract the imr sections and the appropriate manifest for the bootloader rimage module, and then do the converse by excluding them for the main image module. Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
|---|---|---|
| .. | ||
| completion | ||
| runners | ||
| tests | ||
| zspdx | ||
| boards.py | ||
| build_helpers.py | ||
| build.py | ||
| completion.py | ||
| debug.py | ||
| export.py | ||
| flash.py | ||
| mypy.ini | ||
| README.txt | ||
| run_common.py | ||
| run_tests.py | ||
| sign.py | ||
| spdx.py | ||
| zcmake.py | ||
| zephyr_ext_common.py | ||
This directory contains implementations for west commands which are tightly coupled to the zephyr tree. This includes the build, flash, and debug commands. Before adding more here, consider whether you might want to put new extensions in upstream west. For example, any commands which operate on the multi-repo need to be in upstream west, not here. Try to limit what goes in here to Zephyr-specific features. When extending this code, please keep the unit tests (in tests/) up to date. The mypy static type checker is also run on the runners package. To run these tests locally on Windows, run: py -3 run_tests.py On macOS and Linux: ./run_tests.py Note that these tests are run as part of Zephyr's CI when submitting an upstream pull request, and pull requests which break the tests cannot be merged. Thanks!