diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2018-08-30 12:50:04 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2018-08-30 12:50:04 +0200 |
commit | e8fdfaef2028dc68c3cb48f5be5c0ab6327fd1bd (patch) | |
tree | e36489cea41ad06037fbda40c9125b618ab071c1 /examples/imx7_colibri_m4/demo_apps/rpmsg/gpio_freertos/armgcc/CMakeLists.txt | |
parent | 1a503cf169b7c46e2f749d85fd0310b8e38fb355 (diff) |
store .data section directly in RAM area
Since the use of a elf binary is anyway required, we can place
sections freely in memory. Therefor it is not necessary to store
the variable initialization section (.data) after the code (.text)
section and copy it in the firmwares startup code. Instead, just
let the elf loader load the .data section directly to its final
place. With that the program header look like this:
Program Header:
LOAD off 0x00001000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x00000240 memsz 0x00000240 flags r--
LOAD off 0x00002000 vaddr 0x1fff8000 paddr 0x1fff8000 align 2**12
filesz 0x00006534 memsz 0x00006534 flags rwx
LOAD off 0x00009000 vaddr 0x20000000 paddr 0x20000000 align 2**12
filesz 0x000001d0 memsz 0x00005dc8 flags rw-
Note the additional program header which loads the .data section
directly to the data region at 0x20000000.
This safes space in the code region and slightly improves the
startup time since the copy loop is not required.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'examples/imx7_colibri_m4/demo_apps/rpmsg/gpio_freertos/armgcc/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions