From 1c69e201aa10853f4b037051a7cbbac60c6f4f85 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Wed, 24 May 2023 19:39:31 +0300 Subject: [PATCH 01/22] Report as 0.3.7 --- source/ljinux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ljinux.py b/source/ljinux.py index 498eb79a..fe3cc536 100644 --- a/source/ljinux.py +++ b/source/ljinux.py @@ -1,11 +1,11 @@ # ------------------------------------- # -# Ljinux 0.3.6-dev # +# Ljinux 0.3.7 # # # # Written on a Raspberry Pi 400 # # Now rapidly approaching your location # # ------------------------------------- # -Version = "0.3.6-dev" +Version = "0.3.7" ndmesg = False # disable dmesg for ram # run _ndmesg from the shell to properly trigger it From 8737e1f2bc31bbc7bed6e3de95c852fd762f4f5d Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Thu, 25 May 2023 01:53:28 +0300 Subject: [PATCH 02/22] Update readme to include 8.2 support notice --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 20d0ee4a..a6979435 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Table of Contents ## Prerequisites and optional hardware -Runs on circuitpython 8.1.X.
+Runs on circuitpython 8.1.X and 8.2.X.
At the moment the supported boards are:
- Raspberry Pi Pico
@@ -36,7 +36,7 @@ At the moment the supported boards are:
- Wemos Lolin S2 Mini
- Seeed XIAO nRF52840 (Sense)
- DFRobot Beetle ESP32-C3
- - M5Stack Timer Camera X WIP
+ - M5Stack Timer Camera X
But it can probably run on many more.
The only real limiting factor should be ram, as about 70k (usable under circuitpython) are needed.
From 7aadd7d89568c63cb78fdeae514facb461fdf94d Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Thu, 25 May 2023 16:21:26 +0300 Subject: [PATCH 03/22] Updates to boardfiles (part 1) --- .../Seeed_XIAO_nRF52840_Sense/pinout.map | 33 +--------- .../adafruit_feather_esp32s2/pinout.map | 7 +-- .../adafruit_feather_esp32s3_tft/pinout.map | 60 +++++++++---------- Boardfiles/adafruit_kb2040/pinout.map | 3 +- Boardfiles/lolin_s2_mini/pinout.map | 5 +- Boardfiles/pimoroni_picolipo_16mb/pinout.map | 1 - Boardfiles/pimoroni_picolipo_4mb/pinout.map | 3 +- Boardfiles/raspberry_pi_pico/pinout.map | 1 - Boardfiles/raspberry_pi_pico_w/pinout.map | 3 +- Boardfiles/waveshare_esp32s2_pico/pinout.map | 5 +- Boardfiles/waveshare_rp2040_zero/pinout.map | 1 - 11 files changed, 42 insertions(+), 80 deletions(-) diff --git a/Boardfiles/Seeed_XIAO_nRF52840_Sense/pinout.map b/Boardfiles/Seeed_XIAO_nRF52840_Sense/pinout.map index 45421ec5..083e5cdf 100644 --- a/Boardfiles/Seeed_XIAO_nRF52840_Sense/pinout.map +++ b/Boardfiles/Seeed_XIAO_nRF52840_Sense/pinout.map @@ -1,37 +1,8 @@ - ,----| |-----. - RESET |1 \---/ (-)| - 3.3v |o usbC ,---| - GND - 3.3v |o | - | - GND |o .---| - VBAT -[ DAC_2 | U1RXD | ADC2 CH7 | RTC | GPIO18 ] A0 |o B (+) o| VBAT -[ DAC_1 | U1TXD | ADC2 CH6 | RTC | GPIO18 ] A1 |o (RESET) o| EN -[ XTAL_32K_N | U0CTS | ADC2 CH5 | RTC | GPIO18 ] A2 |o o| VBUS -[ XTAL_32K_P | U0RTS | ADC2 CH4 | RTC | GPIO18 ] A3 |o o| D13 [ GPIO13 | RTC | ADC2 CH2 | FSPIQ | T13 ] - [ T14 | FSPIWP | ADC2 CH3 | RTC | GPIO18 ] A4 |o (BOOT) o| D12 [ GPIO12 | RTC | ADC2 CH1 | FSPICLK | T12 ] - [ T8 | | ADC2 CH7 | RTC | GPIO18 ] A5 |o B o| D11 [ GPIO11 | RTC | ADC2 CH0 | FSPID | T11 ] - [ FSPICLK | | RTC | GPIO18 ] SCK |o I2C o| D10 [ GPIO10 | RTC | ADC1 CH9 | FSPICS0 | T10 ] - [ FSPID | | RTC | GPIO18 ] MOSI |o [....] o| D9 [ GPIO9 | RTC | ADC1 CH8 | FSPIHD | T9 ] - [ FSPIQ | | RTC | GPIO18 ] MISO |o o| D6 [ GPIO6 | RTC | ADC1 CH5 | | T6 ] - [ FSPIWP | | RTC | GPIO18 ] RX |o ,--------. o| D5 [ GPIO5 | RTC | ADC1 CH4 | | T5 ] - [ MTCK | | RTC | GPIO18 ] TX |o | | o| SCL [ GPIO4 | RTC | ADC1 CH3 | | T4 ] - DEBUG_TX |o | ESP32 | o| SDA [ GPIO3 | RTC | ADC1 CH2 | | T4 ] - | | S2 | | - |O | | O| - `--------------' - ,--- - .| O - GND ,----. - .| O - VSENSOR | GR | - [ NEOPIXEL_POWER | GPIO21 | RTC ] - .| O - SDA [ GPIO3 | RTC | ADC1 CH2 | T3 ] | B | - [ NEOPIXEL | GPIO33 | RTC ] - .| O - SCL [ GPIO4 | RTC | ADC1 CH3 | T4 ] `----' - `--- - - -Adafruit Feather ESP32-S2 +Seeed XIAO nRF52840 (Sense) -SoC : ESP32-S2 +SoC : nRF52840 RAM : 2048KB Storage : SOC (4MB) -USB ports : 1 (of which 0 USB3) Wi-fi : True Bluetooth : True diff --git a/Boardfiles/adafruit_feather_esp32s2/pinout.map b/Boardfiles/adafruit_feather_esp32s2/pinout.map index 45421ec5..3afca884 100644 --- a/Boardfiles/adafruit_feather_esp32s2/pinout.map +++ b/Boardfiles/adafruit_feather_esp32s2/pinout.map @@ -30,8 +30,7 @@ Adafruit Feather ESP32-S2 SoC : ESP32-S2 -RAM : 2048KB -Storage : SOC (4MB) -USB ports : 1 (of which 0 USB3) +RAM : 2368KB +Storage : DIO (4MB) Wi-fi : True -Bluetooth : True +Bluetooth : False diff --git a/Boardfiles/adafruit_feather_esp32s3_tft/pinout.map b/Boardfiles/adafruit_feather_esp32s3_tft/pinout.map index 45421ec5..0277d2b2 100644 --- a/Boardfiles/adafruit_feather_esp32s3_tft/pinout.map +++ b/Boardfiles/adafruit_feather_esp32s3_tft/pinout.map @@ -1,37 +1,37 @@ ,----| |-----. - RESET |1 \---/ (-)| - 3.3v |o usbC ,---| - GND - 3.3v |o | - | - GND |o .---| - VBAT -[ DAC_2 | U1RXD | ADC2 CH7 | RTC | GPIO18 ] A0 |o B (+) o| VBAT -[ DAC_1 | U1TXD | ADC2 CH6 | RTC | GPIO18 ] A1 |o (RESET) o| EN -[ XTAL_32K_N | U0CTS | ADC2 CH5 | RTC | GPIO18 ] A2 |o o| VBUS -[ XTAL_32K_P | U0RTS | ADC2 CH4 | RTC | GPIO18 ] A3 |o o| D13 [ GPIO13 | RTC | ADC2 CH2 | FSPIQ | T13 ] - [ T14 | FSPIWP | ADC2 CH3 | RTC | GPIO18 ] A4 |o (BOOT) o| D12 [ GPIO12 | RTC | ADC2 CH1 | FSPICLK | T12 ] - [ T8 | | ADC2 CH7 | RTC | GPIO18 ] A5 |o B o| D11 [ GPIO11 | RTC | ADC2 CH0 | FSPID | T11 ] - [ FSPICLK | | RTC | GPIO18 ] SCK |o I2C o| D10 [ GPIO10 | RTC | ADC1 CH9 | FSPICS0 | T10 ] - [ FSPID | | RTC | GPIO18 ] MOSI |o [....] o| D9 [ GPIO9 | RTC | ADC1 CH8 | FSPIHD | T9 ] - [ FSPIQ | | RTC | GPIO18 ] MISO |o o| D6 [ GPIO6 | RTC | ADC1 CH5 | | T6 ] - [ FSPIWP | | RTC | GPIO18 ] RX |o ,--------. o| D5 [ GPIO5 | RTC | ADC1 CH4 | | T5 ] - [ MTCK | | RTC | GPIO18 ] TX |o | | o| SCL [ GPIO4 | RTC | ADC1 CH3 | | T4 ] - DEBUG_TX |o | ESP32 | o| SDA [ GPIO3 | RTC | ADC1 CH2 | | T4 ] - | | S2 | | - |O | | O| + BUTTON [ GPIO00 | RTC ] [ CHARGE ] ------- |O C `---` 13 O| LED [ GPIO13 | RTC | ADC2 CH2 | FSPIQ | T13 ] + ,----. RESET |1 usbC[] | + | GR | - [ NEOPIXEL | GPIO33 ] 3.3v |o Rst []I ,---| - GND + | B | - [ NEOPIXEL_POWER | GPIO34 ] 3.3v |o Boot[]2 | - | + `----' GND |o []C .---| - VBAT +[ | U1RXD | ADC2 CH7 | RTC | GPIO18 ] A0 |o (+) o| VBAT +[ | U1TXD | ADC2 CH6 | RTC | GPIO17 ] A1 |o ,--------. o| EN +[ XTAL_32K_N | U0CTS | ADC2 CH5 | RTC | GPIO16 ] A2 |o | | o| VBUS +[ XTAL_32K_P | U0RTS | ADC2 CH4 | RTC | GPIO15 ] A3 |o | E F | o| D13 [ GPIO13 | RTC | ADC2 CH2 | FSPIQ | T13 ] + [ T14 | FSPIWP | ADC2 CH3 | RTC | GPIO14 ] A4 |o | S E | o| D12 [ GPIO12 | RTC | ADC2 CH1 | FSPICLK | T12 ] + [ T8 | | ADC2 CH7 | RTC | GPIO08 ] A5 |o | T P A | o| D11 [ GPIO11 | RTC | ADC2 CH0 | FSPID | T11 ] + [ FSPICLK | | SPI/CPU | GPIO36 ] SCK |o | F 3 T | o| D10 [ GPIO10 | RTC | ADC1 CH9 | FSPICS0 | T10 ] + [ FSPID | | SPI/CPU | GPIO35 ] MOSI |o | T 2 E | o| D9 [ GPIO09 | RTC | ADC1 CH8 | FSPIHD | T9 ] + [ FSPIQ | | SPI/CPU | GPIO37 ] MISO |o | - R | o| D6 [ GPIO06 | RTC | ADC1 CH5 | | T6 ] + [ T2 | | ADC1 CH1 | RTC | GPIO02 ] RX |o | S | o| D5 [ GPIO05 | RTC | ADC1 CH4 | | T5 ] + [ T1 | | ADC1 CH0 | RTC | GPIO01 ] TX |o | 3 | o| SCL [ GPIO41 | CPU | | | MTDI ] + TXD0 |o | | o| SDA [ GPIO42 | CPU | | | MTMS ] + | `--------' | + |O F TFT S3 O| `--------------' ,--- - .| O - GND ,----. - .| O - VSENSOR | GR | - [ NEOPIXEL_POWER | GPIO21 | RTC ] - .| O - SDA [ GPIO3 | RTC | ADC1 CH2 | T3 ] | B | - [ NEOPIXEL | GPIO33 | RTC ] - .| O - SCL [ GPIO4 | RTC | ADC1 CH3 | T4 ] `----' - `--- - - + .| O - SCL [ GPIO41 | CPU | MTDI ] ,-------------------. TFT_I2C_POWER [ GPIO21 | RTC ] + .| O - SDA [ GPIO42 | CPU | MTMS ] | FEATHER | TFT_CS [ GPIO07 | RTC | ADC1 CH6 | T7 ] + .| O - VSENSOR | ESP32-S3 | TFT_DC [ GPIO39 | CPU | | MTCK ] + .| O - GND | TFT | TFT_RESET [ GPIO40 | CPU | | MTDO ] + `--- `-------------------' TFT_BACKLIGHT [ GPIO45 | CPU ] -Adafruit Feather ESP32-S2 -SoC : ESP32-S2 -RAM : 2048KB -Storage : SOC (4MB) -USB ports : 1 (of which 0 USB3) + +Adafruit Feather ESP32-S3 TFT + +SoC : ESP32-S3 +RAM : 2368KB +Storage : DIO (4MB) Wi-fi : True Bluetooth : True diff --git a/Boardfiles/adafruit_kb2040/pinout.map b/Boardfiles/adafruit_kb2040/pinout.map index 59b9251d..f7e425b0 100644 --- a/Boardfiles/adafruit_kb2040/pinout.map +++ b/Boardfiles/adafruit_kb2040/pinout.map @@ -25,7 +25,6 @@ Adafruit KB2040 SoC : RP2040 RAM : 264KB -Storage : QSPI -USB ports : 1 (of which 0 USB3) +Storage : QSPI (8MB) Wi-fi : False Bluetooth : False diff --git a/Boardfiles/lolin_s2_mini/pinout.map b/Boardfiles/lolin_s2_mini/pinout.map index cec384e7..b81d6b51 100644 --- a/Boardfiles/lolin_s2_mini/pinout.map +++ b/Boardfiles/lolin_s2_mini/pinout.map @@ -18,7 +18,6 @@ WeMos Lolin S2 Mini SoC : ESP32-S2 RAM : 2368KB -Storage : SOC (4MB) -USB ports : 1 (of which 0 USB3) +Storage : DIO (4MB) Wi-fi : True -Bluetooth : True +Bluetooth : False diff --git a/Boardfiles/pimoroni_picolipo_16mb/pinout.map b/Boardfiles/pimoroni_picolipo_16mb/pinout.map index a15e4eb3..7ed346e3 100644 --- a/Boardfiles/pimoroni_picolipo_16mb/pinout.map +++ b/Boardfiles/pimoroni_picolipo_16mb/pinout.map @@ -27,6 +27,5 @@ Pimoroni Pico Lipo 16mb SoC : RP2040 RAM : 264KB Storage : Flash (16MB) -USB ports : 1 (of which 0 USB3) Wi-fi : False Bluetooth : False diff --git a/Boardfiles/pimoroni_picolipo_4mb/pinout.map b/Boardfiles/pimoroni_picolipo_4mb/pinout.map index a15e4eb3..d2ceb4f4 100644 --- a/Boardfiles/pimoroni_picolipo_4mb/pinout.map +++ b/Boardfiles/pimoroni_picolipo_4mb/pinout.map @@ -26,7 +26,6 @@ Pimoroni Pico Lipo 16mb SoC : RP2040 RAM : 264KB -Storage : Flash (16MB) -USB ports : 1 (of which 0 USB3) +Storage : Flash (4MB) Wi-fi : False Bluetooth : False diff --git a/Boardfiles/raspberry_pi_pico/pinout.map b/Boardfiles/raspberry_pi_pico/pinout.map index f582e4d0..dff07b69 100644 --- a/Boardfiles/raspberry_pi_pico/pinout.map +++ b/Boardfiles/raspberry_pi_pico/pinout.map @@ -29,6 +29,5 @@ Revision : 1.0 SoC : RP2040 RAM : 264KB Storage : SQPI (2MB) -USB ports : 1 (of which 0 USB3) Wi-fi : False Bluetooth : False diff --git a/Boardfiles/raspberry_pi_pico_w/pinout.map b/Boardfiles/raspberry_pi_pico_w/pinout.map index da965215..42b5b4a5 100644 --- a/Boardfiles/raspberry_pi_pico_w/pinout.map +++ b/Boardfiles/raspberry_pi_pico_w/pinout.map @@ -29,6 +29,5 @@ Revision : 1.0 SoC : RP2040 RAM : 264KB Storage : SQPI (2MB) -USB ports : 1 (of which 0 USB3) Wi-fi : True -Bluetooth : False +Bluetooth : True diff --git a/Boardfiles/waveshare_esp32s2_pico/pinout.map b/Boardfiles/waveshare_esp32s2_pico/pinout.map index 7dd50031..5ee46a27 100644 --- a/Boardfiles/waveshare_esp32s2_pico/pinout.map +++ b/Boardfiles/waveshare_esp32s2_pico/pinout.map @@ -25,7 +25,6 @@ Waveshare ESP32-S2-Pico SoC : ESP32-S2 RAM : 8MB -Storage : SOC (4MB) -USB ports : 1 (of which 0 USB3) +Storage : QIO (4MB) Wi-fi : True -Bluetooth : True +Bluetooth : False diff --git a/Boardfiles/waveshare_rp2040_zero/pinout.map b/Boardfiles/waveshare_rp2040_zero/pinout.map index f5d07241..f3a6c033 100644 --- a/Boardfiles/waveshare_rp2040_zero/pinout.map +++ b/Boardfiles/waveshare_rp2040_zero/pinout.map @@ -35,6 +35,5 @@ Waveshare RP2040-Zero SoC : RP2040 RAM : 264KB Storage : SQPI (2MB) -USB ports : 1 (of which 0 USB3) Wi-fi : False Bluetooth : False From 4f6b98951c733a8169786a14320b3b796f493712 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Fri, 26 May 2023 19:56:36 +0300 Subject: [PATCH 04/22] Pico(w) pintabs updated --- Boardfiles/raspberry_pi_pico/pinout.map | 4 +-- Boardfiles/raspberry_pi_pico_w/pinout.map | 31 +++++++++++++---------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/Boardfiles/raspberry_pi_pico/pinout.map b/Boardfiles/raspberry_pi_pico/pinout.map index dff07b69..a7c9f810 100644 --- a/Boardfiles/raspberry_pi_pico/pinout.map +++ b/Boardfiles/raspberry_pi_pico/pinout.map @@ -3,8 +3,8 @@ [UART0 RX|I2C0 SCL|SPI0 CSn] GP1 (2) |o = usb o| (39) VSYS [ | | ] [ | | ] GND (3) |o led o| (38) GND [ | | ] [ |I2C1 SDA|SPI0 SCK] GP2 (4) |o o| (37) 3V3_EN [ | | ] -[ |I2C1 SCL|SPI0 TX ] GP3 (5) |o o| (36) 3V3(OUT) [ | | ] -[UART1 TX|I2C0 SDA|SPI0 RX ] GP4 (6) |o o| (35) ADC_VREF [ | | ] +[ |I2C1 SCL|SPI0 TX ] GP3 (5) |o [] o| (36) 3V3(OUT) [ | | ] +[UART1 TX|I2C0 SDA|SPI0 RX ] GP4 (6) |o BOOTSEL o| (35) ADC_VREF [ | | ] [UART1 RX|I2C0 SCL|SPI0 CSn] GP5 (7) |o o| (34) GP28 [ ADC2 | | ] [ | | ] GND (8) |o o| (33) GND [ AGND | | ] [ |I2C1 SDA|SPI0 SCK] GP6 (9) |o +---+ o| (32) GP27 [ ADC1 |I2C1 SCL| ] diff --git a/Boardfiles/raspberry_pi_pico_w/pinout.map b/Boardfiles/raspberry_pi_pico_w/pinout.map index 42b5b4a5..e764787b 100644 --- a/Boardfiles/raspberry_pi_pico_w/pinout.map +++ b/Boardfiles/raspberry_pi_pico_w/pinout.map @@ -3,26 +3,29 @@ [UART0 RX|I2C0 SCL|SPI0 CSn] GP1 (2) |o = usb o| (39) VSYS [ | | ] [ | | ] GND (3) |o led o| (38) GND [ | | ] [ |I2C1 SDA|SPI0 SCK] GP2 (4) |o o| (37) 3V3_EN [ | | ] -[ |I2C1 SCL|SPI0 TX ] GP3 (5) |o o| (36) 3V3(OUT) [ | | ] -[UART1 TX|I2C0 SDA|SPI0 RX ] GP4 (6) |o o| (35) ADC_VREF [ | | ] +[ |I2C1 SCL|SPI0 TX ] GP3 (5) |o [] o| (36) 3V3(OUT) [ | | ] +[UART1 TX|I2C0 SDA|SPI0 RX ] GP4 (6) |o BOOTSEL o| (35) ADC_VREF [ | | ] [UART1 RX|I2C0 SCL|SPI0 CSn] GP5 (7) |o o| (34) GP28 [ ADC2 | | ] [ | | ] GND (8) |o o| (33) GND [ AGND | | ] [ |I2C1 SDA|SPI0 SCK] GP6 (9) |o +---+ o| (32) GP27 [ ADC1 |I2C1 SCL| ] [ |I2C1 SCL|SPI0 TX ] GP7 (10) |o |RP2| o| (31) GP26 [ ADC0 |I2C1 SDA| ] [UART1 TX|I2C0 SDA|SPI1 RX ] GP8 (11) |o |040| o| (30) RUN [ | | ] -[UART1 RX|I2C0 SCL|SPI1 CSn] GP9 (12) |o +---+ o| (29) GP22 [ ] -[ | | ] GND (13) |o o| (28) GND [ | | ] -[ |I2C1 SDA|SPI1 SCK] GP10 (14) |o o| (27) GP21 [ |I2C0 SCL| ] -[ |I2C1 SCL|SPI1 TX ] GP11 (15) |o o| (26) GP20 [ |I2C0 SDA| ] -[UART0 TX|I2C0 SDA|SPI1 RX ] GP12 (16) |o o| (25) GP19 [SPI0 TX |I2C1 SCL| ] -[UART0 RX|I2C0 SCL|SPI1 CSn] GP13 (17) |o o| (24) GP18 [SPI0 SCK|I2C1 SDA| ] -[ | | ] GND (18) |o o| (23) GND [ | | ] -[ |I2C1 SDA|SPI1 SCK] GP14 (19) |o DEBUG o| (22) GP17 [SPI0 CSn|I2C0 SCL|UART0 RX] -[ |I2C1 SCL|SPI1 TX ] GP15 (20) |o 0 ooo 0 o| (21) GP16 [SPI0 RX |I2C0 SDA|UART0 TX] +[UART1 RX|I2C0 SCL|SPI1 CSn] GP9 (12) |o +---+ o| (29) GP22 [ | | ] +[ | | ] GND (13) |o DBG o| (28) GND [ | | ] +[ |I2C1 SDA|SPI1 SCK] GP10 (14) |o 1[ooo] o| (27) GP21 [ |I2C0 SCL| ] +[ |I2C1 SCL|SPI1 TX ] GP11 (15) |o ,-------. o| (26) GP20 [ |I2C0 SDA| ] +[UART0 TX|I2C0 SDA|SPI1 RX ] GP12 (16) |o | | o| (25) GP19 [SPI0 TX |I2C1 SCL| ] +[UART0 RX|I2C0 SCL|SPI1 CSn] GP13 (17) |o | | o| (24) GP18 [SPI0 SCK|I2C1 SDA| ] +[ | | ] GND (18) |o | | o| (23) GND [ | | ] +[ |I2C1 SDA|SPI1 SCK] GP14 (19) |o `-------' o| (22) GP17 [SPI0 CSn|I2C0 SCL|UART0 RX] +[ |I2C1 SCL|SPI1 TX ] GP15 (20) |o 0 : : 0 o| (21) GP16 [SPI0 RX |I2C0 SDA|UART0 TX] `-------------' - ^^^ - SWCLK ||| SWDIO - GND | + ,-. DEBUG + O --- SWDIO + O --- GND + O --- SWDCLK + 1`-' + Raspberry Pi Pico W Rev 1.0 Revision : 1.0 From 8167480cc9b11b64cc2ad9c63fdf25c1fa850c02 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Fri, 26 May 2023 21:13:06 +0300 Subject: [PATCH 05/22] Remove that ancient pr template --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 9daeafb9..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1 +0,0 @@ -test From d45bcd1ae0365cd8e238259f1571a661515d51c7 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Sat, 27 May 2023 00:25:42 +0300 Subject: [PATCH 06/22] some work on yds3 pinout --- Boardfiles/yd_esp32_s3_n16r8/pinout.map | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Boardfiles/yd_esp32_s3_n16r8/pinout.map b/Boardfiles/yd_esp32_s3_n16r8/pinout.map index 74bcf9d3..ac8535b2 100644 --- a/Boardfiles/yd_esp32_s3_n16r8/pinout.map +++ b/Boardfiles/yd_esp32_s3_n16r8/pinout.map @@ -1 +1,11 @@ -Pinout pending. +[ FSPIWP | SUBSPIWP | FSPIDQS | ADC2_3 | TOUCH14 | RTC ] GPIO14 + 5V0 + GND + +VCC-GND YD-ESP32-S3 (N16R8) + +SoC : ESP32-S3 +RAM : 8704KB +Storage : DIO (16MB) +Wi-fi : True +Bluetooth : True From 8d152ba6c632ce94ef8023232b14bc62b5a8dd54 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Sun, 28 May 2023 06:23:12 +0300 Subject: [PATCH 07/22] Re-enable m5x --- ...ython_HTTPServer.adafruit_httpserver.other | 0 ...fruit_CircuitPython_NTP.adafruit_ntp.other | 0 ...uitPython_Requests.adafruit_requests.other | 0 .../extras/driver_wifi.driver | 0 .../extras/virtUART.other | 0 .../m5stack_timer_camera_x/pinout.map | 0 Boardfiles/m5stack_timer_camera_x/pintab.py | 13 +++++++++++ .../m5stack_timer_camera_x/settings.toml | 0 .../m5stack_timer_camera_x/pintab.py | 22 ------------------- 9 files changed, 13 insertions(+), 22 deletions(-) rename {DisabledBoardfiles => Boardfiles}/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_HTTPServer.adafruit_httpserver.other (100%) rename {DisabledBoardfiles => Boardfiles}/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_NTP.adafruit_ntp.other (100%) rename {DisabledBoardfiles => Boardfiles}/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_Requests.adafruit_requests.other (100%) rename {DisabledBoardfiles => Boardfiles}/m5stack_timer_camera_x/extras/driver_wifi.driver (100%) rename {DisabledBoardfiles => Boardfiles}/m5stack_timer_camera_x/extras/virtUART.other (100%) rename {DisabledBoardfiles => Boardfiles}/m5stack_timer_camera_x/pinout.map (100%) create mode 100644 Boardfiles/m5stack_timer_camera_x/pintab.py rename {DisabledBoardfiles => Boardfiles}/m5stack_timer_camera_x/settings.toml (100%) delete mode 100644 DisabledBoardfiles/m5stack_timer_camera_x/pintab.py diff --git a/DisabledBoardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_HTTPServer.adafruit_httpserver.other b/Boardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_HTTPServer.adafruit_httpserver.other similarity index 100% rename from DisabledBoardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_HTTPServer.adafruit_httpserver.other rename to Boardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_HTTPServer.adafruit_httpserver.other diff --git a/DisabledBoardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_NTP.adafruit_ntp.other b/Boardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_NTP.adafruit_ntp.other similarity index 100% rename from DisabledBoardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_NTP.adafruit_ntp.other rename to Boardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_NTP.adafruit_ntp.other diff --git a/DisabledBoardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_Requests.adafruit_requests.other b/Boardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_Requests.adafruit_requests.other similarity index 100% rename from DisabledBoardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_Requests.adafruit_requests.other rename to Boardfiles/m5stack_timer_camera_x/extras/Adafruit_CircuitPython_Requests.adafruit_requests.other diff --git a/DisabledBoardfiles/m5stack_timer_camera_x/extras/driver_wifi.driver b/Boardfiles/m5stack_timer_camera_x/extras/driver_wifi.driver similarity index 100% rename from DisabledBoardfiles/m5stack_timer_camera_x/extras/driver_wifi.driver rename to Boardfiles/m5stack_timer_camera_x/extras/driver_wifi.driver diff --git a/DisabledBoardfiles/m5stack_timer_camera_x/extras/virtUART.other b/Boardfiles/m5stack_timer_camera_x/extras/virtUART.other similarity index 100% rename from DisabledBoardfiles/m5stack_timer_camera_x/extras/virtUART.other rename to Boardfiles/m5stack_timer_camera_x/extras/virtUART.other diff --git a/DisabledBoardfiles/m5stack_timer_camera_x/pinout.map b/Boardfiles/m5stack_timer_camera_x/pinout.map similarity index 100% rename from DisabledBoardfiles/m5stack_timer_camera_x/pinout.map rename to Boardfiles/m5stack_timer_camera_x/pinout.map diff --git a/Boardfiles/m5stack_timer_camera_x/pintab.py b/Boardfiles/m5stack_timer_camera_x/pintab.py new file mode 100644 index 00000000..7f418f4b --- /dev/null +++ b/Boardfiles/m5stack_timer_camera_x/pintab.py @@ -0,0 +1,13 @@ +from board import ( + G13, + G4, + BAT_HOLD, + BAT_ADC, +) + +pintab = { + 13: G13, + 4: G4, + 0: BAT_HOLD, + 1: BAT_ADC, +} diff --git a/DisabledBoardfiles/m5stack_timer_camera_x/settings.toml b/Boardfiles/m5stack_timer_camera_x/settings.toml similarity index 100% rename from DisabledBoardfiles/m5stack_timer_camera_x/settings.toml rename to Boardfiles/m5stack_timer_camera_x/settings.toml diff --git a/DisabledBoardfiles/m5stack_timer_camera_x/pintab.py b/DisabledBoardfiles/m5stack_timer_camera_x/pintab.py deleted file mode 100644 index eccacd3e..00000000 --- a/DisabledBoardfiles/m5stack_timer_camera_x/pintab.py +++ /dev/null @@ -1,22 +0,0 @@ -from board import ( - G13, - G4, - BAT_HOLD, - BAT_ADC, -) - -pintab = { - 0: IO0, - 1: IO1, - 2: IO2, - 3: IO3, - 4: IO4, - 5: IO5, - 6: IO6, - 7: IO7, - 8: IO8, - 9: IO9, - 10: IO10, - 20: IO20, - 21: IO21, -} From 3ecb7355b4a3390c5b030f77bbc5322dcbdcca3a Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Wed, 31 May 2023 13:03:58 +0300 Subject: [PATCH 08/22] Update modules --- other/Adafruit_CircuitPython_HTTPServer | 2 +- other/Adafruit_CircuitPython_NTP | 2 +- other/Adafruit_CircuitPython_Requests | 2 +- other/Adafruit_CircuitPython_SD | 2 +- other/Adafruit_CircuitPython_Wiznet5k | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/other/Adafruit_CircuitPython_HTTPServer b/other/Adafruit_CircuitPython_HTTPServer index 2e205dc5..81659339 160000 --- a/other/Adafruit_CircuitPython_HTTPServer +++ b/other/Adafruit_CircuitPython_HTTPServer @@ -1 +1 @@ -Subproject commit 2e205dc54e7fd979a4699b4cacb878819d2ad065 +Subproject commit 81659339326a24f014957b62ac705298775975ce diff --git a/other/Adafruit_CircuitPython_NTP b/other/Adafruit_CircuitPython_NTP index e3d08313..d52104b2 160000 --- a/other/Adafruit_CircuitPython_NTP +++ b/other/Adafruit_CircuitPython_NTP @@ -1 +1 @@ -Subproject commit e3d08313d96eb1a417210da013f69410c272faa3 +Subproject commit d52104b215bde7022615e63daf7020993641b577 diff --git a/other/Adafruit_CircuitPython_Requests b/other/Adafruit_CircuitPython_Requests index 866e79ec..c40cb255 160000 --- a/other/Adafruit_CircuitPython_Requests +++ b/other/Adafruit_CircuitPython_Requests @@ -1 +1 @@ -Subproject commit 866e79eca1a3293395cfaef7a2ec583c49d6a1c1 +Subproject commit c40cb255c9c9bc65d916491707df6a282ee58a0c diff --git a/other/Adafruit_CircuitPython_SD b/other/Adafruit_CircuitPython_SD index 03629299..5537f452 160000 --- a/other/Adafruit_CircuitPython_SD +++ b/other/Adafruit_CircuitPython_SD @@ -1 +1 @@ -Subproject commit 036292995063dbf62a1850e9f50fd0627708271e +Subproject commit 5537f452959b4f2d44742f24808fac7f7098c03d diff --git a/other/Adafruit_CircuitPython_Wiznet5k b/other/Adafruit_CircuitPython_Wiznet5k index 9a4171ed..0fa1ca9e 160000 --- a/other/Adafruit_CircuitPython_Wiznet5k +++ b/other/Adafruit_CircuitPython_Wiznet5k @@ -1 +1 @@ -Subproject commit 9a4171eda600e6cf3173464c5e4dd3d91110a320 +Subproject commit 0fa1ca9ed2c4016a4e294f7feacdfc6161ede963 From 0e4d5e3c0d92f37bf5bdfd5e3d42c156c52f2587 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Thu, 1 Jun 2023 02:05:18 +0300 Subject: [PATCH 09/22] Update m5x definititition --- Boardfiles/m5stack_timer_camera_x/pinout.map | 29 ++++++++++++++++++- .../m5stack_timer_camera_x/settings.toml | 2 +- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Boardfiles/m5stack_timer_camera_x/pinout.map b/Boardfiles/m5stack_timer_camera_x/pinout.map index 595ad2d5..825f2d07 100644 --- a/Boardfiles/m5stack_timer_camera_x/pinout.map +++ b/Boardfiles/m5stack_timer_camera_x/pinout.map @@ -1 +1,28 @@ -No pinout yet available. + ,-----------. + | - | + | - | + | ,---. - | + | | O | . | -- RESET + | `---' - | + | - | + | | + | | + | M 5 | + | | + | | + `-----------' + ^^^^ + |||\ + ||\ `- GND + |\ `-- 5V0 + \`--- G4 [SDA] + `--- G13 [SCL] + +M5Stack Timer Camera X + +SoC : ESP32 +RAM : 8512KB +Storage : QIO (4MB) +Wi-fi : True +Bluetooth : True + diff --git a/Boardfiles/m5stack_timer_camera_x/settings.toml b/Boardfiles/m5stack_timer_camera_x/settings.toml index c0cc34cb..0de5d389 100644 --- a/Boardfiles/m5stack_timer_camera_x/settings.toml +++ b/Boardfiles/m5stack_timer_camera_x/settings.toml @@ -1,4 +1,4 @@ -CIRCUITPY_PYSTACK_SIZE=4608 +CIRCUITPY_PYSTACK_SIZE=12288 [LJINUX] serial_console = true From 3fe88abfb4d7da9364bc0c56bb0bb830806ccdbd Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 5 Jun 2023 22:16:22 +0300 Subject: [PATCH 10/22] space in PS1 --- source/ljinux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ljinux.py b/source/ljinux.py index fe3cc536..601afdeb 100644 --- a/source/ljinux.py +++ b/source/ljinux.py @@ -1444,7 +1444,7 @@ def shell(led=True, nalias=False): + colors.cyan_t + ljinux.based.system_vars["HOSTNAME"] + colors.endc - + "| " + + " | " + colors.yellow_t + ljinux.api.betterpath() + colors.endc From b3884ee2c35bbc3832e533a982e59cf0ef573bb4 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 5 Jun 2023 23:02:58 +0300 Subject: [PATCH 11/22] Update jcurses --- source/jcurses | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/jcurses b/source/jcurses index 537698e5..e1f8f6a4 160000 --- a/source/jcurses +++ b/source/jcurses @@ -1 +1 @@ -Subproject commit 537698e5d357fcdc503fcc1d437183b77fd62f48 +Subproject commit e1f8f6a4f35afabd0188c26b77042535837cfd08 From f442f7f17cd774ea83f98c38c4bc02e46cc2b38a Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 5 Jun 2023 23:17:32 +0300 Subject: [PATCH 12/22] jcurses - fpexec --- source/jcurses | 2 +- source/ljinux.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/jcurses b/source/jcurses index e1f8f6a4..c1597900 160000 --- a/source/jcurses +++ b/source/jcurses @@ -1 +1 @@ -Subproject commit e1f8f6a4f35afabd0188c26b77042535837cfd08 +Subproject commit c1597900f16d2429e5457b6ad20f7213accd9062 diff --git a/source/ljinux.py b/source/ljinux.py index 601afdeb..a7567258 100644 --- a/source/ljinux.py +++ b/source/ljinux.py @@ -1229,7 +1229,6 @@ def history(inpt): # history frontend term.write(f"{colors.magenta_t}Based{colors.endc}: Invalid option") def pexec(inpt): # Python exec - gc.collect() try: exec(inpt) # Vulnerability.exe except Exception as err: @@ -1259,7 +1258,6 @@ def fpexec(inpt): # Python script exec ljinux.based.user_vars["return"] = "1" return - gc.collect() try: a = open(ljinux.api.betterpath(inpt[offs])).read() gc.collect() @@ -1278,6 +1276,7 @@ def fpexec(inpt): # Python script exec + str(err) ) del err + gc.collect() del offs, fpargs def parse_pipes(inpt): From a8312a9ad297704b09035c5811cb98acd71b153b Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 5 Jun 2023 23:37:42 +0300 Subject: [PATCH 13/22] Update jcurses --- source/jcurses | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/jcurses b/source/jcurses index c1597900..ce80c238 160000 --- a/source/jcurses +++ b/source/jcurses @@ -1 +1 @@ -Subproject commit c1597900f16d2429e5457b6ad20f7213accd9062 +Subproject commit ce80c238fde52f9e4f68b527c50260e6f8b32201 From 322d5d42ef54b501176fbaf316909d115fc1e5de Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 5 Jun 2023 23:51:04 +0300 Subject: [PATCH 14/22] Update jcurses --- source/jcurses | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/jcurses b/source/jcurses index ce80c238..b0cc4527 160000 --- a/source/jcurses +++ b/source/jcurses @@ -1 +1 @@ -Subproject commit ce80c238fde52f9e4f68b527c50260e6f8b32201 +Subproject commit b0cc45277b88d36fa3b817955bc92d8a9280c27c From 8007dcd39382dc9d8ee211a38400083f027e0c48 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 5 Jun 2023 23:57:48 +0300 Subject: [PATCH 15/22] More pain --- source/jcurses | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/jcurses b/source/jcurses index b0cc4527..0abd89c3 160000 --- a/source/jcurses +++ b/source/jcurses @@ -1 +1 @@ -Subproject commit b0cc45277b88d36fa3b817955bc92d8a9280c27c +Subproject commit 0abd89c304327842d1b7255603d4c688de189c8f From 0f7562624d71dae4e193976576e53eb96fc86f71 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 6 Jun 2023 01:00:29 +0300 Subject: [PATCH 16/22] Fetch the warcrime --- source/jcurses | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/jcurses b/source/jcurses index 0abd89c3..217887bc 160000 --- a/source/jcurses +++ b/source/jcurses @@ -1 +1 @@ -Subproject commit 0abd89c304327842d1b7255603d4c688de189c8f +Subproject commit 217887bc90a8222a14bbf43e7372e3fffa449943 From e32656acdb7d2ec3a30583fcfbbbaa076767a77e Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 6 Jun 2023 02:25:58 +0300 Subject: [PATCH 17/22] Exception handling --- source/ljinux.py | 333 +++++++++++++++++++++++------------------------ 1 file changed, 162 insertions(+), 171 deletions(-) diff --git a/source/ljinux.py b/source/ljinux.py index a7567258..510d0e69 100644 --- a/source/ljinux.py +++ b/source/ljinux.py @@ -916,10 +916,13 @@ def error(wh=3, f=None, prefix=f"{colors.magenta_t}Based{colors.endc}"): 17: "Not a directory", 18: "Not a file", 19: "Not a device", + 20: f"Unhandled exception: {f}", + 21: "Uncaught KeyboardInterrupt", + 22: "Critical exception", } term.write(f"{prefix}: {errs[wh]}") ljinux.io.ledset(1) - del errs + del errs, f, prefix def autorun(): ljinux.io.ledset(3) # act @@ -1007,11 +1010,7 @@ def autorun(): ljinux.io.ledset(1) # idle while not Exit: - try: - ljinux.based.shell() - except KeyboardInterrupt: - term.write("^C") - Exit = False # to allow ljinux.based.shell to be rerun from code.py + ljinux.based.shell() return Exit_code class command: @@ -1455,188 +1454,173 @@ def shell(led=True, nalias=False): command_input = None while (command_input in [None, ""]) and not Exit: - try: - term.program() - if term.buf[0] is 0: # enter - ljinux.history.nav[0] = 0 - command_input = term.buf[1] - term.buf[1] = "" - term.focus = 0 - term.write() - elif term.buf[0] is 1: - ljinux.io.ledset(2) # keyact - term.write("^C") - term.buf[1] = "" - term.focus = 0 - term.clear_line() - ljinux.io.ledset(1) # idle - elif term.buf[0] is 2: + term.program() + if term.buf[0] is 0: # enter + ljinux.history.nav[0] = 0 + command_input = term.buf[1] + term.buf[1] = "" + term.focus = 0 + term.write() + elif term.buf[0] is 1: + ljinux.io.ledset(2) # keyact + term.write("^C") + term.buf[1] = "" + term.focus = 0 + term.clear_line() + ljinux.io.ledset(1) # idle + elif term.buf[0] is 2: + ljinux.io.ledset(2) # keyact + term.write("^D") + Exit = True + Exit_code = 0 + ljinux.io.ledset(1) # idle + break + elif term.buf[0] is 3: # tab key + if len(term.buf[1]): ljinux.io.ledset(2) # keyact - term.write("^D") - Exit = True - Exit_code = 0 - ljinux.io.ledset(1) # idle - break - elif term.buf[0] is 3: # tab key - if len(term.buf[1]): - ljinux.io.ledset(2) # keyact - tofind = term.buf[ - 1 - ] # made into var for speed reasons - candidates = [] - slicedd = tofind.split() - lent = len(slicedd) - if lent > 1: # suggesting files - files = listdir() - for i in files: - if i.startswith( - slicedd[lent - 1] - ): # only on the arg we are in - candidates.append(i) - del i - del files - else: # suggesting bins - bins = ljinux.based.get_bins() - ints = ljinux.based.get_internal() - for i in [ints, bins]: - for j in i: - if j.startswith(tofind): - candidates.append(j) - del j - del i - del bins, ints - if len(candidates) > 1: - term.write() - minn = 100 - for i in candidates: - if not i.startswith("_"): # discard those - minn = min(minn, len(i)) - term.nwrite("\t" + i) - del i - letters_match = 0 - isMatch = True - while isMatch: - for i in range(0, minn): - for j in range(1, len(candidates)): - try: - if ( - not candidates[j][ - letters_match - ] - == candidates[j - 1][ - letters_match - ] - ): - isMatch = False - break - else: - letters_match += 1 - except IndexError: + tofind = term.buf[1] # made into var for speed reasons + candidates = [] + slicedd = tofind.split() + lent = len(slicedd) + if lent > 1: # suggesting files + files = listdir() + for i in files: + if i.startswith( + slicedd[lent - 1] + ): # only on the arg we are in + candidates.append(i) + del i + del files + else: # suggesting bins + bins = ljinux.based.get_bins() + ints = ljinux.based.get_internal() + for i in [ints, bins]: + for j in i: + if j.startswith(tofind): + candidates.append(j) + del j + del i + del bins, ints + if len(candidates) > 1: + term.write() + minn = 100 + for i in candidates: + if not i.startswith("_"): # discard those + minn = min(minn, len(i)) + term.nwrite("\t" + i) + del i + letters_match = 0 + isMatch = True + while isMatch: + for i in range(0, minn): + for j in range(1, len(candidates)): + try: + if ( + not candidates[j][letters_match] + == candidates[j - 1][ + letters_match + ] + ): isMatch = False break - del j - del i - if not isMatch: + else: + letters_match += 1 + except IndexError: + isMatch = False break - del minn, isMatch - if letters_match > 0: - term.clear_line() - if lent > 1: - term.buf[1] = " ".join( - slicedd[:-1] - + [candidates[0][:letters_match]] - ) - else: - term.buf[1] = candidates[0][ - :letters_match - ] - term.focus = 0 - del letters_match - elif len(candidates) == 1: + del j + del i + if not isMatch: + break + del minn, isMatch + if letters_match > 0: term.clear_line() if lent > 1: term.buf[1] = " ".join( - slicedd[:-1] + [candidates[0]] + slicedd[:-1] + + [candidates[0][:letters_match]] ) else: - term.buf[1] = candidates[0] - term.focus = 0 + term.buf[1] = candidates[0][:letters_match] + term.focus = 0 + del letters_match + elif len(candidates) == 1: + term.clear_line() + if lent > 1: + term.buf[1] = " ".join( + slicedd[:-1] + [candidates[0]] + ) else: - term.clear_line() - del candidates, lent, tofind, slicedd - ljinux.io.ledset(1) # idle + term.buf[1] = candidates[0] + term.focus = 0 else: term.clear_line() - elif term.buf[0] is 4: # up - ljinux.io.ledset(2) # keyact - try: - neww = ljinux.history.gett( - ljinux.history.nav[0] + 1 - ) - # if no historyitem, we wont run the items below - if ljinux.history.nav[0] == 0: - ljinux.history.nav[2] = term.buf[1] - ljinux.history.nav[1] = term.focus - term.buf[1] = neww - del neww - ljinux.history.nav[0] += 1 - term.focus = 0 - except IndexError: - pass - term.clear_line() + del candidates, lent, tofind, slicedd ljinux.io.ledset(1) # idle - elif term.buf[0] is 7: # down - ljinux.io.ledset(2) # keyact - if ljinux.history.nav[0] > 0: - if ljinux.history.nav[0] > 1: - term.buf[1] = ljinux.history.gett( - ljinux.history.nav[0] - 1 - ) - ljinux.history.nav[0] -= 1 - term.focus = 0 - else: - # have to give back the temporarily stored one - term.buf[1] = ljinux.history.nav[2] - term.focus = ljinux.history.nav[1] - ljinux.history.nav[0] = 0 - term.clear_line() - elif term.buf[0] in [11, 12]: # pgup / pgdw + else: term.clear_line() - elif term.buf[0] is 13: # Ctrl + L (clear screen) - term.clear() - elif term.buf[0] is 14: # overflow - store = term.buf[1] + elif term.buf[0] is 4: # up + ljinux.io.ledset(2) # keyact + try: + neww = ljinux.history.gett(ljinux.history.nav[0] + 1) + # if no historyitem, we wont run the items below + if ljinux.history.nav[0] == 0: + ljinux.history.nav[2] = term.buf[1] + ljinux.history.nav[1] = term.focus + term.buf[1] = neww + del neww + ljinux.history.nav[0] += 1 term.focus = 0 - term.buf[1] = "" - term.trigger_dict["prefix"] = "> " - term.clear_line() - term.program() - if term.buf[0] is 0: # enter - ljinux.history.nav[0] = 0 - command_input = store + term.buf[1] - term.buf[1] = "" - term.write() - elif term.buf[0] is 14: # more lines - store += term.buf[1] - ljinux.history.nav[0] = 0 - term.buf[1] = "" - term.focus = 0 - term.clear_line() - else: # not gonna - term.buf[0] = "" + except IndexError: + pass + term.clear_line() + ljinux.io.ledset(1) # idle + elif term.buf[0] is 7: # down + ljinux.io.ledset(2) # keyact + if ljinux.history.nav[0] > 0: + if ljinux.history.nav[0] > 1: + term.buf[1] = ljinux.history.gett( + ljinux.history.nav[0] - 1 + ) + ljinux.history.nav[0] -= 1 term.focus = 0 + else: + # have to give back the temporarily stored one + term.buf[1] = ljinux.history.nav[2] + term.focus = ljinux.history.nav[1] ljinux.history.nav[0] = 0 - del store - elif term.buf[0] is 20: # console disconnected - ljinux.based.command.exec( - "/LjinuxRoot/bin/_waitforconnection.lja" - ) - term.clear_line() - except KeyboardInterrupt: - # duplicate code as by ^C^C you could escape somehow - term.nwrite("^C") - term.buf[1] = "" + term.clear_line() + elif term.buf[0] in [11, 12]: # pgup / pgdw + term.clear_line() + elif term.buf[0] is 13: # Ctrl + L (clear screen) + term.clear() + elif term.buf[0] is 14: # overflow + store = term.buf[1] term.focus = 0 + term.buf[1] = "" + term.trigger_dict["prefix"] = "> " + term.clear_line() + term.program() + if term.buf[0] is 0: # enter + ljinux.history.nav[0] = 0 + command_input = store + term.buf[1] + term.buf[1] = "" + term.write() + elif term.buf[0] is 14: # more lines + store += term.buf[1] + ljinux.history.nav[0] = 0 + term.buf[1] = "" + term.focus = 0 + term.clear_line() + else: # not gonna + term.buf[0] = "" + term.focus = 0 + ljinux.history.nav[0] = 0 + del store + elif term.buf[0] is 20: # console disconnected + ljinux.based.command.exec( + "/LjinuxRoot/bin/_waitforconnection.lja" + ) term.clear_line() if not Exit: res = "" @@ -1670,7 +1654,14 @@ def shell(led=True, nalias=False): silencecmd = silencelist.pop() if silencecmd: ljinux.based.silent = True - ljinux.based.run(currentcmd) + try: + ljinux.based.run(currentcmd) + except KeyboardInterrupt: + ljinux.based.error(21) + except Exception as Err: + ljinux.based.error(20, Err) + except: + ljinux.based.error(22) if silencecmd: ljinux.based.silent = False del currentcmd, silencecmd From 3dc479e5227a6bf2508a93951ae7fc9ab9c78aa0 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 6 Jun 2023 02:40:04 +0300 Subject: [PATCH 18/22] Faster _waitforconnection --- LjinuxRoot/bin/_waitforconnection.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/LjinuxRoot/bin/_waitforconnection.py b/LjinuxRoot/bin/_waitforconnection.py index 98dd7826..fc93e267 100644 --- a/LjinuxRoot/bin/_waitforconnection.py +++ b/LjinuxRoot/bin/_waitforconnection.py @@ -1,9 +1,15 @@ -if term.check_activity(): +if term.check_activity(): # has .connected while not console.connected: ljinux.io.ledset(4) - time.sleep(0.4) + for i in range(4): + if console.connected: + break + time.sleep(0.1) ljinux.io.ledset(7) - time.sleep(0.4) - time.sleep(0.6) + for i in range(4): + if console.connected: + break + time.sleep(0.1) + time.sleep(0.2) # Delay for the terminal to get used to it. else: term.anykey("\nCannot autodetect connection\nPress any key to open based shell\n") From 9809b892e4686c3c4e429f0e2b36427a01bd20ee Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 6 Jun 2023 17:10:03 +0300 Subject: [PATCH 19/22] Update jcurses --- source/jcurses | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/jcurses b/source/jcurses index 217887bc..21751f9f 160000 --- a/source/jcurses +++ b/source/jcurses @@ -1 +1 @@ -Subproject commit 217887bc90a8222a14bbf43e7372e3fffa449943 +Subproject commit 21751f9f4aef498b2ab9d925979f64e334ab015d From dec941d3882dfc67a2a3a09e6e75e4383c11c143 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 6 Jun 2023 21:45:14 +0300 Subject: [PATCH 20/22] Update the yd-s3 pinouts --- Boardfiles/yd_esp32_s3_n16r8/pinout.map | 28 +++++++++++++++++--- Boardfiles/yd_esp32_s3_n8r8/pinout.map | 34 ++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/Boardfiles/yd_esp32_s3_n16r8/pinout.map b/Boardfiles/yd_esp32_s3_n16r8/pinout.map index ac8535b2..04394a77 100644 --- a/Boardfiles/yd_esp32_s3_n16r8/pinout.map +++ b/Boardfiles/yd_esp32_s3_n16r8/pinout.map @@ -1,6 +1,28 @@ -[ FSPIWP | SUBSPIWP | FSPIDQS | ADC2_3 | TOUCH14 | RTC ] GPIO14 - 5V0 - GND + ,------------. + |-, .-, .--- | + ,-||`-' `-' || |-. + 3V3 | = ESP32-S3 = | GND + 3V3 | = WROOM-1 = | GPIO43 [ U0TXD | CLK_OUT1 ] + RESET | = = | GPIO44 [ U0RXD | CLK_OUT2 ] + [ ADC1_3 | TOUCH04 ] GPIO04 | = = | GPIO01 [ TOUCH1 | ADC1_0 ] + [ ADC1_4 | TOUCH05 ] GPIO05 | = = | GPIO02 [ TOUCH2 | ADC1_1 ] + [ ADC1_5 | TOUCH06 ] GPIO06 | = = | GPIO42 [ MTMS ] + [ ADC1_6 | TOUCH07 ] GPIO07 | = = | GPIO41 [ MTDI | CLK_OUT1 ] + [ XTAL_32K_P | ADC2_4 | U0RTS ] GPIO15 | |||||||||||| | GPIO40 [ MTDO | CLK_OUT2 ] + [ XTAL_32K_N | ADC2_5 | U0CTS ] GPIO16 | | GPIO39 [ MTCK | CLK_OUT3 | SUBSPICS1 ] + [ ADC2_6 | U1TXD ] GPIO17 | | GPIO38 [ FSPIWP | | SUBSPIWP ] + [ CLK_OUT3 | ADC2_7 | U1RXD ] GPIO18 | RESET | GPIO37 [ SPIDQS | FSPIQ | SUBSPIQ ] + [ ADC1_7 | TOUCH08 ] GPIO08 | =O= | GPIO36 [ SPIIO7 | FSPICLK | SUBSPICLK ] + [ JTAG | ADC1_2 | TOUCH03 ] GPIO03 | BOOT | GPIO35 [ SPIIO6 | FSPID | SUBSPID ] + [ LOG ] GPIO46 | =O= | GPIO00 [ BOOT ] +[ FSPICLK | SUBSPICLK | FSPIIO6 | ADC2_1 | TOUCH09 ] GPIO09 | | GPIO45 [ VSPI ] +[ FSPICLK | SUBSPICLK | FSPIIO6 | ADC2_1 | TOUCH10 ] GPIO10 | ,----. | GPIO48 [ | | SPICLK_N ] +[ FSPICLK | SUBSPICLK | FSPIIO6 | ADC2_0 | TOUCH11 ] GPIO11 | |2812| ,-----. | GPIO47 [ RGB_LED | | SPICLK_P ] +[ FSPICLK | SUBSPICLK | FSPIIO6 | ADC2_1 | TOUCH12 ] GPIO12 | `----' |CH343| | GPIO21 +[ FSPIQ | SUBSPIQ | FSPIIO7 | ADC2_2 | TOUCH13 ] GPIO13 | `-----' | GPIO20 [ USB_D+ | U1CTS | ADC2_9 | CLK_OUT1 ] +[ FSPIWP | SUBSPIWP | FSPIDQS | ADC2_3 | TOUCH14 ] GPIO14 | USB UART | GPIO19 [ USB_D- | U1RTS | ADC2_8 | CLK_OUT2 ] + 5V0 | ,---. ,---. | GND + GND `-| |----| |-' GND VCC-GND YD-ESP32-S3 (N16R8) diff --git a/Boardfiles/yd_esp32_s3_n8r8/pinout.map b/Boardfiles/yd_esp32_s3_n8r8/pinout.map index 74bcf9d3..4ff86d35 100644 --- a/Boardfiles/yd_esp32_s3_n8r8/pinout.map +++ b/Boardfiles/yd_esp32_s3_n8r8/pinout.map @@ -1 +1,33 @@ -Pinout pending. + ,------------. + |-, .-, .--- | + ,-||`-' `-' || |-. + 3V3 | = ESP32-S3 = | GND + 3V3 | = WROOM-1 = | GPIO43 [ U0TXD | CLK_OUT1 ] + RESET | = = | GPIO44 [ U0RXD | CLK_OUT2 ] + [ ADC1_3 | TOUCH04 ] GPIO04 | = = | GPIO01 [ TOUCH1 | ADC1_0 ] + [ ADC1_4 | TOUCH05 ] GPIO05 | = = | GPIO02 [ TOUCH2 | ADC1_1 ] + [ ADC1_5 | TOUCH06 ] GPIO06 | = = | GPIO42 [ MTMS ] + [ ADC1_6 | TOUCH07 ] GPIO07 | = = | GPIO41 [ MTDI | CLK_OUT1 ] + [ XTAL_32K_P | ADC2_4 | U0RTS ] GPIO15 | |||||||||||| | GPIO40 [ MTDO | CLK_OUT2 ] + [ XTAL_32K_N | ADC2_5 | U0CTS ] GPIO16 | | GPIO39 [ MTCK | CLK_OUT3 | SUBSPICS1 ] + [ ADC2_6 | U1TXD ] GPIO17 | | GPIO38 [ FSPIWP | | SUBSPIWP ] + [ CLK_OUT3 | ADC2_7 | U1RXD ] GPIO18 | RESET | GPIO37 [ SPIDQS | FSPIQ | SUBSPIQ ] + [ ADC1_7 | TOUCH08 ] GPIO08 | =O= | GPIO36 [ SPIIO7 | FSPICLK | SUBSPICLK ] + [ JTAG | ADC1_2 | TOUCH03 ] GPIO03 | BOOT | GPIO35 [ SPIIO6 | FSPID | SUBSPID ] + [ LOG ] GPIO46 | =O= | GPIO00 [ BOOT ] +[ FSPICLK | SUBSPICLK | FSPIIO6 | ADC2_1 | TOUCH09 ] GPIO09 | | GPIO45 [ VSPI ] +[ FSPICLK | SUBSPICLK | FSPIIO6 | ADC2_1 | TOUCH10 ] GPIO10 | ,----. | GPIO48 [ | | SPICLK_N ] +[ FSPICLK | SUBSPICLK | FSPIIO6 | ADC2_0 | TOUCH11 ] GPIO11 | |2812| ,-----. | GPIO47 [ RGB_LED | | SPICLK_P ] +[ FSPICLK | SUBSPICLK | FSPIIO6 | ADC2_1 | TOUCH12 ] GPIO12 | `----' |CH343| | GPIO21 +[ FSPIQ | SUBSPIQ | FSPIIO7 | ADC2_2 | TOUCH13 ] GPIO13 | `-----' | GPIO20 [ USB_D+ | U1CTS | ADC2_9 | CLK_OUT1 ] +[ FSPIWP | SUBSPIWP | FSPIDQS | ADC2_3 | TOUCH14 ] GPIO14 | USB UART | GPIO19 [ USB_D- | U1RTS | ADC2_8 | CLK_OUT2 ] + 5V0 | ,---. ,---. | GND + GND `-| |----| |-' GND + +VCC-GND YD-ESP32-S3 (N8R8) + +SoC : ESP32-S3 +RAM : 8704KB +Storage : DIO (8MB) +Wi-fi : True +Bluetooth : True From 7237464166fbb6ac8d6ff4d7bde3cf01ced62e44 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 6 Jun 2023 22:54:52 +0300 Subject: [PATCH 21/22] Update beetle pinout --- Boardfiles/beetle-esp32-c3/pinout.map | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Boardfiles/beetle-esp32-c3/pinout.map b/Boardfiles/beetle-esp32-c3/pinout.map index 595ad2d5..1b401191 100644 --- a/Boardfiles/beetle-esp32-c3/pinout.map +++ b/Boardfiles/beetle-esp32-c3/pinout.map @@ -1 +1,20 @@ -No pinout yet available. + [ ADC1_3 | | A3 ] GPIO03 _ _ GPIO10 + \ / + GND ,--| |--. BAT + 3V3 |L `---'O | GND + [ ADC1_0 | SCK | A0 ] GPIO00 |L O | VIN + [ ADC1_1 | SCK | A1 ] GPIO01 | RST | GPIO20 [ RX ] +[ MTMS | ADC1_4 | SCK | A4 ] GPIO04 | ,-----. | GPIO21 [ TX ] +[ MTCK | | MOSI | ] GPIO06 | |ESP32| | GPIO08 [ SDA ] +[ MTDI | ADC2_0 | MISO | A5 ] GPIO05 | | C3 | | GPIO09 [ SCL ] +[ MTDO | | | ] GPIO07 | `-----' | GPIO02 [ A2 | ADC1_2 ] + `---------' + +DFRobot Beetle ESP32-C3 V1.0.0 + +SoC : ESP32-C3 +RAM : 400KB +Storage : QIO (4MB) +Wi-fi : True +Bluetooth : True + From 415be22272c24be30b7594f4ac34cffc9763256e Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 6 Jun 2023 23:43:19 +0300 Subject: [PATCH 22/22] sxnrf pinout --- Boardfiles/Seeed_XIAO_nRF52840_Sense/pinout.map | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Boardfiles/Seeed_XIAO_nRF52840_Sense/pinout.map b/Boardfiles/Seeed_XIAO_nRF52840_Sense/pinout.map index 083e5cdf..885749df 100644 --- a/Boardfiles/Seeed_XIAO_nRF52840_Sense/pinout.map +++ b/Boardfiles/Seeed_XIAO_nRF52840_Sense/pinout.map @@ -1,8 +1,15 @@ +[ P0.02 | | A0 ] D00 ,---| |---. 5V0 +[ P0.03 | | A1 ] D01 |RST CRG| GND +[ P0.28 | | A2 ] D02 | LED| 3V3 +[ P0.29 | | A3 ] D03 | ,-------. | D10 [ MOSI | P1.15 ] +[ P0.04 | SDA | A4 ] D04 | | nRF | | D09 [ MISO | P1.14 ] +[ P0.05 | SCL | A5 ] D05 | `-------' | D08 [ SCK | P1.13 ] +[ P1.11 | TX | ] D06 `-----------' D07 [ RX | P1.12 ] Seeed XIAO nRF52840 (Sense) SoC : nRF52840 -RAM : 2048KB -Storage : SOC (4MB) -Wi-fi : True +RAM : 256KB +Storage : QSPI (2MB) +Wi-fi : False Bluetooth : True