I have finished my code for a project. I store the binary file on the internal SPI flash of the BF512F. I've got the BF512F to boot from flash etc. Everything is running 100%.
What I want to (have to) do now to finish the project off is, I have to add a table with the firmware version company info etc. at a specific address at the end of my code. Then I also have to reserve 4 bytes right at the end to place a CRC of the binary. I have tried modifying the LDF but I think Im doing it wrong because no matter what I change the FW TABLE does not get placed at the end of the binary file.
I have a few questions (some might have obvious answers but I please need then answered):
1. What size can my code be? I ask this, because I want to store my binary file on the internal flash. The flash size is 512 Kbytes. To be able to store the table at the end and CRC and always have the same address I have to reserve this space for my code. How could I determine my actual code size? I guess then I could always just limit my code to say 200 Kbytes and store the TABLE and CRC at the end of that file.
2. I've tried to figure out exactly how the DSP gets the code from the flash to the core but I still cant grasp how this really works. Does the bootloader just copy all the code to L1 code space and execute it from there or does it stream the code as required in large blocks from the flash to L1 code/instruction memory? Please help me understand this process or point me to a document on this process.
3. This question is basically my main problem. How do I place a Table at the end of my binary file at compile time and also how do I reserve the 4 CRC bytes at the end (this would probably be the same as placing the Table). Also, I want my binary file to be the same size always. I also need to fill code space not used with a specified value, say all 0xFF. Is this possible?
We use the CRC in the bootloader to check the binary files integrity. We also use the Firmware block to determine the firmware version and we have conflict and feature counters in there to determine upgrade compatibility etc. Our software guy have made us a package that we can use to add CRC's to the end of our binary files. He also uses the Firmware Table (which he has to know the address of) in our Firmware update software to determine correct firmware versions etc. So you can see why this is important to us.
Any help would be appreciated.
VisualDSP++ 5.0 and 5.1