Other Parts Discussed in Thread: SYSBIOS,
Tool/software: TI-RTOS
Hi,
I'm developing an application with SYS/BIOS.
--- ARCHITECTURE ---
The architecture of my software is divided in two parts:
1) BOOT
Wwhen system is powered up, Program Counter starts execution from _c_intBOOT address with the following instructions (file boot28.asm):
_c_intBOOT: .asmfunc
****************************************************************************
* INITIALIZE STACK POINTER. *
****************************************************************************
MOV SP,#__stackBOOT ; set to beginning of stack space
****************************************************************************
* INITIALIZE STATUS BIT FIELDS *NOT* INITIALIZED AT RESET *
****************************************************************************
SPM 0 ; set product shift to 0
****************************************************************************
* SET C28x MODES *
****************************************************************************
C28OBJ ; select C28x object mode
C28ADDR ; clear the addressing mode
C28MAP ; set block M0 and M1 mode
.
.
.
.
etc.
In other words I've replaced _c_int00 label with _c_intBOOT label because I want to manage BOOT variable and functions WITHOUT SYS/BIOS support.
After some initializations and checks, BOOT code jumps to _c_int00 address, thus starting SYS/BIOS boot sequence.
2) FIRMWARE
Firmware code begins when Program Counter jumps to _c_int00 address. After that jump the execution flow follows SYS/BIOS standard sequence.
--- SEQUENCE AND PROBLEM ---
BOOT variables are located in a separate section from FIRMWARE and the same separation has been implemented for instruction code.
When BOOT starts, .ebss and .cinit BOOT variables are initialized and I see their values correctly.
After the jump to _c_int00 address, some SYS/BIOS initialization functions (which functions?!?!?! I don't know...) are executed then MyStartup_resetFunction is called.
My problem is that inside MyStartup_resetFunction I see that BOOT variables are all reset to zero.
For instance, just before the jump to _c_int00 MyVariable has value equal to 0x12345678 and in MyStartup_resetFunction MyVariable has value equal to 0. And the same problem affects all variables.
It seems that there is any instruction from _c_int00 to MyStartup_resetFunction that reset the RAM.
My question is: how can I start SYS/BIOS boot sequence without loosing BOOT variables values?
--- ADDITIONAL INFORMATION ---
If I download BOOT and FIRMWARE code via JTAG emulator and I monitor the variables, I see that BOOT variables are NOT RESET when MyStartup_resetFunction is called.
On the oppposite, if I unplug JTAG emulator and power up the system I see that BOOT variables are RESET when MyStartup_resetFunction is called.
Thanks.
Best regards,
Demis Biscaro