Other Parts Discussed in Thread: TMS320F28335, CONTROLSUITE
I wrote my custom bootloader copying TI's example for TMS320F28335
I placed my bootloader in FLASH A and my actual application in FLASH C, FLASH D, FLASH E. Following is my cmd file for actual application.
SCIBOOTINIT : origin = 0x33C000, length = 0x000020 /* flash H */
SCIBOOT : origin = 0x33C020, length = 0x000200
BEGIN : origin = 0x33FFF6, length = 0x000002
In actual application, i removed everything from FLASH A and moved to FLASH C, FLASH D and FLASH E, as shown below.
.cinit : > FLASHC PAGE = 0
.pinit : > FLASHC, PAGE = 0
.text : > FLASHC PAGE = 0
codestart : > FLASHC/*BEGIN*/ PAGE = 0
ramfuncs : LOAD = FLASHD,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
..
csmpasswds : > CSM_PWL PAGE = 0
csm_rsvd : > CSM_RSVD PAGE = 0
...
/* Initalized sections go in Flash */
/* For SDFlash to program these, they must be allocated to page 0 */
.econst : > FLASHC PAGE = 0
.switch : > FLASHC PAGE = 0
..
/* Allocate IQ math areas: */
IQmath : > FLASHE PAGE = 0 /* Math Code */
IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD
Then, I compiled my main program and generated "map file". "Map file" of my actual program says that my _c_int00 is at 00334b91.
So in my boot-loader code I have put
#define FLASH_ENTRY_POINT 0x334b91
( this is the value that is returned to _ExitBoot: from SCI_Boot() at the end in the boot-loader code. )
I can verify that my boot-lader is running, downloading code and exiting, but my actual program is not running.
Can someone tell me how and where to jump after exiting the _ExitBoot: routine.
( _ExitBoot: is part of f280x_otp2spi_boot_rom example provided by IT and i assume it is working as i can successfully download my code via bootloader. )
Thanks