Hello,
I'm unable to use loadbin on an ATSAMR21E19A. I'm able to manually write and read memory but not using loadbin.
Logs:
Display All
Display All
Binary was compiled using Atmel Studio 7 and also flashing directly from Atmel Studio does not work.
Thanks!
I'm unable to use loadbin on an ATSAMR21E19A. I'm able to manually write and read memory but not using loadbin.
Logs:
Source Code
- C:\Users\x\Desktop>"C:\Program Files (x86)\SEGGER\JLink_V641a\JLink.exe" -Log log.txt
- SEGGER J-Link Commander V6.41a (Compiled Nov 27 2018 14:10:26)
- DLL version V6.41a, compiled Nov 27 2018 14:09:51
- Connecting to J-Link via USB...O.K.
- Firmware: J-Link V10 compiled Nov 23 2018 11:20:54
- Hardware version: V10.10
- S/N: 260105781
- License(s): FlashBP, GDB
- OEM: SEGGER-EDU
- VTref=3.322V
- Type "connect" to establish a target connection, '?' for help
- J-Link>connect
- Please specify device / core. <Default>: ATSAMR21E19
- Type '?' for selection dialog
- Device>
- Please specify target interface:
- J) JTAG (Default)
- S) SWD
- T) cJTAG
- TIF>S
- Specify target interface speed [kHz]. <Default>: 4000 kHz
- Speed>
- Device "ATSAMR21E19" selected.
- Connecting to target via SWD
- InitTarget()
- Found SW-DP with ID 0x0BC11477
- Scanning AP map to find all available APs
- AP[1]: Stopped AP scan as end of AP map has been reached
- AP[0]: AHB-AP (IDR: 0x04770031)
- Iterating through AP map to find AHB-AP to use
- AP[0]: Core found
- AP[0]: AHB-AP ROM base: 0x41003000
- CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
- Found Cortex-M0 r0p1, Little endian.
- FPUnit: 4 code (BP) slots and 0 literal slots
- CoreSight components:
- ROMTbl[0] @ 41003000
- ROMTbl[0][0]: 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
- ROMTbl[0][1]: 41006000, CID: B105900D, PID: 001BB932 MTB-M0+
- Cortex-M0 identified.
- J-Link>mem 0x0 0x12
- 00000000 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
- 00000010 = FF FF
- J-Link>w1 0x0 0x12
- Writing 12 -> 00000000
- J-Link>mem 0x0 0x12
- 00000000 = 12 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
- 00000010 = FF FF
- J-Link>loadbin C:\Users\x\Desktop\Demo.bin 0x0
- Downloading file [C:\Users\x\Desktop\ZLLDemo.bin]...
- Error while programming flash: Programming failed.
Brainfuck Source Code
- T1BA4 000:000 SEGGER J-Link V6.41a (beta) Log File (0000ms, 0000ms total)
- T1BA4 000:000 DLL Compiled: Nov 27 2018 14:09:51 (0000ms, 0000ms total)
- T1BA4 000:000 Logging started @ 2019-02-15 12:08 (0000ms, 0000ms total)
- T1BA4 000:000 JLINK_SelectUSB(Port = 0) returns 0x00 (0000ms, 0000ms total)
- T1BA4 000:000 JLINK_SetWarnOutHandler(...) (0000ms, 0000ms total)
- T1BA4 000:000 JLINK_OpenEx(...)
- Firmware: J-Link V10 compiled Nov 23 2018 11:20:54
- Hardware: V10.10
- S/N: 260105781
- OEM: SEGGER-EDU
- Feature(s): FlashBP, GDB
- TELNET listener socket opened on port 19021WEBSRV
- Starting webserver (0034ms, 0034ms total)
- T1BA4 000:000 WEBSRV Webserver running on local port 19080 (0034ms, 0034ms total)
- T1BA4 000:000 returns O.K. (0034ms, 0034ms total)
- T1BA4 000:034 JLINK_GetFirmwareString(...) (0000ms, 0034ms total)
- T1BA4 000:034 JLINK_GetHardwareVersion() returns 0x18A88 (0000ms, 0034ms total)
- T1BA4 000:035 JLINK_EMU_HasCapEx(0x00000026) returns 0x00 (0000ms, 0034ms total)
- T1BA4 000:035 JLINK_EMU_GetProductId() (0000ms, 0034ms total)
- T1BA4 000:035 JLINK_GetHardwareVersion() returns 0x18A88 (0000ms, 0034ms total)
- T1BA4 000:035 JLINK_GetFirmwareString(...) (0000ms, 0034ms total)
- T1BA4 000:035 JLINK_GetEmuCaps() returns 0xB9FF7BBF (0000ms, 0034ms total)
- T1BA4 000:035 JLINK_GetEmuCaps() returns 0xB9FF7BBF (0000ms, 0034ms total)
- T1BA4 000:035 JLINK_GetHWStatus(...) returns 0x00 (0000ms, 0034ms total)
- T1BA4 000:035 JLINK_EMU_HasCapEx(0x00000044) returns 0x01 (0000ms, 0034ms total)
- T1BA4 000:035 JLINK_ReadEmuConfigMem(..., Off = 0x9A, NumBytes = 0x01) returns 0x00 (0000ms, 0034ms total)
- T1BA4 003:411 JLINK_Api_MRU_GetList()JLINK_DEVICE_GetIndex(sDeviceName = ATSAMR21E19)XML file found at: C:\Program Files (x86)\SEGGER\JLink_V641a\JLinkDevices.xml (0001ms, 0038ms total)
- T1BA4 004:746 C:\Program Files (x86)\SEGGER\JLink_V641a\JLinkDevices.xml evaluated successfully. returns 527 (0100ms, 0137ms total)
- T1BA4 004:846 JLINK_DEVICE_GetInfo(DeviceIndex = 527) returns 0 (0000ms, 0137ms total)
- T1BA4 006:943 JLINK_ExecCommand("device=ATSAMR21E19", ...). Device "ATSAMR21E19" selected. returns 0x00 (0003ms, 0140ms total)
- T1BA4 006:946 JLINK_EnableLog(...) (0000ms, 0140ms total)
- T1BA4 006:947 JLINK_GetEmuCaps() returns 0xB9FF7BBF (0000ms, 0140ms total)
- T1BA4 006:947 JLINK_TIF_GetAvailable(...) (0001ms, 0141ms total)
- T1BA4 006:948 JLINK_TIF_Select(JLINKARM_TIF_SWD) returns 0x00 (0001ms, 0142ms total)
- T1BA4 006:949 JLINK_SetSpeed(4000) (0000ms, 0142ms total)
- T1BA4 006:949 JLINK_Connect()InitTarget() >0x10B TIF>Found SW-DP with ID 0x0BC11477 >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x28 TIF>Scanning AP map to find all available APs >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x21 TIF>AP[1]: Stopped AP scan as end of AP map has been reachedAP[0]: AHB-AP (IDR: 0x04770031)
- Iterating through AP map to find AHB-AP to use >0x42 TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x21 TIF> >0x42 TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x21 TIF>AP[0]: Core foundAP[0]: AHB-AP ROM base: 0x41003000 >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x21 TIF>CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)Found Cortex-M0 r0p1, Little endian.
- -- Max. mem block: 0x00003478 -- CPU_ReadMem(4 bytes @ 0xE000EDF0) -- CPU_WriteMem(4 bytes @ 0xE000EDF0) -- CPU_ReadMem(4 bytes @ 0xE0002000)FPUnit: 4 code (BP) slots and 0 literal slots -- CPU_ReadMem(4 bytes @ 0xE000EDFC) -- CPU_WriteMem(4 bytes @ 0xE000EDFC) -- CPU_ReadMem(4 bytes @ 0xE0001000) -- CPU_WriteMem(4 bytes @ 0xE0001000)CoreSight components:ROMTbl[0] @ 41003000 -- CPU_ReadMem(16 bytes @ 0x41003000) -- CPU_ReadMem(16 bytes @ 0xE00FFFF0) -- CPU_ReadMem(16 bytes @ 0xE00FFFE0)
- ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB4C0 ROM TableROMTbl[1] @ E00FF000 -- CPU_ReadMem(16 bytes @ 0xE00FF000) -- CPU_ReadMem(16 bytes @ 0xE000EFF0) -- CPU_ReadMem(16 bytes @ 0xE000EFE0)ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS -- CPU_ReadMem(16 bytes @ 0xE0001FF0) -- CPU_ReadMem(16 bytes @ 0xE0001FE0)ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT -- CPU_ReadMem(16 bytes @ 0xE0002FF0) -- CPU_ReadMem(16 bytes @ 0xE0002FE0)
- ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB -- CPU_ReadMem(16 bytes @ 0x41006FF0) -- CPU_ReadMem(16 bytes @ 0x41006FE0)ROMTbl[0][1]: 41006000, CID: B105900D, PID: 001BB932 MTB-M0+ returns 0x00 (0138ms, 0280ms total)
- T1BA4 007:087 JLINK_GetIdData(...) >0x0D TIF> >0x21 TIF> ScanLen=4 NumDevices=1 aId[0]=0x0BC11477 aIrRead[0]=0 aScanLen[0]=0 aScanRead[0]=0 (0001ms, 0281ms total)
- T1BA4 007:088 JLINK_GetMemZones(...) returns 0 (0000ms, 0281ms total)
- T1BA4 007:088 JLINK_CORE_GetFound() returns 0x60000FF (0000ms, 0281ms total)
- T1BA4 014:037 JLINK_ReadMem (0x00000000, 0x0012 Bytes, ...) -- CPU_ReadMem(18 bytes @ 0x00000000) - Data: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ... returns 0x00 (0001ms, 0282ms total)
- T1BA4 039:012 JLINK_WriteU8(0x00000000, 0x00000012) returns 0 (0000ms, 0282ms total)
- T1BA4 046:472 JLINK_ReadMem (0x00000000, 0x0012 Bytes, ...) -- CPU_ReadMem(18 bytes @ 0x00000000) - Data: 12 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ... returns 0x00 (0001ms, 0283ms total)
- T1BA4 078:624 JLINK_IsHalted() returns TRUE (0003ms, 0286ms total)
- T1BA4 078:628 JLINK_DownloadFile()JLINK_BeginDownload(Flags = 0x00) (0001ms, 0284ms total)
- T1BA4 078:628 JLINK_WriteMem(0x00000000, 0x3B358 Bytes, ...) - Data: 30 72 00 20 C5 09 03 00 00 00 00 00 1D F9 02 00 ... -- Read from flash cache (242520 bytes @ 0x00000000) returns 0x3B358 (0004ms, 0287ms total)
- T1BA4 078:628 JLINK_EndDownload() -- CPU_ReadMem(16 bytes @ 0x41006FE0) -- CPU_ReadMem(4 bytes @ 0x41006004) -- CPU_ReadMem(4 bytes @ 0xE000ED90) -- -------------------------------------- -- Start of determining dirty areas in flash cache -- End of determining dirty areas -- Start of preparing flash programming -- Calculating RAM usage -- RAM usage = 5876 Bytes -- Preserving CPU registers -- Preparing memory -- Preparing target -- Downloading RAMCode -- Checking target RAM -- Preparing RAMCode
- -- End of preparing flash programming -- CPU speed could not be measured. -- Start of comparing flash -- CRC check was estimated as fastest method -- Comparing range 0x0000 - 0xFFFF (256 Sectors, 64 KB), using multi-block CRC calculation -- CRC does not match for sectors 0-255 -- Comparing range 0x10000 - 0x1FFFF (256 Sectors, 64 KB), using multi-block CRC calculation -- CRC does not match for sectors 0-255 -- Comparing range 0x20000 - 0x2FFFF (256 Sectors, 64 KB), using multi-block CRC calculation
- -- CRC does not match for sectors 0-255 -- Comparing range 0x30000 - 0x3B3FF (180 Sectors, 45 KB), using multi-block CRC calculation -- CRC does not match for sectors 0-179 -- End of comparing flash -- Start of erasing sectors -- End of erasing sectors -- Start of flash programming -- Programming range 0x00000000 - 0x00007FFF (128 Sectors, 32 KB)
- ***** Error: Programming failed @ address 0x00000000 (block verification error) -- End of flash programming -- Start of restoring -- Restoring RAMCode
- -- Restore target -- Restore memory -- Restoring CPU registers -- End of restoringRestarting due to program error (possibly skipped erasure of half-way erased sector). (0611ms, 0894ms total)
- T1BA4 078:628 Skip optimizations disabled for second try. (0611ms, 0894ms total)
- T1BA4 078:628 -- -------------------------------------- returns -3 (0611ms, 0894ms total)
- T1BA4 078:628 returns 0xFFFFFEF6 (0612ms, 0895ms total)
Thanks!