Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI C/C++ Compiler
Hi,
My configuration is the following one:
- Sitara ARM3359
- Code Composer Studio version CCS 7.1.0.00014
- SYS/BIOS 6.45.0.20 Real Time Operating System
- XDC Tool 3.31.00.24
- Compiler GNU v4.9.3 (Linaro)
- NDK 2.24.3.35
- Sysbios sdk 2.1.1.2
- software Texas Instrument ecat_appl with beckoff path v5.11
My code was written in C++ language.
I have created two sections (SECURE_DATA and SECURE_CODE placed at 0x83f00170 adress) to force the linker to place speciphic codeand datas in speciphic section.
I have a c++ object: m_safety, and i allocate it (the datas) in the SECURE_DATA section by using an attribute:
- SafetyBlock m_safety __attribute__((section("SECURE_DATA")));
I can see the effect in the map file:
SECURE_CODE 0x830f00000 0x170
0x83f00000 . = ALIGN (0x4)
*(SECURE_CODE*)
SECURE_CODE 0x83f00000 0x128 .safetyCpp.o
....
*(SECURE_DATA*)
SECURE_DATA 0x83000170 0x625b8 .SafetyCpp.o
0x83000170 m_safety
0x83000c78 m_ci
My question: is it possible to map one single c++ object function in this section ?
For exemple, execute in SECURE_CODE section only the lonely InitParam() function in the code below:
Safety.h
class SafetyBlock
{
public:
SafetyBlock(void);
virtual ~SafetyBlock();
void InitializeRef(void); // executing it in standart adress (0x80000000)
bool InitParam(void); // I want to execute it in SECURE_CODE section (0x83000000)
}
----------------------------------------------------------------
Safety.cpp
SafetyBlock::SafetyBlock(void)
{
}
SafetyBlock::~SafetyBlock()
{
}
void SafetyBlock::InitializeRef(void)
{
....
}
// Init Parameters
bool SafetyBlock::InitParam(void) // I want to execute it in SECURE_CODE section (0x83000000)
{
...
}
---------------------------------------------------------
Do anyone know the syntax to force the execution of InitParam in the SECURE_CODE section ?
Thanks.
JM
