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

Flashing NRF52832 with Jlink on Raspberry Pie

Hello,

I am trying to flash my NRF52832 device with "JLink_Linux_V670a_arm" using a Raspberry Pie, a JlinkScript and an sh Script but I keep getting these errors. Could you please help me understand what should I do or change.

error messages:

SEGGER J-Link Commander V6.70a (Compiled Mar 30 2020 17:45:37)

DLL version V6.70a, compiled Mar 30 2020 17:45:18

 

 

J-Link Command File read successfully.

Processing script file...

 

J-Link Commander will now exit on Error

 

J-Link connection not established yet but required for command.

Connecting to J-Link via USB...O.K.

Firmware: J-Link V10 compiled Apr 23 2020 16:49:14

Hardware version: V10.10

S/N: 600109941

License(s): RDI, FlashBP, FlashDL, JFlash, GDB

VTref=2.958V

Target connection not established yet but required for command.

Device "NRF52832_XXAA" selected.

 

 

Connecting to target via SWD

InitTarget() start

InitTarget() end

Found SW-DP with ID 0x2BA01477

DPIDR: 0x2BA01477

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: 0x24770011)

AP[1]: JTAG-AP (IDR: 0x02880000)

Iterating through AP map to find AHB-AP to use

AP[0]: Core found

AP[0]: AHB-AP ROM base: 0xE00FF000

CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)

Found Cortex-M4 r0p1, Little endian.

FPUnit: 6 code (BP) slots and 2 literal slots

CoreSight components:

ROMTbl[0] @ E00FF000

ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7

ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT

ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB

ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM

ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU

ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM

Cortex-M4 identified.

Erasing device...

Comparing flash   [100%] Done.

Erasing flash     [000%]

****** Error: Failed to erase chip.

Failed to execute RAMCode for chip erase!

J-Link: Flash download: Total time needed: 0.019s (Prepare: 0.012s, Compare: 0.000s, Erase: 0.006s, Program: 0.000s, Verify: 0.000s, Restore: 0.000s)

 

****** Error: Failed to restore target. RAMCode never stops

ERROR: Erase returned with error code -5.

 

Script processing completed.

eoe 1
erase

Loadfile /home/pi/Desktop/Git/firmwareTedTools/input/bootloader_merged.hex

Loadfile /home/pi/Desktop/Git/firmwareTedTools/input/app_merged.hex

W4 0x75000 , 0x00050200

W4 0x75004 , 0x4b646554
W4 0x75008 , 0x006f

W4 0x75014 , 0x0052

W4 0x75018 , 0x0033

W4 0x7501c , 0x00

W4 0x75028 , 0x14

r
go
q
#!/bin/bash
/home/pi/Desktop/rasp/JLink_Linux_V670a_arm/JLinkExe -device NRF52832_XXAA -if SWD -speed 4000 -autoconnect 1 -CommanderScript /home/pi/Desktop/Git/firmwareTedTools/output/flash_script.jlink

Related