Releases: RetiredWizard/PyDOS
Command enhancements, memory optimizations, improved abstractions for WiFi and RGB LEDs
- Many tweaks, bug fixes and memory optimizations
- Restructure PyBasic to more closely match cPython version and improve memory management
- Prevent crash of PyBasic when Pydos_hw not present and/or no sound pin defined
- Add fractal.bas as additional example basic program
- Allow text literals in DOS prompt
- Modify maximum recursion depth (wild card length) calculation
- Added recursive options for DIR, DEL and RMDIR
- Added DELTREE synonym for RMDIR/S
- Added MD,RD synonums for MKDIR,RMDIR
- Added PATH environment variable for PyDOS program file search
- Added LIB environment variable for python library search
- Added support for arbitrary number of SPI buses in Pydos_hw
- Enhanced search for correct I2C bus used through Pydos_hw
- Added Neopixel/DOTSTAR abstraction layer for PyDOS (pydos_rgb) for CircuitPython/Micropython unified API
- Added Wifi abstraction layer for PyDOS (pydos_wifi) for CircuitPython/Micropython unified API
- Transition to new settings.toml file for Wifi and Pystack parameters
- Added XCOPY external program to perform recursive and verified copies
Board Configurations, Autoexec, Prompt, Pexec
Moved logic to deal with GPIO differences between boards to pydos_bcfg.py file which
gets customized for the specific board when setup.bat is run
Updated PyDOS so it will at least load in CPYTHON on a Windows PC
Type command now displays marker character when encountering invalid utf-8 chars
Added support for PyDOS autoexec.bat file
Added DOS PROMPT command support
Added non "DOS" command pexec to allow command line execution of python statements
Modified what several external programs (PyBasic, rgbblink, rgbset, rgbrainbow) do
when imported to work better with new pexec PyDOS command
SETUP.bat program gives option to create .env file for boards with WiFi
New simple menu system entry (3) for launching Adventure on memory limited boards
Line editor renamed from edit to edlin and fullscreen editor renamed from fsedit to edit
Eliza basic program no longer ignores lower case input
External programs that access Wifi changed from using secrets.py file to .env file
Wifi_finance external program modified to load small portion of web site into memory at a time
setdate, settime, temperature external programs generalized to run under circuitpython
sdmount external program checks mount point for valid directory improving stability
Boards tested on:
Adafruit Feather ESP32-S2 (CircuitPython)
Adafruit Feather ESP32-S3 (C)
Adafruit Feather Huzzah32 (C*)
Adafruit Feather RP2040 (CircuitPython, MicroPython)
Arduino Nano Connect RP2040 (C,M)
Cytron Maker Pi RP2400 (C,M)
ESP32-S3-DevKitC-1 (C,M)
ItsyBitsy nRF52840 (C*)
ItsyBitsy RP2040 (C,M)
KB2040 (C)
LILYGO T8-ESP32-S2 TFT (C)
Pico (C,M)
Pico w/Cytron Maker Pi Pico (C,M)
QT Py ESP32-S2 (C)
QT Py ESP32-C3 (C*,M*)
QT PY RP2040 (C,M)
Raspberry Pi Zero2W (C**)
RP2040 Plus (C,M)
SparkFun Pro nRF52840 Mini - Bluetooth (C*)
SparkFun Thing Plus RP2040 (C,M)
SparkFun Thing Plus SAMD51 (C*)
Swan_r5 (stm32L4+) (C)
Teensy 4.1 (NXM ARM Cortex-M7) (C,M)
TinyPico ESP32 PICO-D4 (M)
Trinkey QT RP2040 (C)
UM Feather S2 (C,M)
UM Feather S3 (C,M)
*Limited RAM and/or Flash reduced available features of PyDOS
** Rasberry Pi version of Circuitpython is still Beta. USB operations are unstable and
only a fraction of the hardware is currently accessible via Circuitpython
Board Generalizations and PyDOS improvments
- The PyDOS.py file is now all that's needed to load a generic instance of PyDOS
- The PyDOS setup.bat file has been streamlined
- A bug parsing blank lines in batch files was resolved
- The logic to identify GPIO functions for different microcontrollers has been put in the pydos_hw.py file so it doesn't have to be duplicated across multiple utility programs
- PyDOS now calculates the maximum wildcard length as determined by the Circuitpython or Micropython maximum recursion depth. Building custom *python images can increase this limit
- Many of the external demonstration programs now run across all the supported Microcontroller boards
- A new external program (pydospins.py) displays the GPIO pins being used for audio out and I2C.
- Added a work around to set the GPIO pin being used for audio output on ESP32-S3 boards low since Circuitpython is now defaulting pins high on those boards.
- Directory listings and environment variables are now displayed sorted alphabetically
PyDOS has been tested on the following microcontroller boards:
CircuitPython
Adafruit ESP32-S2 Feather
Adafruit Feather RP2040
Arduino Nano Connect RP2040
Cytron Maker Pi RP2040
ESP32-S3-DevKitC-1
Unexpected Maker Feather ESP32-S2
RP2040 Plus
Raspberry Pi Pico
SparkFun Thing Plus RP2040
Trinkey QT RP2040
QT Py ESP32-S2
KB2040
Broadcom (Pi Zero2w)
MicroPython
Arduino Nano Connect RP2040
Adafruit Feather RP2040
Unexpected Maker TinyPico ESP32 PICO-D4
ESP32-S3-DevKitC-1
RP2040 Plus
Raspberry Pi Pico
SparkFun Thing Plus RP2040
What's Changed
- PyDOS updates and board generalizations by @RetiredWizard in #8
Full Changelog: v0.076...v1.07
Early Broadcom (Raspbery Pi SBC) support
Minor bug fixes and the start of support for running PyDOS on "bare metal" Raspberry Pi computers.
binary SD card image for Raspberry Pi Zero 2W build of Circuitpython attached to this release.
What's Changed
- v1.02 Code cleanup by @RetiredWizard in #6
Full Changelog: v1.0...v1.03
ESP32S2 support and Error Handling
PyDOS no longer crashes to REPL when a python script has an error.
ESP32S2 microcontroller has been tested against PyDOS and many of the external routines.
To run PyDOS on CircuitPython on an ESP32S2 board without memory and recursion limitation problems a custom CircuitPython UF2 file must be built with the MICROPY_ENABLE_PYSTACK parameter disabled and the MICROPY_STACKLESS parameter enabled.
What's Changed
- Esp32 s2 updates by @RetiredWizard in #4
Full Changelog: v0.9...v1.0
Keyboard Abstraction - Keyboard FeatherWing
Added pydos_ui module to handle keyboard (and possibly screen in the future) I/O. This release of PyDOS supports the use of the Keyboard FeatherWing by @arturo182 and @solderparty.
PyBasic has continued to evolve and has had several syntax additions including the IF-THEN-ELSE statement generalization and the proper handling of loop variables on NEXT statements.
What's Changed
- Integrate keyboard feather wing by @RetiredWizard in #2
Full Changelog: v.0841c...v0.9
Multi Platform/Board release
The repository has been reorganized to support both Circuit Python and Micropython specific programs. PyBasic was tweaked again so that it could be run directly from the REPL (eliminating the need for the second version PyBasicx) allowing larger basic programs to run (adventure).
Several of the external programs have been generalized to function on both Micropython and Circuit Python.
Additional folders have been created for board (Feather, Nano, ThingPlus, etc...) specific programs.
A setup.bat file was created in the root folder which when run will prompt the user to indicate Circuit Python or Micropython and then the board they are using. The setup batch file will then copy the programs and libraries appropriate for the user's platform to the root folder of the Microcontroller flash.
A new external program called "runasthread" has been added. This program will attempt to launch a python program on the second RP2040 core. Circuit Python does not yet support threading and it's still experimental on Micropython so it's not difficult to crash the microcontroller using this program. I have not found a way to kill a thread started on the second core so be sure any threads you launch will shutdown on their own or monitor a global variable or thread.lock to respond to a shutdown request (see the badblink.py for an example).
There is some initial WiFi routines for the Arduino Nano Connect included in this release. Unfortunately, the USB connector snapped off my board so progress on the networking front for PyDOS is currently on hold.
Multi Platform/Board release - fixes
Minor bug fixes in setup.bat, PyBasic.py, program.py, rgbblink.py and stopthread.py. Tweaked fileview.py to run under Circuit Python
CircuitPython Support
PyDOS will now run on microcontroller boards running either CircuitPython or Micropython.
If you are going to run PyDOS under CircuitPython, it's highly recommended that you disable the PyStack and compile a custom CircuitPython UF2 image. You can find instructions on the youtube video at https://www.youtube.com/watch?v=sWy5_B3LL8c or Adafruit's website at https://learn.adafruit.com/building-circuitpython/build-circuitpython?gclid=EAIaIQobChMI5cf10MyZ8gIVlD6tBh2nKQUKEAAYASAAEgLOGvD_BwE
Running PyDOS on CircuitPython results in more available memory and virtually eliminates problems running adventure in PyBasic, As PyDOS adds features, running Adventure under Micropython has gotten much more difficult so this release includes a version of PyBasic that will load directly from the REPL. Simply type "import PyBasicx" at the REPL prompt.
#CircuitPythonDay2021
PyDOS update
PyDOS:
OS environment variables _scrWidth and _scrHeight have been created and default to 80 and 23
TYPE[/P] command modified to display a single line at a time rather than reading in the entire file and then printing the entire file. The
/P command switch instructs the TYPE command to pause after each screen is displayed. The TYPE command uses the _scrWdith and
_scrHeight environment variables to determine the length of lines and number of lines to display on a screen.
DIR command modified to determine the number of columns in the /W (wide) display format, the spacing of the columns in the normal
display format and the number of lines to display before pausing when the /P (pause) command switch is used from the new
_scrWidth and _scrHeight environment variables
Quoted strings can now be passed to Python scripts run from the DOS prompt
Adventure:
Adventure had a bug fixed with the Enter/Leave command logic