49 Commits

Author SHA1 Message Date
Gordon Williams
2bdf05f910 ESP32: Remove FlashFS, adjust partitions to increase available Storage from 256kB to 896kB 2025-04-02 10:39:00 +01:00
Gordon Williams
9090fcf83e ESP32C3: don't kick connected BLE devices off if reset() is called
ESP32C3: disable warnings about "BT_BTM: BTM_GetSecurityFlags false"
2024-11-04 11:36:28 +00:00
Gordon Williams
2db9f15ec2 fix build issue 2024-10-04 09:30:18 +01:00
Gordon Williams
e8ab0a4d99 Add a quick hack to fix lack of ESP32C3 USB UART output if there's no newline 2024-05-20 15:07:51 +01:00
Gordon Williams
054f5664a6 use ESP_IDF_VERSION_MAJOR for ESP32 2024-04-26 14:43:27 +01:00
Gordon Williams
973d26a044 Add #ifdef'd changes for IDF5 2024-04-26 14:43:27 +01:00
Gary Ott
88278bc780 ESP32: Regression fix, cannot build without Bluetooth. 2023-09-22 13:40:47 +01:00
Gordon Williams
334de3c60d Avoid usage of interrupts for sending NUS data - should work ok assuming we return to idle at some point, and is finaly stable 2023-05-04 12:03:57 +01:00
Gary Ott
5aaa4baf92 ESP32: Take advantage of JsVars being smaller without exceeding addressable limit. 2022-11-30 15:44:36 +00:00
Gary Ott
fe2edadaf4 ESP32: Take advantage of JsVars being smaller. 2022-11-28 18:19:12 +00:00
Gordon Williams
4a7d30f4be Bangle.js: Add 'graphicsInternal' to make Graphics independent of JS vars. Terminal is now useful earlier, and can display softdevice errors 2022-01-31 16:35:38 +00:00
Gary Ott
161982b53e Added code to jsuGetFreeStack() for ESP32 and introduced ESP_STACK_SIZE constant. 2020-07-14 11:09:05 +01:00
wilberforce
9b3cca7f55 restore wifi settings from Storage .wificfg 2018-12-15 12:40:09 +13:00
wilberforce
d0077bf498 add debug to wifi events 2018-12-08 13:44:15 +13:00
wilberforce
589ef6fe79 Make wifi connect more robust 2018-12-03 18:52:06 +13:00
jumjum123
c4006351cd Changed include to shorter path (esp_partition.c)
Changes to be committed:
	modified:   targets/esp32/main.c
2018-10-15 11:46:17 +02:00
Gordon Williams
6ddb231172 minor refactoring to allow differing JsVar sizes to be used at boot 2018-06-01 14:35:32 +01:00
jumjum123
0054b39c00 ESP32.py
- added variables_mode in config.
build_platform_config.py
- added define for variables_mode
jsvar.h
- added jsVarsSize;  //size of jsVars for option malloc
- added support of malloc jsVars in jsvInit
jsvar.c
- added definition jsVars for variables_mode_malloc
jshardwareESP32.h
- new file with functions to set/get enable status of BLE and Wifi
jshardwareESP32.c
- new file with functions to set/get enable status of BLE and Wifi
ESP32.make
- added jshardware.c to SOURCES
main.c
- added handling for Wifi enabled
- added calculation for jsVars
- initialise jsVars based on calculation
jshardware.c
- used new API call to get Serial Number, even if Wifi is not enabled
- initialises BLE, if BLE is enabled (in NVS storage)
bluetooth.c
- check if BLE is enabled before initialising
jswrap_esp32.h
- defines functions to enable BLE and/or Wifi
jswrap_esp32.c
- wrapper for functions to enable BLE/Wifi, remove code from Flash, to avoid overflow in jsVars
- added status for BLE/Wifi to ESP32.getStatus
esp32_gap_func.c
- get mac adress even if Wifi is not enabled

 Changes to be committed:
	modified:   boards/ESP32.py
	modified:   make/family/ESP32.make
	modified:   scripts/build_platform_config.py
	modified:   src/jsvar.c
	modified:   src/jsvar.h
	modified:   targets/esp32/BLE/esp32_gap_func.c
	modified:   targets/esp32/bluetooth.c
	modified:   targets/esp32/jshardware.c
	new file:   targets/esp32/jshardwareESP32.c
	new file:   targets/esp32/jshardwareESP32.h
	modified:   targets/esp32/jswrap_esp32.c
	modified:   targets/esp32/jswrap_esp32.h
	modified:   targets/esp32/main.c
