zephyr/scripts
Daniel Leung 212ec9a29a linker: sort app shared mem partition by alignment
If CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT is enabled,
the app shared memory partition may cause waste of memory
due to the need for padding.

For example, tests/subsys/jwt and board mps2_an385:

  z_test_mem_partition: addr 0x20000000, size 52
  z_libc_partition    : addr 0x20000040, size 4
  k_mbedtls_partition : addr 0x20008000, size 32736

    ending at 0x2000ffff, taking up 65536 bytes

With power-of-two size and alignment requirement,
k_mbedtls_partition takes up 32KB memory and needs to be
aligned on 32KB boundary. If the above partitions are
ordered as shown, there needs to be a lot of padding
after z_libc_partition before k_mbedtls_partition can
start. In order to minimize padding, these partitions
need to be sort by size in descending order.

After the changes here,	the partitions are:

  k_mbedtls_partition : addr 0x20000000, size 32736
  z_test_mem_partition: addr 0x20008000, size 52
  z_libc_partition    : addr 0x20008040, size 4

    ending at 0x2000805f, taking up 32864 bytes

With the above example, sorting results in a saving
of 32672 bytes of saving.

Fixes #14121

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-03-13 18:26:51 +01:00
..
checkpatch
ci ci: add option to specify custom range 2019-03-04 14:08:12 -05:00
coccinelle coccinelle: Updating ignore_return to support memcpy 2018-12-19 14:37:25 +01:00
cross_compiler
dts extract_dts_includes.py: deterministic flash table with Python < 3.6 2019-03-06 20:58:58 -05:00
footprint scripts: size_report: Fix output of header break line 2019-02-28 09:23:16 -08:00
gitlint scripts: gitlint: Consistent case for Signed-off-by 2019-02-19 12:12:42 -05:00
kconfig kconfig: Have ninja Re-run CMake when Kconfig sources change 2019-03-07 10:40:00 +01:00
sanity_chk sanitycheck: Handle data over UART from gcov 2019-01-29 15:03:38 -05:00
support
west_commands west_commands: pyocd: Sector erase by default 2019-03-12 16:52:14 +01:00
.gitignore
check_link_map.py
checkpatch.pl userspace: remove APPLICATION_MEMORY feature 2019-02-08 07:04:30 -05:00
checkstack.pl
coccicheck scripts: coccicheck: Add support for SPFLAGS 2019-02-07 08:12:20 -05:00
dir_is_writeable.py
elf_helper.py gen_kobject_list.py: OrderedDict for < 3.6 determinism 2019-03-06 20:58:58 -05:00
file2hex.py
filter-known-issues.py filter-known-issues.py: clarify what "new" means 2019-02-28 18:18:30 +01:00
gen_app_partitions.py linker: sort app shared mem partition by alignment 2019-03-13 18:26:51 +01:00
gen_cfb_font_header.py subsys: fb: add support for generating CFB font headers at build time 2018-11-28 11:46:00 +01:00
gen_gcov_files.py scripts: gen_gcov_files: report if data capture is not complete 2019-01-29 15:03:38 -05:00
gen_kobject_list.py userspace: add additional script documentation 2019-03-12 08:37:58 +01:00
gen_offset_header.py
gen_priv_stacks.py userspace: add additional script documentation 2019-03-12 08:37:58 +01:00
gen_relocate_app.py scripts: gen_relocate_app: Use linker provided size variable. 2018-12-29 09:23:34 -05:00
gen_syscall_header.py userspace: add additional script documentation 2019-03-12 08:37:58 +01:00
gen_syscalls.py userspace: add additional script documentation 2019-03-12 08:37:58 +01:00
mergehex.py mergehex: Improve the error feedback when merged hex files overlap 2019-01-29 17:04:42 +01:00
parse_syscalls.py userspace: add additional script documentation 2019-03-12 08:37:58 +01:00
process_gperf.py userspace: eliminate warning in process_gperf.py 2018-12-07 20:26:46 -05:00
qemu-machine-hack.py
requirements.txt scripts: Update pyocd version to 0.16.1 2019-02-18 22:34:25 -05:00
sanitycheck sanitycheck: make --subtest and --test mutually exclusive 2019-03-13 01:44:52 +01:00
series-push-hook.sh scripts: fix path issue in push-hook script 2019-03-13 11:59:38 -05:00
spelling.txt
subfolder_list.py scripts/*syscalls.py: sort os.walk() for a more deterministic build 2019-02-17 07:32:05 -05:00
tags.sh
valgrind.supp valgrind: Add error supression file for POSIX arch 2018-12-21 21:07:18 +01:00
waitpid
west-commands.yml scripts: west_commands: add sign command 2019-02-07 08:44:19 -05:00
yaml_to_cmake.py CMake/Kconfig: CMake and Kconfig build integration 2019-02-08 22:47:02 -05:00