Re: Sample app hello_world fails with z_arm_usage_fault in arm_core_mpu_enable when linked in RAM


robmcgurrin@...
 

Hi Maureen,
Thank you for your reply. I will give it a try.  Just to follow up, what if I want to run my code out of SDRAM?
Thanks
Rob


On Mon, Jan 27, 2020 at 4:04 PM Maureen Helm (OSS) <maureen.helm@...> wrote:

Hi Rob,

You can set the following Kconfigs in your prj.conf:

 

CONFIG_CODE_ITCM=y

CONFIG_DATA_DTCM=y

 

See soc/arm/nxp_imx/rt/Kconfig.soc for more details.

 

Maureen

 

From: users@... <users@...> On Behalf Of robmcgurrin via Lists.Zephyrproject.Org
Sent: Friday, January 24, 2020 12:22 PM
To: users@...
Cc: users@...
Subject: [Zephyr-users] Sample app hello_world fails with z_arm_usage_fault in arm_core_mpu_enable when linked in RAM

 

Hi,
I am running on a nxp i.mx RT1064 eval, board mimxrt1064_evk.
I created a custom linker file to link the app to SRAM.  Here are the mods I made to the default linker file include/arch/arm/aarch32/cortex_m/scripts/linker.ld to force everything into SRAM:

#ifdef CONFIG_XIP

  #define ROMABLE_REGION SRAM

  #define RAMABLE_REGION SRAM

#else

  #define ROMABLE_REGION SRAM

  #define RAMABLE_REGION SRAM

#endif

And then I added this to prj.conf

CONFIG_HAVE_CUSTOM_LINKER_SCRIPT=y

CONFIG_CUSTOM_LINKER_SCRIPT="foo_linker.ld"

When I run the app I get this fault:
z_arm_usage_fault () at arch/arm/core/aarch32/fault_s.S:92      

Any suggestions?
Is there a better way to link my app to RAM?

Thanks in advance,
Rob

Join users@lists.zephyrproject.org to automatically receive all group messages.