Just letting the forums know that there is another successful MicroPython port for the PicoCalc.
Located here: GitHub - zenodante/PicoCalc-micropython-driver, it is aimed primarily at the Pico 2, but does also support the Pico 1.
I have just added support for the Pimoroni Pico Plus 2 as well, namely the 8MB of onboard PSRAM, and the PR should be up later tonight.
I have included SD support as well.
We have been doing most of the work in the software-development chat in the discord, so you could potentially be more updated there, the main dev is gg05580.
Yea we’re adding in sdpcard.py at this point, along with two basic functions for management, they should be in today or tomorrowish.
Theyre being added to have functionality similar to that of the Picomite firmware, where the SD is mounted on boot.
Main dev is aiming for vt100 coverage rather than 16-color.
PSRAM support is split between the latest PR and a future one, but a preliminary bin for it should be available on the same timeline as the SD functions.
Nevermind I misunderstood, PSRAM support specifically for the Pimoroni boards is done, I will pull a base Pico 2 out and begin working on the internal PSRAM support today.
Update on the Audio and PSRAM:
Audio:
According to the Pico 2W schematics the WiFi definitely does not overlap with the speakers, although they are on consecutive pins. GPIO 23-25 are devoted to the WiFi on the pico, while GPIO 26 and 27 are the left and right speaker respectively which matches the schematics.
EDIT:
The PWM pins used for audio do overlap the ADC though.
PSRAM: TLDR The external PSRAM is not really able to be “used” to extend Micropython’s RAM due to its differences from the Pimoroni PSRAM.
From what I understand the Pimoroni PSRAM utilizes being piggybacked on the device flash to essentially function as a “RAM disk” which can be used to mostly seamlessly expand the existing RAM. The external clockwork PSRAM however is unable to do this, and as a result has to be used explicitly.
Finally, download pimoroni-pico-rp2350/pimoroni_pico_import.cmake at main · pimoroni/pimoroni-pico-rp2350 · GitHub into path/to/micropython/ports/rp2/. It should then be included by copying the following to path/to/micropython/ports/rp2/CmakeLists.txt. Which will include the import, as well as enabling the device PSRAM. NOTE: It should be placed after pico_sdk_init(). NOTE TWO: PSRAM support was only merged into micropython around three days ago, so you must clone/pull the most recent version for the following code to run.
cd /path/to/micropython/ports/rp2/
mkdir build && cd build
It can then be compiled using something along the lines of:
cmake .. -DUSER_C_MODULES="/absolute/path/to/PicoCalc-Micropython/micropython.cmake;/absolute/path/to/micropython-cppmem/micropython.cmake" -DMICROPY_BOARD=PIMORONI_PICO_PLUS2
make
As it will mix-in both the cppmem library nessecary for the PSRAM, and the Picocalc drivers.
As an update to the build instructions for the latest version changing the structure slightly, you must now declare vtterminal and picocalcdisplay as separate user modules, it just changed the cmake arguments slightly.
Updated command would be something like:
cmake .. -DUSER_C_MODULES="/absolute/path/to/PicoCalc-Micropython-driver/picocalcdisplay/micropython.cmake;/absolute/path/to/PicoCalc-Micropython-driver/vtterminal/micropython.cmake;/absolute/path/to/micropython-cppmem/micropython.cmake" -DMICROPY_BOARD=PIMORONI_PICO_PLUS2
make
Just be careful, it is case sensitive and I could’ve typed this post up wrong.
It boots into the REPL, which is the “Read Evaluate Print Loop” (essentially a fancy python idle).
As such, code will run line by line as you enter it.
If you want more traditional programs you can use the new editor functionality, or write them on a connected device and upload them.
Updated to the latest firmware from yesterday. I am using the RPI_PICO core board, but when I execute the edit command in REPL, it keeps freezing, and I can only restart picocalc.
Laika, I’m trying to layer your additions on top of the process described by S34N’s script, as you suggested, but needed some clarification (giving #s to keep tracking issues easier):
(removed, figured it out)
When you say…
…you mean copy all the subdirs and contents, plus manifest_pico2.py into the folder you cite, is that correct?
In your cmake launch line, per…
You have a reference to “/absolute/path/to/PicoCalc-Micropython/micropython.cmake” but there’s no such repo/directory mentioned previously, and if you meant zenodante/PicoCalc-micropython-driver repo, there’s no micropython.cmake at root of repo any longer.
I suspect this is why I still get the board ID rejected issuing that cmd, saying it doesn’t know the PIMORONI_PICO_PLUS2 board, and then stopping.
That’s all, just wanted to confirm #2, and get the right answer for #3. Any help/info you can provide is greatly appreciated! Thanks!