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


robmcgurrin@...
 

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.