Skip to content

Commit 15ac9af

Browse files
quytranpzzjhedberg
authored andcommitted
soc: renesas: rx: Update linker for using code flash
- RDP flash driver type1 requires copy code from ROM to RAM to program/erase on code flash region Signed-off-by: Quy Tran <[email protected]>
1 parent 3e20f6e commit 15ac9af

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

include/zephyr/arch/rx/linker.ld

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ SECTIONS
156156
*(.jcr)
157157
} GROUP_LINK_IN(ROMABLE_REGION)
158158

159+
#if DT_PROP(DT_NODELABEL(code_flash), programming_enable)
160+
SECTION_PROLOGUE(.pfram,ALIGN(4),)
161+
{
162+
_PFRAM_start = .;
163+
. += _RPFRAM_end - _RPFRAM_start;
164+
_PFRAM_end = .;
165+
} > ROMABLE_REGION
166+
#endif
167+
159168
/* TODO: is this section necessary? There is a similar section
160169
* (_CTOR_SECTION_NAME) in common-rom.ld. This seems to be for
161170
* C++ Constructors/Destructors? */
@@ -235,6 +244,18 @@ SECTIONS
235244

236245
__data_region_end = .;
237246

247+
#if DT_PROP(DT_NODELABEL(code_flash), programming_enable)
248+
249+
.rpfram ALIGN(4): AT(_PFRAM_start)
250+
{
251+
_RPFRAM_start = .;
252+
*(PFRAM)
253+
. = ALIGN(4);
254+
_RPFRAM_end = .;
255+
} > RAMABLE_REGION
256+
257+
#endif
258+
238259
SECTION_PROLOGUE(_BSS_SECTION_NAME,,)
239260
{
240261
_bss = .;

0 commit comments

Comments
 (0)