This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Generating Image for SBL on CC2530

Other Parts Discussed in Thread: CC3200, CC2530, Z-STACK

Hi guys,

I'm having some issues to generate the correct the proper image file to be flashed via SBL on the CC2530. To flash the code we are using a Raspberry Pi or a CC3200 connected to the CC2530 through UART. This two can download the new firmware through the internet and flash it.  I have some questions around this:

1) The problem is that all the images files generated by IAR have extra data not inherent to flash image. I'm looking for an output format which looks like just as the flash memory of CC2530 would look like.

For example: if we choose OUTPUT FORMAT -> Simple-code the output file is (in ascii mode): 

IAR
 ÿÿÿÿÿ ÿÿÿÿÿ ÿÿÿÿÿ ÿÿÿÿÿ #ÿÿÿÿÿ +ÿÿÿÿÿ 3ÿÿÿÿÿ ;ÿÿÿÿÿ Cÿÿÿÿÿ Kÿÿÿÿÿ Sÿÿÿÿÿ [ÿÿÿÿÿ cÿÿÿÿÿ kÿÿÿÿÿ sÿÿÿÿÿ {ÿÿÿÿÿ ƒÿÿÿÿÿ ‹ È ÿÿÿÿ t÷ tÿ
`~ €zy{…äð‡ð…‚…ƒàø„àhð|} ª«‹ êE p¶…‚…ƒàÀà‡àø…àúè*øä4 ÑÐàð‡à`` `>`N`d`z€§…‚…ƒàdþpœ‡t€”„äð…‚…ƒà†ðÔ€‡@ä ¿t ¿…‚…ƒà‚ð‡t ¿…‚…ƒàƒð†à`‡t ¿…àðø†àh` À‡t ¿„àø…‚…ƒàh` °‚àdM` °éþ ·îùt
, vtí tû
`uu x ........

Here we can see things like IAR, or so, and those are things we don't want to flash to the CC2530 (that's not code). Which output format should I choose for simple opening the file and start flashing it without any processing.

NOTE: I already implemented the protocol used to talk to the bootloader described on the AN101 here: http://e2e.ti.com/support/wireless_connectivity/w/design_notes/1322.aspx

2) Another thing I don't understand is why do we have so many 0xFFFF at the end of the file. No matter which output format we choose there's always a lot of FF at the end of the file. I'm sure we don't need to flash that to the processor. Is there anyway to avoid this?

3) The bootloader reserves 4 bytes for CRC and those bytes are normally located at adress 0x2090.

#define HAL_SB_CRC_ADDR       0x2090

On the other hand we usually use address 0x2000 to start flashing code and the bootloader normally jumps to 0x2000 for user code execution. The problem here is, what if the code is longer than 0x0090 (which will always happen for sure), this will override the CRC bytes. What should we do here? Should we relocate the HAL_SB_CRC_ADDR to end of the code? Is it better to relocate it to the beginning at 0x2000 and the code at 0x2004?? We need some advice here.

What am I missing here?

Please if anyone can help me with this It will be very very helpful, we are kind of stuck here.

Cheers,

MF