硬件上很简单,8脚SOP Flash应该每个人都会更换,更换后再上电就进入DFU,在DFU里面随便放个固件就正常,当然,MicroPython总是认为只有2M Flash.
修改SDK(.../pico-sdk/src/rp2_common/pico_standard_link/memmap_default.ld).
MEMORY
{
FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 16384k
RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k
SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k
SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k
}
修改调试配置(launch.json):
{
"version": "0.2.0",
"configurations": [
{
"name": "Pico Debug",
"cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
// This may need to be "arm-none-eabi-gdb" for some previous builds
"gdbPath" : "gdb-multiarch",
"device": "RP2040",
"configFiles": [
// This may need to be "interface/picoprobe.cfg" for some previous builds
"interface/cmsis-dap.cfg",
"target/rp2040.cfg"
],
"openOCDLaunchCommands": ["adapter speed 5000","set _FLASHSIZE 0x200000"],
"svdFile": "${env:PICO_SDK_PATH}/src/rp2040/hardware_regs/rp2040.svd",
"runToEntryPoint": "main",
// Work around for stopping at main on restart
"postRestartCommands": [
"break main",
"continue"
]
}
]
}
MicroPython稍微麻烦一些,需要重新编译固件,不过不建议买更大容量的跑mpy,因为本身用途不大,如果需要网上也有教程.
mpy固件(16MB):https://api.taterli.cyou/files/16MB_RP2.uf2