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.

How do you flash multiple images using the SmartRF Flash Programmer?

Other Parts Discussed in Thread: CC2531

I am using the CC2531 and the SmartRF Flash Programmer. I am trying to flash a boot loader and application executable (both .hex files).

I am trying to get the SmartRF Flash Programmer to put both images on, but get an error.

I do the bootloader using the erase,program,verify.

I then do the application using the append,verify.

Then I power cycle and my app doesn't run.

What is the appropriate way to put two images on the flash?

  • The offsets in my hex files appear to be correct (bootloader starts at 0x0000 to 0x1FFF and app starts at 0x2000 - 0xFFFF).

    If I download these two projects using IAR Workbench, it works just fine (bootloader starting, then application starting).

    I have included the first and last lines of my hex file (which to me show the proper start addresses and lengths).

    Bootloader

    :020000040000FA
    :10000000020474022003FFFFFFFFFF02200BFFFF2B

    ...

    :101FF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1
    :04000005000004747F
    :00000001FF

    Application

    :020000040000FA
    :10200000023912FFFFFFFFFFFFFFFFFFFFFFFFFF90

    ...

    :10FFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF11
    :0400000500003912AC
    :00000001FF

    Bryce

  • I found my issue. I am using a banked flash model for my application.

    According to the SWRU038 IAR User Manual, in order to generate a proper .hex file you must add the following extra Linker Option:

    -M(CODE)[(_CODEBANK_START+_FIRST_BANK_ADDR)-(_CODEBANK_END+_FIRST_BANK_ADDR)]*_NR_OF_BANKS+10000=0x8000

    Now it works great.