2018-06-01 12:23:00 +02:00
wilberforce
883000cf81 update esp-idf to v3.0. BLE support - thanks to @jumjum. 2500 vars. Erase flash before flashing 2018-05-13 13:54:02 +12:00
wilberforce
54240e92f7 update ESP32 Branch to UDP, copy UDP code from linux 2017-08-31 10:53:25 +12:00
wilberforce
fd590f08ba update ESP32 Branch to UDP, copy UDP code from linux 2017-08-31 10:49:10 +12:00
jumjum123
1b3f15a195 Move util timer from its own task into espruino task
The first idea was to move util timer task to 2nd cpu later, but it turned out taskhandling slows down a lot
Therefore it had to be moved
Move init of timer into main loop
Add a bitfield for usage of pins for soft pwm
Add handling of soft pwm pins to jshPinSetState
Add handling of soft PWM to jshPinAnalogOutput if soft:true is set in options
Set time for util timer to a min of 30 usecs
2017-08-09 16:02:11 +02:00
wilberforce
1619fff1c7 increase espruino task stack to 20000 2017-04-30 15:50:21 +12:00
Gordon Williams
c09739f663 Remove duplicate JSON code and WiFi functions in reference, fix #1155 2017-04-29 19:02:51 +01:00
wilberforce
1ebaa2afba PWM fix 2017-04-26 15:39:21 +12:00
wilberforce
0fb9ed1e21 suppress warnings, FatFS docs, suppress logging 2017-04-22 11:17:45 +12:00
wilberforce
011042e2d9 Fix #1081 E.setBootCode(); 2017-04-03 21:19:49 +12:00
wilberforce
a44e3cbb5e Fix #1081 E.setBootCode(); 2017-04-03 21:14:16 +12:00
jumjum123
1973a776a9 Added reset function to jshreset for
- SPI
- ADC
- UART
- PULSE
2017-03-03 11:59:35 +01:00
jumjum123
e03d345cde Renamed targets/esp32/spi.* to jshardwareSpi.*
renamed targets/esp32/i2c.* to jshardwareI2c.*

Renamed includes for spi.h/i2c.h in jshardware.c, main.c, jshardwareSpi.c. jshardwareI2c.c
2017-02-25 15:46:42 +01:00
Rhys.Williams
0cd311bf48 restore wifi initalisation 2017-02-15 20:29:28 +13:00
jumjum123
99222ee989 Tested version for SPI (with ILI9341)
Extended to support both SPI channel (HSPI and VSPI)
Todo:
More testing with other SPI based hardware
Testing with two or more devices on same SPI channel (using seperate CE pins)
Input from SPI device
Find a faster solution. Each byte has a lot of overhead in Espruino.
2017-02-13 22:52:51 +01:00
Rhys.Williams
d7d36fd794 jshreset, re-organise hardware start up 2017-02-12 20:21:37 +13:00
jumjum123
52c6136c3c Added support for Serial2 and Serial3
Setup is supported for Serial2 and Serial3 only
Flowcontrol is UART_HW_FLOWCTRL_DISABLE only
2017-01-31 11:33:11 +01:00
Rhys.Williams
8d1b5265b6 repair Makefile so bin and build tar get built, fix typo for xTaskCreatePinnedToCore, bin parition 0x8000 2017-01-22 11:08:48 +13:00
jumjum123
59f2155135 Added functions to support digitalPulse.
Not tested yet, waiting for an oscilloscope......
2017-01-20 16:12:46 +01:00
jumjum123
6a18cbc5dd 1. Makefile, moved $(ESP_ZIP):.... to be after proj:....
2. added README_flash.txt to folder target/esp32
3. added README_flash.txt to zip file created in $(ESP_ZIP):.... in Makefile
4. added header and source file for PWM. ESP32 does not support a general PWM driver(yet).
   Therefore driver/ledc is used.
   5 channel can be used for simple DAC, using default frequency of 5000Hz
   3 more channel are available for different frequency
