Skip to content

Commit e95b032

Browse files
masayuki2009davids5
authored andcommitted
boards: imxrt1060-evk: Fix knsh and related linker script files
Summary: - Fix knsh/defconfig to work with pyOCD - Fix kernel-space.ld to boot - Fix memory.ld for CONFIG_BUILD_PROTECTED=y Impact: - CONFIB_BUILD_PROTECTED=y only Testing: - Tested with imxrt1060-evk Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
1 parent 777c6c4 commit e95b032

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

boards/arm/imxrt/imxrt1060-evk/configs/knsh/defconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ CONFIG_ARCH_CHIP_MIMXRT1062DVL6A=y
1515
CONFIG_ARCH_STACKDUMP=y
1616
CONFIG_ARMV7M_DCACHE=y
1717
CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y
18+
CONFIG_ARMV7M_DTCM=y
1819
CONFIG_ARMV7M_ICACHE=y
20+
CONFIG_ARMV7M_ITCM=y
1921
CONFIG_ARMV7M_USEBASEPRI=y
2022
CONFIG_ARM_MPU=y
2123
CONFIG_BOARD_LOOPSPERMSEC=104926

boards/arm/imxrt/imxrt1060-evk/scripts/kernel-space.ld

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,31 @@
2424

2525
OUTPUT_ARCH(arm)
2626
EXTERN(_vectors)
27+
EXTERN(g_flash_config)
28+
EXTERN(g_image_vector_table)
29+
EXTERN(g_boot_data)
30+
2731
ENTRY(_stext)
2832

2933
SECTIONS
3034
{
35+
/* Image Vector Table and Boot Data for booting from external flash */
36+
37+
.boot_hdr : ALIGN(4)
38+
{
39+
FILL(0xff)
40+
__boot_hdr_start__ = ABSOLUTE(.) ;
41+
KEEP(*(.boot_hdr.conf))
42+
. = 0x1000 ;
43+
KEEP(*(.boot_hdr.ivt))
44+
. = 0x1020 ;
45+
KEEP(*(.boot_hdr.boot_data))
46+
. = 0x1030 ;
47+
KEEP(*(.boot_hdr.dcd_data))
48+
__boot_hdr_end__ = ABSOLUTE(.) ;
49+
. = 0x2000 ;
50+
} > kflash
51+
3152
.text :
3253
{
3354
_stext = ABSOLUTE(.);

boards/arm/imxrt/imxrt1060-evk/scripts/memory.ld

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ MEMORY
6161

6262
/* 1MiB of OCRAM */
6363

64-
dtcm (rwx) : ORIGIN = 0x20000000, LENGTH = 512K
65-
kocram (rwx) : ORIGIN = 0x20200000, LENGTH = 512K
66-
uocram (rwx) : ORIGIN = 0x20240000, LENGTH = 512K
64+
itcm (rwx) : ORIGIN = 0x00000000, LENGTH = 128K
65+
dtcm (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
66+
kocram (rwx) : ORIGIN = 0x20200000, LENGTH = 256K
67+
uocram (rwx) : ORIGIN = 0x20240000, LENGTH = 256K
6768
}

0 commit comments

Comments
 (0)