What crystal are you using? We only recommend the Abracon one.I have made a custom RP2040 board, only the bare minimum components to boot up the RP2040 is populated. Used 12MHz crystal as clock source and W25Q16JVSSIQ as flash memory. Boot button is provided in the board, so pressing it and powering it up throuh USB brings up the "RPI-RP2" device in windows file explorer and I'm able to drag and drop firmware to run a blink code.
The issue is when I try to upload the ode using Rpi Debug probe (CMSIS-DAP), errors are being shown for the flash memory.
In order to make sure that my openocd and Debug probe is working, I tried to flash a Rpi-pico with the same setup. And that was succesful.
I'm attaching the terminal commands and output for both the cases below.So why is this happening, any ideas n how to rectify it?Code:
working stuff with rpi-pico----------------------------C:\Users\KRISHNA_CHANDRAN>"C:\Users\KRISHNA_CHANDRAN\AppData\Local\Arduino15\packages\rp2040\tools\pqt-openocd\2.2.0-d04e724/bin/openocd" -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -s "C:\Users\KRISHNA_CHANDRAN\AppData\Local\Arduino15\packages\rp2040\tools\pqt-openocd\2.2.0-d04e724/share/openocd/scripts" -c "adapter speed 500" -c "program {C:\Users\KRISHNA_CHANDRAN\AppData\Local\Temp\arduino\sketches\9ED78EB152CD2F47A33494D450D6A770/Blink.ino.elf} verify" -c "reset init" -c "resume" -c "exit""C:\Users\KRISHNA_CHANDRAN\AppData\Local\Arduino15\packages\rp2040\tools\pqt-openocd\2.2.0-d04e724/bin/openocd" -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -s "C:\Users\KRISHNA_CHANDRAN\AppData\Local\Arduino15\packages\rp2040\tools\pqt-openocd\2.2.0-d04e724/share/openocd/scripts" -c "adapter speed 500" -c "program {C:\Users\ "C:\Users\KRISHNA_CHANDRAN\AppData\Local\Arduino15\packages\rp2040\tools\pqt-openocd\2.2.0-d04A_CHANDRAN\AppData\Local\Arduino15\packages\rp2040\tools\pqt-openocd\2.2.0-d04e724/share/openocd/scripts" -c "adapter spEB152CD2F47A33494D450D6A770/Blink.ino.elf} verify" -c "reset init" -c "resume" -c "exit"Open On-Chip Debugger 0.12.0-g4d87f6dca (2023-08-24-20:49)Licensed under GNU GPL v2For bug reports, read http://openocd.org/doc/doxygen/bugs.htmlInfo : Hardware thread awareness createdInfo : Hardware thread awareness createdadapter speed: 500 kHzInfo : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6632891E3539C30Info : CMSIS-DAP: SWD supportedInfo : CMSIS-DAP: Atomic commands supportedInfo : CMSIS-DAP: Test domain timer supportedInfo : CMSIS-DAP: FW Version = 2.0.0Info : CMSIS-DAP: Interface Initialised (SWD)Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0Info : CMSIS-DAP: Interface readyInfo : clock speed 500 kHzInfo : SWD DPIDR 0x0bc12477, DLPIDR 0x00000001Info : SWD DPIDR 0x0bc12477, DLPIDR 0x10000001Info : [rp2040.core0] Cortex-M0+ r0p1 processor detectedInfo : [rp2040.core0] target has 4 breakpoints, 2 watchpointsInfo : [rp2040.core1] Cortex-M0+ r0p1 processor detectedInfo : [rp2040.core1] target has 4 breakpoints, 2 watchpointsInfo : starting gdb server for rp2040.core0 on 3333Info : Listening on port 3333 for gdb connections[rp2040.core0] halted due to debug-request, current mode: ThreadxPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00[rp2040.core1] halted due to debug-request, current mode: ThreadxPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00** Programming Started **Info : Found flash device 'win w25q16jv' (ID 0x001540ef)Info : RP2040 B0 Flash Probe: 2097152 bytes @0x10000000, in 32 sectorsInfo : Padding image section 1 at 0x10011180 with 128 bytes (bank write end alignment)Warn : Adding extra erase range, 0x10011200 .. 0x1001ffff** Programming Finished **** Verify Started **** Verified OK **[rp2040.core0] halted due to debug-request, current mode: ThreadxPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00[rp2040.core1] halted due to debug-request, current mode: ThreadxPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00Not working stuff with custom rp-2040 board.---------------------------------------C:\Users\KRISHNA_CHANDRAN>"C:\Users\KRISHNA_CHANDRAN\AppData\Local\Arduino15\packages\rp2040\tools\pqt-openocd\2.2.0-d04e724/bin/openocd" -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -s "C:\Users\KRISHNA_CHANDRAN\AppData\Local\Arduino15\packages\rp2040\tools\pqt-openocd\2.2.0-d04e724/share/openocd/scripts" -c "adapter speed 500" -c "program {C:\Users\KRISHNA_CHANDRAN\AppData\Local\Temp\arduino\sketches\9ED78EB152CD2F47A33494D450D6A770/Blink.ino.elf} verify" -c "reset init" -c "resume" -c "exit"Open On-Chip Debugger 0.12.0-g4d87f6dca (2023-08-24-20:49)Licensed under GNU GPL v2For bug reports, read http://openocd.org/doc/doxygen/bugs.htmlInfo : Hardware thread awareness createdInfo : Hardware thread awareness createdadapter speed: 500 kHzInfo : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6632891E3539C30Info : CMSIS-DAP: SWD supportedInfo : CMSIS-DAP: Atomic commands supportedInfo : CMSIS-DAP: Test domain timer supportedInfo : CMSIS-DAP: FW Version = 2.0.0Info : CMSIS-DAP: Interface Initialised (SWD)Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0Info : CMSIS-DAP: Interface readyInfo : clock speed 500 kHzInfo : SWD DPIDR 0x0bc12477, DLPIDR 0x00000001Info : SWD DPIDR 0x0bc12477, DLPIDR 0x10000001Info : [rp2040.core0] Cortex-M0+ r0p1 processor detectedInfo : [rp2040.core0] target has 4 breakpoints, 2 watchpointsInfo : [rp2040.core1] Cortex-M0+ r0p1 processor detectedInfo : [rp2040.core1] target has 4 breakpoints, 2 watchpointsInfo : starting gdb server for rp2040.core0 on 3333Info : Listening on port 3333 for gdb connections[rp2040.core0] halted due to debug-request, current mode: ThreadxPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00[rp2040.core1] halted due to debug-request, current mode: ThreadxPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00** Programming Started **Info : SWD DPIDR 0x0bc12477, DLPIDR 0x00000001Error: Failed to read memory at 0x20010008Error: Could not allocate stack for flash programming code
Statistics: Posted by jamesh — Wed Mar 27, 2024 1:48 pm