cmake: app mem partion flexibility

This commit allows a more dynamic approach for specifying that a zephyr
library must be placed in a dedicated app memomory partition.
This is still done by defining the partition in code using
K_APPMEM_PARTITION_DEFINE, but now the zephyr library can be added to
the generation of partition table using zephyr_library_app_memory
instead of modifying the overall zephyr/CMakeLists.txt file.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2019-11-04 14:30:24 +01:00 committed by Andrew Boie
commit 1f9723af19
4 changed files with 31 additions and 2 deletions

View file

@ -284,8 +284,13 @@ top-level ``CMakeLists.txt`` adds the following:
gen_app_partitions.py ... --library libc.a z_libc_partition ..
There is no support for expressing this in the project-level configuration
or build files; the toplevel ``CMakeLists.txt`` must be edited.
For pre-compiled libraries there is no support for expressing this in the
project-level configuration or build files; the toplevel ``CMakeLists.txt`` must
be edited.
For Zephyr libraries created using ``zephyr_library`` or ``zephyr_library_named``
the ``zephyr_library_app_memory`` function can be used to specify the memory
partition where all globals in the library should be placed.
Pre-defined Memory Partitions
-----------------------------