Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
Hi All, This is a question for anyone with BF53x experience. I'm using a BF533 ez-kit to test my code. I'd like to make a binary file that contains code that will execute in place in flash, copy code that will run in SDRAM and then jump to SDRAM and continue running code from SDRAM. The binary file will not use the on-chip boot loader. I'm having problems including the code which runs in SDRAM in the binary file. The splitter only outputs section for ROM, which I have mapped starting at address 0x20000000. So the binary file will be composed of: < startup code, like basiccrt.s > < code which runs in SDRAM, but stored in flash > This binary file will be written to flash. I envision my startup code to have something like: .extern copy2sdram_addr // declared in LDF. Address of SDRAM code that is stored in flash. Example: 0x20001000 .extern copy2sdram_size // declared in LDF. Size of SDRAM code. Example: 0x100 or 256 bytes < init SDRAM code here > R0 = 0x4000; // sdram dest. SDRAM is mapped at 0x4000. R1 = copy2sdram_addr; // src from flash R2 = copy2sdram_size; // bytes to copy, in this case 256 bytes CALL _memcpy; P0 = 0x4000; JUMP (P0); // run SDRAM code I realize that if I create a loader file which the on-chip boot loader can use, then my troubles are over. However, my target platform won't have a lot of flash, and the loader file in binary format takes up 2x as much space compared to a raw binary file for execute in place. Anyway, if anyone has any suggestions, please feel free to reply. Thanks in advance, -win
Hi windam_2000 wrote: > Hi All, > > I'd like to make a binary file that contains code that will execute in > place in flash, copy code that will run in SDRAM and then jump to > SDRAM and continue running code from SDRAM. The binary file will not > use the on-chip boot loader. > Probably, "RUNTIME_INIT" will help you. That is a specifier of LDF, and declare given output section will be located in RAM, and initialized at runtime. Initializying is done by _mem_init() which is called by crt. Then, that works when you takes the execution in place. I guess, boot-mode works also for you. And believe that is the easiest way to realize your purpose. So, I wonder what happend about your code size. Anyway, if you are interested in the boot code compression, EE-257 may help you. Regards, Suikan.