Hi,
I'm using MIMXRT1021 evaluation board in which I want to put the entire C++ file into external SDRAM.
In MCUXpresso project settings there is one option to Manage Linker script but I'm not getting any reference to add file into SDRAM section.
I've tried but not able to do the same. Please guide me further.
Hi @emb02 ,
Hope you are doing well!
This post should meet your needs, please refer to it: https://mcuoneclipse.com/2021/05/26/placing-code-in-sections-with-managed-gnu-linker-scripts/
Best regards,
Gavin
Is your *.cpp file in the source folder? This should be necessary.
Hi,
Yes my Test1.cpp file is in the source folder.
Can you verify - */Test1.o (.text .text*)
Is this the correct way of adding file name?
Hi @emb02 ,
On my side, I have implemented a method to put a C file into SDRAM. Please refer to <MCUXpresso IDE User Guide> Chapter 20.13.5 Placing specific functions into RAM blocks.
// test.h
#ifndef TEST_H_
#define TEST_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <cr_section_macros.h>
__RAMFUNC(RAM2) void my_function(void);
#ifdef __cplusplus
}
#endif
#endif /* TEST_H_ */
Hope it helps!
Best regards,
Gavin
Hi @emb02 ,
Thanks for your feedback!
I'll test it for you on my end and get back to you in a timely manner. It may take some time because of the recent backlog. Thanks in advance for your kind understanding!
Best regards,
Gavin