Running a function on ITCMRAM
Hello, ı want to run a function in ITCMRAM area. But as long as i call the function i enter HardFault
I added code snippet below(just the ITCMSection part) to the linker script.
SECTIONS
{
/* The startup code goes first into FLASH */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH
_siITCM = LOADADDR(.ITCMSection);
.ITCMSection :
{
. = ALIGN(4);
_sITCM = .; /* create a global symbol at ITCM start */
*(.ITCMSection)
. = ALIGN(4);
_eITCM = .; /* create a global symbol at ITCM end */
} >ITCMRAM AT> FLASH
/* The program code and other data goes into FLASH */
.text :I have a simple function below that is causing hardfault that i declare in my main.c file.
__attribute__((section(".ITCMSection"))) uint8_t my_function(uint8_t a)
{
return 2*a;
}I can also see that i put 26Bytes in the ITCMRAM area from build analyzer. What might be the reason for HardFault?
