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.

IAR EW freezes when debugging board with cc2541

Other Parts Discussed in Thread: CC2541, CC2540

Whenever I try to debug a cc2541 IAR EW freezes and/or 'loses track' of the debugging.This freeze can happens right at the start of main (  HAL_BOARD_INIT(); ) when I have a breakpoint there and start single stepping the code. When I have more than on breakpoint I sometimes am able to jump to the next one, but eventually the debugging hangs/freezes. Single steppig never works more than a few times.

The cc2541 is on a custom board which was designed based on the old Keyfob(cc2540). I have another custom board with a similar design and the keyfob from the dev kit which run with little to no problem.

I think it might come from wrong project settings because I can reproduce the same behaviour on the cc2540 modul and the keyfob using iar workspaces meant for cc2541.

I have tried debugging the cc2541 modul with alot of different settings and workspaces(keyfob, simpleBLEPeripheral project) and stack versions (1.21, 1.3, 1.4) with the same result.I think the problem is that the debugger/iar uses the wrong "linker" file for the cc2541, but I have not find a way to check that. I can see several linker files in ble/common/2540 but I dont know which one is used.


Are there different versions of cc2541 need different settings in the IAR projects?

I have several boards with the cc241 all having the same debugging problem. Surprisingly, they work just fine when not in debug mode (can find and conncet them to other devices).

Please, if you have any ideas let me know!