I'm attempting to put together a template solution file for the RP2040 that will at a minimum, compile cleanly and load onto the device. I've gone through the process within Embedded Studio to create a new solution and selected the RP2040 as the target processor and then Embedded Studio has generated a shell program. The shell program does compile cleanly but it fails when I attempt to load the binary onto the device.
This is the output when I connect my J-Link EDU Mini:
Display All
To me, all looks good at this point. But here is the additional output when I attempt to download the binary to the target device:
Display All
So, am I missing something or am I doing something wrong? Any help will be appreciated.
Jim...
P.S. I'm using the Sparkfun MicroMod ATP Carrier board with the MicroMod RP2040 module for my development. I'm not sure if this has anything to do with why the flash is not being programmed so I'm comparing this setup with the Pico module to see if there's any explainable difference.
This is the output when I connect my J-Link EDU Mini:
Source Code
- Connecting ‘J-Link’ using ‘USB’
- Connecting to target using SWD
- Loaded C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.40c/bin/JLink_x64.dll
- Firmware Version: J-Link EDU Mini V1 compiled Feb 18 2021 11:25:23
- DLL Version: 6.98b
- Hardware Version: V1.00
- Target Voltage: 3.296
- Device "RP2040_M0_0" selected.
- ConfigTargetSettings() start
- J-Link script: ConfigTargetSettings()
- ConfigTargetSettings() end
- InitTarget() start
- InitTarget() end
- Found SW-DP with ID 0x0BC12477
- SWD speed too high. Reduced from 4000 kHz to 2700 kHz for stability
- DPIDR: 0x0BC12477
- 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: 0xE00FF000
- 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] @ E00FF000
- ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
- ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
- ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
Source Code
- Preparing target for download
- Executing Reset script TargetInterface.resetAndStop()
- Reset: Halt core after reset via DEMCR.VC_CORERESET.
- Reset: Reset device via AIRCR.SYSRESETREQ.
- Downloading ‘Executable_1.elf’ to J-Link
- Programming 1.9 KB of addresses 10000000 — 1000079d
- J-Link: Flash download: Bank 0 @ 0x10000000: 1 range affected (65536 bytes)
- J-Link: Flash download: Total: 0.216s (Prepare: 0.068s, Compare: 0.044s, Erase: 0.011s, Program & Verify: 0.087s, Restore: 0.003s)
- J-Link: Flash download: Program & Verify speed: 735 KB/s
- Programming failed @ address 0x10000000 (block verification error)
- Failed to restore target. RAMCode never stops
- Download successful
- Cannot read register 20 (CFBP) while CPU is running
- CPU is not halted
Jim...
P.S. I'm using the Sparkfun MicroMod ATP Carrier board with the MicroMod RP2040 module for my development. I'm not sure if this has anything to do with why the flash is not being programmed so I'm comparing this setup with the Pico module to see if there's any explainable difference.
The post was edited 1 time, last by JimInCA ().