Hi,
I have an application where a STR912 is connected to a PIC device. The two devices communicate using CAN.
I want to download the PIC's firmware using the STR912. For this purpose, I have to link this firmware in the STR912 code. The firmware is an object file (but I don't think it is comtable with Keils obj files, a hex file (intel hex) or a binary file.
How can I link such a file on a specific address ?
Thanks.
Luc
You'll have to check the Linker Manual to see if it has any way to imoprt arbitrary binary data.
If not, 2 common ways to do this are:
1. use some tool to post-process your hex file to merge-in the PIC's hex file;
2. include the PIC's binary as an initialised const array in your 'C' source...
I have done a project something similar to yours. The board contain a ARM7 uController and FPGA( Xilinx Spartan 3E). The FPGA is programmed by the uController at boot up. FPGA is brought into the configuration mode just by some GPIO condition, and the FPGA hex file is written in FPGA byte by byte. After dumping all bytes into FPGA, it get configured. The FPGA hex file is stored in uController firmware just as array of data or as a file.
I guess you can also also store the hex/bin file of the PIC device in the firmware as an array or file and at boot time you can provide the data to the pic as it is normally programmed.
Hope this clue will help you. If any doubt feel free to share it with me. Thanks.