我定义了很多变量,现在想把他放到我自己定义的RAM段里面,怎么把变量 批量的分配到指定的RAM
.APPL_RAM_DATA :
{
__MY_APPL_RAM_SECTION_START = .;
KEEP(*(.APPL_RAM_DATA))
__MY_APPL_RAM_SECTION_END = .;
} > m_Appl_Ram
uint16_t GetCNVBuff[4];
uint16_t CalculationResut1,CalculationResut2;
flexcan_id_table_t filterTable[16];
flexcan_msgbuff_t recvMsg0;
flexcan_msgbuff_t recvMsg1;
ftm_state_t ftmStateStruct;
ftm_state_t ftm1StateStruct;
Hi,
use __attribute__ ((section(".APPL_RAM_DATA"))) keyword for variable definition, like
__attribute__ ((section(".APPL_RAM_DATA"))) uint16_t GetCNVBuff[4];
__attribute__ ((section(".APPL_RAM_DATA"))) flexcan_msgbuff_t recvMsg0;
etc
BR, Petr