Dear Support,
Thanks for the great products. And thanks in-advance for any suggestions.
I need help with the cmake I used to rebuild the firmware for Pimoroni Pico Plus2:
When I rebuild the firmware for the Plus2 board, I get this banner:
MicroPython v1.20.0-2504.g9fe842956 on 2025-05-02; Pimoroni Pico Plus 2 (PSRAM) with RP2350. The cppmem module is available. However I am not seeing the full 8MB (like found when using the pimoroni-supplied firmware.uf2 file
import micropython
micropython.mem_info()
stack: 468 out of 12032
GC: total: 482624, used: 16992, free: 465632
No. of 1-blocks: 359, 2-blocks: 58, max blk sz: 64, max free sz: 29090
To test cppmem, I ran this command:
cppmem.set_mode(cppmem.MICROPYTHON) (which is also performed by boot.py)
neither give an error. So obviously I missed a build item.
Here is the main cmake:
Note: (1) I inserted the statements from mpconfigvariant_PSRAM.cmake
(2) I commented-out the enable_ulab() line
(3) I commented the INCLUDE for the pimoroni_pico. Earlier I tried to include it
but the section would not build since some of the SRC directories were missing.
micropython-pico2.cmake
set(PIMORONI_PICO_PATH /home/lab/Documents/pimoroni-pico)
####include(${CMAKE_CURRENT_LIST_DIR}/../pimoroni_pico_import.cmake)
include_directories(${PIMORONI_PICO_PATH}/micropython)
Override the MicroPython board name
list(APPEND MICROPY_DEF_BOARD
“MICROPY_HW_ENABLE_PSRAM=1”
“MICROPY_GC_SPLIT_HEAP=1”
“MICROPY_HW_BOARD_NAME="Pimoroni Pico Plus 2 (PSRAM)"”
)
list(APPEND CMAKE_MODULE_PATH “${PIMORONI_PICO_PATH}/micropython”)
list(APPEND CMAKE_MODULE_PATH “${PIMORONI_PICO_PATH}/micropython/modules”)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
#include(micropython-common)
#enable_ulab()
C++ Magic Memory
include(cppmem/micropython)
Disable build-busting C++ exceptions
include(micropython-disable-exceptions)
Kevin