This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: CCSTUDIO-SITARA
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:
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
That is correct. The section attribute can be applied to both variables and functions.
Thanks and regards,
-George
Ok George,
So, I don't find the method to allocate the stack system.
In the SYS/BIOS/Runtime window it's possible to enter an heap section (Section to place the system heap):
cfg.script:
BIOS.heapSection = "SECURE_DATA";
The résult in the map file:
*(SECURE_DATA*)
SECURE_DATA 0x83f04340 0x7d00 D:\Projects\Pilotage\6_Products\CNumDsp2015\src\AxisDriver\am335x_release\configPkg\package\cfg\am335x_app_pa8fg.oa8fg
0x83f04340 ti_sysbios_heaps_HeapMem_Instance_State_0_buf__A
But nothing for the stack, is it possible ?
JM