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.

Z-Stack serial bootloader with CC2530 basic rf sample code

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

Hi all,

after successfully using the serial bootloader with the SBDemo tool and Z-Stack application, I now would like to create simple test applications with the basic sample code for the CC2530 that can be downloaded via the Z-Stack bootloader. But I am facing several problems:

1. I do not know which linker files to use. I chose cc2530-sb.xcl and set the project options such as code model and calling convention to the values I use in the Z-Stack applications. Then I had to add a Z-Stack startup.s51 file to avoid linker errors. I was then able to produce a .sim and with the oad tool a .bin file that could be downloaded via bootloader. But the program never starts. ( I think it does not pass the validity porcedure )

2. What do I have to do with the CRC_SHDW values? I would assume that adding these lines of code into my sample porject c-file would be sufficient:

#pragma location="CRC_SHDW"
const CODE uint16 _crcShdw = 0xFFFF;
#pragma required=_crcShdw

I would be really nice if someone who has yet used the serial bootloader with another application other than a Z-Stack application could share his/her experience with me.

Thanks in advance.

Best regards,

 

Tobias

  • Hello Tobias,

    Linker file used in the CC2530 serial bootloader is: \ZStack-CC2530-2.4.0-1.4.0\Projects\zstack\Tools\CC2530DB\sb-boot.xcl. You can find this in options->Linker->Config->linker command file.

    Please refer to the Appnote AN101 - Bootloader for CC2510.

    Link: http://www-s.ti.com/sc/techlit/swra371

    This appnote is on the bootloader for CC2510 which is derived from the CC2530 serial bootloader. So the flow is same. It also gives an example of a sample application code and how to download it through this bootloader. Hope it helps.

    Thank you,

    Best Regards,

    Shashank Mane

  • Thanks, I was looking for this kind of application note ! 

     

    FMarion

  • Hi Shashank Mane,

    Thank you for your fast answer!!

    But I do not understand how I can use your information to build a *.bin file based upon the basic_rf for the CC2530 that can be programmed via the SBDemo tool. The linker file you mentioned is used to generate the bootloader code, isn't it? The problem is not to generate and flash the bootloader code. This works quite fine with every Z-Stack application. But I have not yet succeeded in generating a compatible *.bin file with an application apart from Z-Stack. Perhaps I am just a little confused and you can point me to the necessary information in your paper?

    Thanks again.

     

    Best regards,

     

    Tobias

  • Hi all,

     

    I solved the problem. To generate a bootloader compatible *.bin file from a proprietary project you can use the cc2530-sb.xcl. Then you have to add the correct startup file (chipcon_startup.s51) to your project. Add the assembler include directories needed for that startup ($TOOLKIT_DIR$\inc\ ; $TOOLKIT_DIR$\src\lib) and don't forget to insert the CRC_SHDW code variable into yout source code

    #pragma location="CRC_SHDW"
    const CODE uint16 _crcShdw = 0xFFFF;

    In this case I had the problem that this variable has never been linked into the code. That could be solved by placing the code line:

    #pragma required=_crcShdw

    directly before a function that is used within the program.

    Now my question is answered and the answer could be verified....

    Best regards,

    Tobias