5. connect jshardwarePWM functions to standard calls in jshardware
6. implemented jshSetOutputValue in jshardware
7. moved targets/esp32/rtosutil.c from RTOS to standard part of ESP32
   targets/esp32/jswrap_rtos.c is added only if var RTOS is defined
2017-01-19 15:39:01 +01:00
jumjum123
21f9b8510b Added call for hardware timer functions to jshardware.c
- this works without errors, but is not tested with Espruino commands
Added new task to main, to seperate Espruino function from interrupt service routine
- otherwise we get resets
Fixed some headers in esp32 relevant files
2017-01-13 13:40:13 +01:00
Rhys.Williams
1db1205aaa get wifi startup working - default on fresh flash is AP mode 2017-01-12 18:35:35 +13:00
Rhys.Williams
471e86ffcb remove arduino libs dependancy (spi commented out) 2017-01-10 21:33:05 +13:00
Rhys.Williams
947f552529 remove arduino libs dependancy (spi commented out) 2017-01-10 21:14:29 +13:00
Juergen Marsch
8e38a5aae2 - Added suport for ADC(pin32-39)
please have in mind, ADC do not work linear.
  Espressif will change this later
- added support for DAC(pin 25-26)
- changed interrupt handling for GPIO and UART to virtual interrupts
Changes to be committed:
	modified:   Makefile
	modified:   targets/esp32/jshardware.c
	new file:   targets/esp32/jshardwareAnalog.c
	new file:   targets/esp32/jshardwareAnalog.h
	modified:   targets/esp32/jshardwareUart.c
	modified:   targets/esp32/jswrap_esp32.c
	modified:   targets/esp32/main.c
2016-12-13 18:58:57 +01:00
Juergen Marsch
0f2d2b7f7c Makefile added files
- RTOS_for_Espruino.md docu for RTOS-Commands
- jshardwareUart functions for interrupt driven console
- rtosutil rtos functions for tasks and queues
- jswrap_rtos wrapper for rtos functions
- Makefile added RTOS definition to support RTOS functions(or not)
- main.c switched to interrupt driven console using 2nd task
- jshardware.c switched to interrupt driven console
2016-12-01 22:32:30 +01:00
Juergen Marsch
bae5e8256a Revert "Merge pull request #983 from jumjum123/ESP32"
This reverts commit 3d464618227d8d6f5040bff6c8e41a447a6d6f25, reversing
changes made to 1d8fd4aa72e99a875eb7efe70c3d4700dd0d27b1.

merge was done with "old changes"
2016-12-01 17:15:50 +01:00
Juergen Marsch
7aea6753a7 Merge branch 'ESP32' of https://github.com/jumjum123/Espruino into ESP32 2016-11-29 11:38:08 +01:00
Rhys.Williams
58eee3d07d Allow single byte read from flash so that save() works
Implement `wifi.save()` and `wifi.restore()` using inbuilt API (rather than save to flash like ESP8266)
2016-11-24 12:09:34 +13:00
Juergen Marsch
004cb6330e RTOS functions wrapper and a task for console read
- added wrapper to use functions around tasks and queues. rtosutils is
c-level, jswrap_rtos wraps utils to Espruino
- added option for rtos (RTOS=1) to makefile
- adding a task for reading uart and writing to a queue
- use RTOS-option to switch between old polling and new queue based
input
- docu for the changes
2016-11-07 15:49:44 +01:00
kolban
07eff2d5d9 Addition of callback handlers for connect and disconnect events. 2016-10-11 00:15:31 -05:00
kolban
565285410b Initial files for the ESP32 environment. 2016-10-09 22:53:20 -05:00