Hi TI experts
I am using secure boot feature on C6748, while reviewing the code of OMAP-L138 Secure UART Boot Host tool, I recognize for each input image *.out, it scans all loadable sections, encrypts its data and then writes AIS command to the device through UART (function AISSecureSectionLoad in SecureAISGen.cs). I am having a requirement to put a global variable to a subsection of .data section, like below:
#pragma DATA_SECTION(m_data, ".data:m_data");
unsigned char m_data[100] = {0, 1, 2, 3, ..., 99};
In sys/bios configuration .cfg file, I put
Program.sectMap[".data:m_data"] = new Program.SectionSpec();
Program.sectMap[".data:m_data"].loadSegment = "DDR";
Program.sectMap[".data:m_data"].loadAlign = 0x20;
But when debugging the Secure UART Boot tool, this subsection .data:m_data is marked as not loadable, and as a result this section will not be encrypted. My questions are:
1. If a section is not loadable, how this section is encrypted and put to output AIS secure image?
2. When I declare m_data as const unsigned char m_data[100], it is then recognized as loadable section. Why there is this difference?
3. Is there any scenarios when I should declare m_data with far keyword? : far const unsigned char m_data[100]
Thank you very much,
Long