Re: Use different memory bank
Antoine Zen-Ruffinen
Thanks Arvid!
You solution worked! Thanks! But I had to modify it to work with my code base:
#define ITCM_ADDR (DT_INST_0_NXP_IMX_ITCM_BASE_ADDRESS)
#define DTCM_ADDR (DT_INST_0_NXP_IMX_DTCM_BASE_ADDRESS)
I dont know why I had to use a different symbol name than you. Maybe because of Zehpyr version, we use currently 2.2.
Best regards,
Antoine
From: Arvid Rosén <arvid@...>
Sent: Monday, June 8, 2020 4:27:56 PM To: Antoine Zen-Ruffinen; Henrik Brix Andersen Cc: users@... Subject: Re: [Zephyr-users] Use different memory bank Hi Antoine,
We use CODE_DATA_RELOCATION on i.MX RT 1020. It is a bit of a hack though, but I added this to the dts_fixup.h for our board:
// Needed for CODE and DATA relocation #define ITCM_ADDR (DT_N_S_soc_S_flexram_400b0000_S_itcm_0_REG_IDX_0_VAL_ADDRESS) #define DTCM_ADDR (DT_N_S_soc_S_flexram_400b0000_S_dtcm_20000000_REG_IDX_0_VAL_ADDRESS) #define OCRAM_ADDR (DT_N_S_soc_S_flexram_400b0000_S_ocram_20200000_REG_IDX_0_VAL_ADDRESS)
Obviously, this isn’t a good solution, but it does work for us at least.
It would be great with some input on howto solve this for real.
Best Regards, Arvid
From:
<users@...> on behalf of "Antoine Zen-Ruffinen via lists.zephyrproject.org" <antoine=riedonetworks.com@...>
HI Brix,
Yes, I've tried that. See in my first post: > - How to specify that code should be relocated to ITCM while using CODE_DATA_RELOCATION ? I have tried "zephyr_code_relocate(ram_func.c ITCM)" but with no success.
As said, I was able to move come code to the SRAM but not to another RAM bank. Also I'm not sure that the BSP for the i.MXRT is doing it right. There is a few more memory region defined in the linker script in "soc/arm/nxp_imx/rt/linker.ld" and I think it is that that is printed at the end of the compilation. I think the related section are missing in the linker file. I don't know if the build system is expected to generate them from "zephyr_code_relocate() " and place them in the right memory region or if I need to do something extra. Also I like to have the code in ITCM memory (RAM) and data to DTCM memory from the same source file. From: Henrik Brix Andersen <henrik@...>
Hi Antoine,
|
|