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.

Flash Loader Program Error CC2538NF11

Other Parts Discussed in Thread: CC2538

Hi,

When I try to erase the flash of a custom CC2538NF11 board based on the CC2538EM I get a weird error saying: "The flash loader program reported an error" with no further explanation. I am using IAR and the XDS100v3 found on the SmartRF06 board to debug via JTAG. I can get it to work on the CC2538EM (which uses the CC2538SF53).

Here is the whole debug log: 

Tue Jul 07, 2015 10:25:00: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2\arm\config\debugger\TexasInstruments\
CC2538.dmac
Tue Jul 07, 2015 10:25:00: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2\arm\config\flashloader\TexasInstruments\
FlashCC2538.mac
Tue Jul 07, 2015 10:25:01: Connecting to TI XDS100 (Probe no: 06EB12100B22)
Tue Jul 07, 2015 10:25:02: TI XDS ARM, device revision: 0x00000001, big endian: false, cache: false, board revision: 0x00000000, driver revision:
0x0B020200
Tue Jul 07, 2015 10:25:03: Initial reset was performed
Tue Jul 07, 2015 10:25:03: 416 bytes downloaded and verified (3.73 Kbytes/sec)
Tue Jul 07, 2015 10:25:03: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2\arm\config\flashloader\TexasInstruments\
FlashCC2538RAM16K.out
Tue Jul 07, 2015 10:25:03: Target reset
Tue Jul 07, 2015 10:25:06: Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2\arm\config\flashloader\
TexasInstruments\FlashCC2538.mac
Tue Jul 07, 2015 10:25:06: The flash loader program reported an error.

I have set the device to the CC2538NF in the general options of the project and reinstalled the drivers.

Also, when I press download and debug, it seems as if it flashes correctly, no errors or anything, but when I go to debug it isn't running the program, it is just looping with random assembly instructions.

Any help would be greatly appreciated.

  • Hi,

    I am still having troubles with this error. I think the cause of it might be the *.icf file and it is flashing to the wrong part of memory. I think it might need to be configured for use with the CC2538NF11, but I can't find anything in the documentation about what changes to make. Is there a TI supported version of this file, or will I have to make the changes myself?

    I found this post https://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/100998 that was a similar problem, but I can't figure out how this guy got the values he got.

  • Hi,

    Can anyone verify if this linker file should work, I got it from IAR. I looks to me like it should, but it doesn't fix the error.

    /*###ICF### Section handled by ICF editor, don't touch! ****/
    /*-Editor annotation file-*/
    /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
    /*-Specials-*/
    define symbol __ICFEDIT_intvec_start__ = 0x00200000;
    /*-Memory Regions-*/
    define symbol __ICFEDIT_region_ROM_start__ = 0x00200000;
    define symbol __ICFEDIT_region_ROM_end__ = 0x0021ffd3;
    define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
    define symbol __ICFEDIT_region_RAM_end__ = 0x20003fff;
    /*-Sizes-*/
    define symbol __ICFEDIT_size_cstack__ = 0x800;
    define symbol __ICFEDIT_size_heap__ = 0x1000;
    /**** End of ICF editor section. ###ICF###*/

    //
    // Define a memory region that covers the entire 4 GB addressible space of the
    // processor.
    //
    define memory mem with size = 4G;

    //
    // Define a region for the on-chip flash.
    // This device has 128KB Flash size
    //
    define region FLASH = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];

    //
    // Define a region for Customer Configuration Area in flash.
    //
    define region FLASH_CCA = mem:[from 0x0021ffd4 to 0x0021ffdf];

    //
    // Define a region for the on-chip SRAM.
    // This device has 16KB RAM size
    //
    define region SRAM = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];

    //
    // Define regions of retention and non-retention RAM. This device has only
    // the RAM block with retention.
    //
    define region SRAM_RETENTION = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];

    //
    // Define a block for the heap. The size should be set to something other
    // than zero if things in the C library that require the heap are used.
    //
    define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };

    //
    // Indicate that the read/write values should be initialized by copying from
    // flash.
    //
    initialize by copy { readwrite };

    //
    // Indicate that the noinit values should be left alone.
    //
    do not initialize { section .noinit };

    //
    // Place the interrupt vectors at the start of flash.
    //
    place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

    //
    // Place the cca area at the end of flash (start of FLASH_CCA).
    //
    place at start of FLASH_CCA { readonly section .flashcca };

    //
    // Place the remainder of the read-only items into flash.
    //
    place in FLASH { readonly };

    //
    // Place the RAM vector table at the start of retention ram.
    //
    place at start of SRAM_RETENTION { section VTABLE };

    //
    // Place all read/write items into retention SRAM.
    //
    place in SRAM_RETENTION { readwrite, block HEAP };

    //
    // Define CSTACK block to contain .stack section. This enables the IAR IDE
    // to properly show the stack content during debug. Place stack at end of
    // retention RAM, do not initialize (initializing the stack will destroy the
    // return address from the initialization code, causing the processor to branch
    // to zero and fault)
    //
    define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { section .stack };
    do not initialize { section .stack };
    place at end of SRAM_RETENTION { block CSTACK };

    //
    // Export stack top symbol. Used by startup file.
    //
    define exported symbol STACK_TOP = __ICFEDIT_region_RAM_end__ + 1;

    //
    // Variables that do not need retention should be defined here
    // Only retention RAM on this device variant
    place in SRAM_RETENTION { section .nonretenvar };
  • Hi,

    I'm having similar troubles at 'flashing CC2538NF11 custom board' too.

    As programmer, I'm using the 'SmartRF Flash Programmer 2' and as interface the XDS100v3 connected to JTAG.

    After a dummy test, SmartRF is able to recognise, read the MAC of the board, but when I try to flash the 'per_Test.hex', flasher fails (please, take a look to attached).

    Is the 'per_Test.hex' valid for the 128kB flash and 16kB RAM of the CC2538NF11? 

    Or maybe, is it another kind of error? In such case, how can I modify the example code in order to test it?

    Kind Regards!

  • I don't think default per_Test.hex would be valid for CC2538NF11. If you intend to test RF performance on CC2538NF11, you can try to use SmartRF Studio.

  • Hi ,

    the target is not test the radio performance, it is to be able to flash new firmware to the boards.

    In my case, 'per_Test.hex' is compiled for CC2538SF53, so this could be the reason of the failure. Then, I'm going to develop some 'testing code' in order to check my custom board I/Os, before flash any (Zigbee stack + custom fmw).

    Kind Regards.