Hey all,
So I am trying to validate a customer boot loader I have created. For some background I have an external EEPROM with the required device address 0x50 that has the boot loader stored in the EEPROM. I generated the code stored in the EEPROM using the hex2000 utility with the .out file generated by my project which can successfully run from RAM. I used the following post build options to generate my binary file that is stored in the EEPROM.
"${CG_TOOL_HEX}" "${BuildArtifactFileName}" -boot -i2c8 -i2cpsc 0x01 -i2cclkh 0x036 -i2cclkl 0x036 -b -memwidth 8 --order LS -o "Boot_ROM.bin"
I know that the memwidth and order commands are redundant but that isn't an issue here. I also checked the formatting of the binary file and it looks correct. I see the 0x08AA for the first word, and I'm also seeing the correct I2C configuration words, as well as the correct address for code start (the address of c_int00() in the project). Based on that I feel pretty confident that my boot ROM is valid and I also verify that the correct data gets stored in the EEPROM after it is written.
I have been trying to test the boot ROM with my XDS510USB emulator and my licensed version CCS v6.1.3. I have the microcontroller configured so it will boot in WAIT mode. At that point I connect to the microcontroller via JTAG. I also modified the .gel file I am using so I have the following script available for use:
hotmenu EMU_BOOT_I2C()
{
*0xD00 = 0x55AA; /* EMU_KEY = 0x 55AA */
*0xD01 = 0x0005; /* Boot to I2C */
}
After running the script once the JTAG emulator is connected I initiate a reset of the micro. This is the example 3 method mentioned in the Piccolo Boot ROM app note. I do not see any attempt whatsoever by the micro to try and look for an external I2C device. This seems to indicate that the EMU_KEY and EMU_BMODE registers are getting ignored or written over. It looks like the micro just ends up booting from Flash after the reset is complete. Is there something I'm missing, or am I incorrectly trying to set the EMU_KEY and EMU_BMODE registers in RAM? I'm trying to figure out what is going on and I'm running out of ideas. Any help would be appreciated.
Best regards,
Lance Hummel