Re: "dummy-flash" device tree possible bug?
Maureen Helm
Hi Diego, Take a look at the mimxrt1050_evk board. The SoC doesn’t have embedded flash, so I mapped the flash entry to ITCM which is in SRAM. “zephyr,sram” is mapped to DTCM, which is a different region in SRAM.
You can then use a debugger to load code directly into SRAM.
Maureen
From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...]
On Behalf Of Diego Sueiro
Hello Michael,
On 7 February 2018 at 19:27, Michael Hope <michaelh@...> wrote:
You mean setting the same entry for the flash and sram? Something like that?
chosen { zephyr,flash = &ocram; zephyr,sram = &ocram; zephyr,console = &uart2; };
What is the usage and purpose of "dummy-flash"? I belive it can be used when you want to use a debugger to load and execute the code directly in the sram.
Getting the elf header of this 2 different approaches we have:
1) zephyr,flash = zephyr,sram: Memory region Used Size Region Size %age Used FLASH: 16388 B 128 KB 12.50% SRAM: 7332 B 128 KB 5.59% IDT_LIST: 36 B 2 KB 1.76%
Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x0000b4 0x20200000 0x20200000 0x0343a 0x0343a RWE 0x4 LOAD 0x0034f0 0x20200000 0x20200000 0x00000 0x01ba8 RW 0x8 LOAD 0x0034f0 0x2020343c 0x2020343c 0x00acc 0x00acc RW 0x4 LOAD 0x003fbc 0x20201ba8 0x20203f08 0x000fc 0x000fc RW 0x4
Section to Segment mapping: Segment Sections... 00 text bss noinit 01 bss noinit 02 devconfig rodata 03 datas initlevel initshell
2) no zephyr,flash in dts (and with my "fix"): Memory region Used Size Region Size %age Used FLASH: 0 GB 0 GB -nan% SRAM: 23348 B 112 KB 20.36% IDT_LIST: 36 B 2 KB 1.76%
Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000078 0x20200000 0x20200000 0x03e90 0x05a38 RWE 0x8 LOAD 0x003f08 0x20205a38 0x20205a38 0x000fc 0x000fc RW 0x4
Section to Segment mapping: Segment Sections... 00 text devconfig rodata bss noinit 01 datas initlevel initshell
|
|