This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52832 program entry point is not main()

Hello,

I'm newbie with BLE and nRF52832.

I'm using IAR 8.22.1 and softdevice S132 V6.0.0.

The problem is that my program worked fine but suddenly the entry point is not main function but other location in memory.

I've try the following steps:

1. Download another application.

2. Replace the SEGGER debugger.

3. Work with another PC.

4. Replace my board.

5. Re-download softdevice S132 and re-program the nRF52832.

6. Erase the nRF52832 and re-program the softdevice and the application.

BUT NOTHING HELPED!!

I have PCA10040 board, after programming the application, it got stuck too.

Here some information from environment:

 IAR log window is:

The IAR log message is:
HardFault exception. 
The processor has escalated a configurable-priority exception to HardFault. 
   The processor has attempted to execute an undefined instruction. 
  
Exception occured at: 0x243aa 
  
See the call stack for more information.

The Disassembly window is:

The Call Stack window is:

The configuration file is:

/*###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__ = 0x23000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x23000;
define symbol __ICFEDIT_region_ROM_end__   = 0x7ffff;
define symbol __ICFEDIT_region_RAM_start__ = 0x20002068; /*0x20001720;*/
define symbol __ICFEDIT_region_RAM_end__   = 0x2000ffff;
export symbol __ICFEDIT_region_RAM_start__;
export symbol __ICFEDIT_region_RAM_end__;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 800;
define symbol __ICFEDIT_size_heap__   = 200;
/**** End of ICF editor section. ###ICF###*/

define memory mem with size = 4G;
define region ROM_region   = mem:[from __ICFEDIT_region_ROM_start__   to __ICFEDIT_region_ROM_end__];
define region RAM_region   = mem:[from __ICFEDIT_region_RAM_start__   to __ICFEDIT_region_RAM_end__];

define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };
define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__     { };

initialize by copy { readwrite };
do not initialize  { section .noinit };

keep { section .intvec };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region   { readonly };
place in RAM_region   { readwrite,
                        block CSTACK,
                        block HEAP };

The map file is:

FBTNOR_nrf52382_xxAB.map

Does anyone have any idea about this problem?

If you need more information please ask.

Thanks in advance!

Related