Skip to content

Commit

Permalink
Updated README for latest ESP32 library changes. They added writes re…
Browse files Browse the repository at this point in the history
…maining!

git-svn-id: svn://192.168.1.10/public/Zimodem@18856 0d6f1817-ed0e-0410-87c9-987e46238f29
  • Loading branch information
bozimmerman committed Oct 28, 2019
1 parent 8a23408 commit 99c6adc
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Building:
---------
To build this firmware for the ESP-01 or ESP-12, I used the Arduino IDE rev1.6.11 (or any version before or equal to 1.8.5) with the Arduino Generic ESP8266 Module installed from the head dev at https://github.com/esp8266/Arduino. Using that version of the library not the official Boards Manager distribution (via Additional Boards Manager URL http://arduino.esp8266.com/stable/package_esp8266com_index.json) was important to resolving several problems (specifically 300ms/byte socket write times). How you get there from here was tricky. I followed the standard instructions for installing an ESP board, found where it dropped the package (on Windows 10, it was in:c:\users\<myname>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\... I dropped the new stuff from github in there instead of the old stuff, and then went into the new "tools" directory and ran get.py. **

To build this firmware for the ESP-32, I also used the Arduino IDE rev 1.6.11 (or any version before or equal to 1.8.5) with the Arduino ESP32 Dev Module installed from the head dev at https://github.com/espressif/arduino-esp32, with the following settings: QIO, 4MB, 80MHZ, 921600, NONE, Avrisp Mk II **. I found that baud changing corrupts the serial bus as of 1/13/2018, so the following changes were made to the base libraries:
To build this firmware for the ESP-32, I also used the Arduino IDE rev 1.6.11 (or any version before or equal to 1.8.5) with the Arduino ESP32 Dev Module installed from the head dev at https://github.com/espressif/arduino-esp32 (~11/01/2019), with the following settings: QIO, 4MB, 80MHZ, 921600, NONE, Avrisp Mk II **. I found that baud changing corrupts the serial bus as of 1/13/2018, so the following changes were made to the base libraries:
> Added to esp32-hal-uart.c:
void uartChangeBaudRate(uint8_t uart_nr, uint32_t baudrate)
{
Expand All @@ -32,29 +32,15 @@ void uartChangeConfig(uint8_t uart_nr, uint32_t config)
}
UART_MUTEX_UNLOCK();
}
size_t uartWritesRemaining(uart_t* uart)
{
if(uart == NULL) {
return;
}
size_t remain;
UART_MUTEX_LOCK();
remain = 0x7F - uart->dev->status.txfifo_cnt;
UART_MUTEX_UNLOCK();
return remain;
}
> Added to esp32-hal-uart.h:
void uartChangeBaudRate(uint8_t uart_nr, uint32_t baudrate);
void uartChangeConfig(uint8_t uart_nr, uint32_t config);
size_t uartWritesRemaining(uart_t* uart);
> Added to HardwareSerial.cpp:
void HardwareSerial::changeBaudRate(int baudRate) { uartChangeBaudRate(_uart_nr, baudRate); }
void HardwareSerial::changeConfig(uint32_t config) { uartChangeConfig(_uart_nr, config); }
size_t HardwareSerial::availableForWrite() { return uartWritesRemaining(_uart); }
> Added to HardwareSerial.h:
void changeBaudRate(int baudRate);
void changeConfig(uint32_t config);
size_t availableForWrite();

** Both versions of the firmware are built with SPIFFS enabled. On the ESP8266, I used settings of 1M/160k, but you may want to alter that depending on your hardware and needs.

Expand Down

0 comments on commit 99c6adc

Please sign in to comment.