Folder structure:
|
|- micropython # Clone the MicroPython repo here
| |- ports
| |- rp2
| |- build # Create this build folder
| |- modules # Place all py files from pico_files/modules/
|
|- PicoCalc-micropython-driver # Driver modules
| |- picocalcdisplay
| |- vtterminal
|
|- Any additional modules (e.g., ulab, etc.)
Copy all files from pico_files/modules/ to micropython/ports/rp2/modules/ folder Build MicroPython as usual, while including user modules:
cd micropython/ports/rp2
git submodule update --init --recursive
mkdir build && cd build
cmake .. \
-DUSER_C_MODULES="Path/To/PicoCalc-micropython-driver/picocalcdisplay/micropython.cmake;Path/To/PicoCalc-micropython-driver/vtterminal/micropython.cmake" \
-DMICROPY_BOARD=[TARGET_BOARD]Supported TARGET_BOARD values:
RPI_PICORPI_PICO2RPI_PICO2_W
(Other boards are untested.)
The uf2 file already included file system and main.py, boot.py. Just flash it and remove the usb link to the pico module, tune on the picocalc.(The auto reboot seems to be broken, after copy finished, the usb driver won't disappear. That's ok, let me check how to fix it >_<>)
-
NO FILE COPY NEEDED!! The old file system will be destroyed!
-
picocalc_micropython_ulab_eigenmath_withfilesystem_pico2.uf2 (you could use it with your pico 2 or pico 2w module) Included ulab, eigenmath port (https://github.com/zenodante/eigenmath_micropython), make picocalc a full function advanced calculator!
-
picocalc_micropython_withfilesystem_pico.uf2 (for pico) Only REPL, code editor
-
picocalc_micropython_withfilesystem_pico2.uf2 (for pico 2) Only REPL, code editor
-
picocalc_micropython_withfilesystem_pico2w.uf2 (for pico 2w) Only REPL, code editor
the filesystem in the pico module is safe, it won't be overwrite during your firmware upgrade.
- picocalc_micropython_NOfilesystem_pico.uf2
- picocalc_micropython_NOfilesystem_pico2.uf2
- picocalc_micropython_NOfilesystem_pico2w.uf2
- Flash the compiled
.uf2to your Pico as usual. - Place only
main.py,root.pyfrom pico_files/root/ in the pico root directory. - Delete all existing
.pyfiles in/lib(e.g.,fbconsole.py,picocalc.py, etc.).These modules are already frozen into the firmware!
Using Thonny is the easiest method for file transfer and interaction.
If the flash nuke is needed, flash as normal, however DO NOT UNPLUG until the on-board light flashes to indicate it is done.
Fully functional and tested. Works seamlessly with vt100 terminal emulator.
- C module supports high-speed 1/2/4/8-bit LUT drawing and 16-bit 565RGB.
- Python wrapper uses
framebufinterface and handles display swapping. - Display updates now run on
core1for a smoother REPL experience.
- Using ctrl + u to capture screen buffer into your sd card. currently only at the root of the sd card The Data is in raw type. For default 16 color framebuff copy, it is 50kB each. Left pixel in high 4 bit. Standard vt 100 16 color map may use to rebuild the image. I will upload a python script to convert it.
Not available yet.
The wifi chip connect to the rp2040/2350 via spi1, which shared with LCD. As we autorefresh the lcd on core1, it is necessary to stop the auto refresh function first via the function: pc_terminal.stopRefresh(), after wifi finish its work, use pc_terminal.recoverRefresh() to recover the LCD refreshing.
You can launch the built-in Python code editor by calling:
edit("abc.py")Using eigenmath
import eigenmath
em = eigenmath.EigenMath(300*1024) #the internal heap size, eigenmath need A LOT OF RAM. It will be released after you delete the em
em.statue() #show current resource statue
em.run("d(sin(x),x)") #do math calculation, check the eigenmath manual for more details
em.reset() #reset the internal sources
Editor is based on robert-hh/Micropython-Editor
Now with keyword highlighting support.
The REPL and editor both run inside a VT100 terminal emulator, based on
ht-deko/vt100_stm32, with bug fixes and additional features.
- robert-hh/Micropython-Editor
- ht-deko/vt100_stm32
sdcard.pyis from the official MicroPython repository: micropython-lib/sdcard.pyflash_nuke.uf2is from the Raspberry Pi Documentation: Resetting Flash Memory
