S32K116 with IAR doesn't start without debugger

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K116 with IAR doesn't start without debugger

614 Views
antoine_monmarc
Contributor V

Hello,

I'm using an S32K116 with an application compiled with IAR.

I'm using Segger J-Link debugger.

I can flash the SW using J-Link but when I reset the board without the debugger connected, the SW will not start.

I used IAR to "attahced to running target and found that the SW is stuck in HardFault_Handler from function init_data_bss at step /* Copy initialized data from ROM to RAM */.

What are the steps to investigate on this issue?

Thank you.

5 Replies

470 Views
antoine_monmarc
Contributor V

Please find attached my IAR linker file.

it is based on S32_SDK_RTM_3.0.0 file.

0 Kudos

470 Views
antoine_monmarc
Contributor V

See also attached my map file

0 Kudos

470 Views
antoine_monmarc
Contributor V

With JLink debugger and JFlash v6.60b software I can start manually the application by using Target->Manual Programing->Start Application.

It gives me the following log:

Starting application ...
- Connecting via USB to J-Link device 0
- J-Link firmware: J-Link V10 compiled Jan 7 2020 16:51:47
- Device "S32K116" selected.
- InitTarget()
- Found SW-DP with ID 0x0BC11477
- Scanning AP map to find all available APs
- AP[2]: Stopped AP scan as end of AP map has been reached
- AP[0]: AHB-AP (IDR: 0x04770031)
- AP[1]: JTAG-AP (IDR: 0x001C0020)
- Iterating through AP map to find AHB-AP to use
- AP[0]: Core found
- AP[0]: AHB-AP ROM base: 0xF0002000
- CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
- Found Cortex-M0 r0p1, Little endian.
- FPUnit: 2 code (BP) slots and 0 literal slots
- CoreSight components:
- ROMTbl[0] @ F0002000
- ROMTbl[0][0]: F0000000, CID: B105900D, PID: 001BB932 MTB-M0+
- ROMTbl[0][1]: F0001000, CID: B105900D, PID: 0008E000 MTBDWT
- ROMTbl[0][2]: E00FF000, CID: B105100D, PID: 000BB4C0 ROM Table
- ROMTbl[1] @ E00FF000
- ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
- ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
- ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
- Initializing 15360 bytes work RAM @ 0x1FFFFC00
- Reset: Halt core after reset via DEMCR.VC_CORERESET.
- Reset: Reset device via AIRCR.SYSRESETREQ.
- Reset: Halt core after reset via DEMCR.VC_CORERESET.
- Reset: Reset device via AIRCR.SYSRESETREQ.
- Target application started

0 Kudos

470 Views
antoine_monmarc
Contributor V

Hello,

Issue is fixed after adding START_FROM_FLASH in assembly preprocessor.

470 Views
ianchuter
Contributor II

Thank you for posting this, had the same problem with an S32K118 using S32 design studio... Can't believe the default project settings are this bad!

0 Kudos