- Newer Version 16Sep24: Here are MicroPython v1.23 binaries for P2Eval and SimpleP2 boards with P2 clock
set at 252 MHz, now with working I2C and SPI
-
Note: Main differences between these boards are pins uses for uSD
card access and pins used for error leds
- Previous version from 02Jun24 is still here
(Note: 08Sep24 Version had very bad SPI bug, appears fixed now.)
-
SimpleP2 board:
-
P2Eval Board (or equivalent)
[make sure flash switch is off to load]:
- Example Micropython scripts for P2
- Info on using MicroPython for P2
-
Much thanks to Eric Smith (ersmith in P2 forum) for creating this version of micropython
-
My contribution was getting it up to the current version 1.23.0 (thanks again to Eric Smith and also Roger Loh (rogloh) for the assistance)
-
The usual way to interact is via a terminal window on a computer. If you use flexprop to load the binary, this window will automatically appear after loading
-
You then get the REPL interactive interface
- If you have a version with USB from
above, you can use a USB keyboard to enter text instead of the
computer keyboard
- if you have a version with VGA from the
above, you can use a VGA monitor to to see the output, instead of
terminal window
- if you have a version with WiFi from
above, you can use putty to have a wireless terminal interface with
P2 WiFi module configured to act as telnet interface
-
Some things you can do there:
- To see files on uSD (you probably want a
FAT formatted uSD to be installed) do: "import os" and then
"os.listdir()"
- You probably want this
version of pye (a text editor) to be on your uSD, then can do
"import pye" and then "pye.pye("test.txt") to edit a file on uSD
-
I've added a module named "p2" to add special functionality
- You can do "import p2" and then "print(dir(p2))" to get a sense of what is there
- Some things include smartpin commands like pinh(pin), servo control, ping control, ADC, DAC, feedback servo input, and some others
- Info on building RiscvP2, needed to compile this version of MicroPython for P2
-
Here are the files that modify the Riscv installation at /opt/riscv for P2
-
This is with Ubuntu 22.04 and this folder is in the home folder
-
I do "sudo make install" there to make it work
-
First though, you need to download gcc version 13.2.0 (xPack GNU RISC-V
Embedded GCC, 64-bit) and install it into /opt/riscv
-
Easier: You can also just download my Ubuntu /opt/riscv
folder here
- Info on building this Micropython v1.23.0 for P2
- 16Sep24:
Here is the
latest build folder for download (~200 MB)
- Note: 08Sep24 version had very bad SPI bug, appears fixed now.
- This with for Ubuntu and in the home folder
- Navigate to the /ports/riscvp2 folder to build for P2
-
I do "make clean" and then "make V=1" to build it
-
With latest version of FlexProp, you can use either the .elf or the .bin
binary output files