Skip to content

MakeYourOwnBasicEngine

a2ff edited this page Aug 6, 2019 · 1 revision

Make your own BASIC Engine

BASIC Engine firmware flashing instructions

Equipment

esptool.py requires pySerial, install with apt-get install python-serial or port install -c -u py-serial or using pip.

Use USB-serial 3.3V cable, FTDI or Prolific.

Sumind debug cable color coding is black=GND red=5V(!) white=RX green=TX.

Prepare a FAT32 SDcard with the content of MASTER/.

Procedure

Connect cable TX to board TX and cable RX to board RX (board has connector TX already swapped to ESP12F RX and vice-versa).

Pinout from board edge is:

  • 3-pin power connector: red (pin 3 5V), black (pin 2 GND, n.c. (pin 1 3v3)

  • 7-pin serial connector: short pin 1 to pin 6 (DTR=GND), white (pin 2 RX), green (pin 3 TX)

Accessing the ESP12 factory-installed AT firmware (do not short pin 1 to pin 6): picocom --omap crcrlf -b 115200 /dev/cu.usbserial

Accessing the ESP12 boot ROM (do short pin 1 to pin 6): picocom --omap crcrlf -b 74880 /dev/cu.usbserial

Flashing any ESP12 firmware on MacOS: esptool/esptool.py -p /dev/cu.usbserial -b 921600 write_flash 0 ttbasic.bin.

On Linux the serial device is /dev/ttyUSB0.

Note
Nightly build 382 https://basicengine.org/git_builds/basicengine-firmware-default-v0.88-alpha-382-gc918.tar.gz and above have French keyboard support with CONFIG 1,3 then SAVE CONFIG.
Caution
  • at 1st power-on, if using older firmware, expect a blank screen for a good minute.

  • at 1st power-on after the welcome screen, the chime and prompt will come up only after about 30 secondes while the internal flash disk is being formated.

  • subsequent power-on to ready takes about 2s if SD card inserted, 5s if waiting for (empty) card slot.

Contributing

BASIC Engine

The Makefile will try to install dependencies but only has support for some Linux distros so comment out and manually install dependencies on MacOS and Windows.

You need a C++ compiler and standard library, asciidoc or asciidoctor, ncurses 5, gperf, pySerial, exuberant-ctags, flex and bison. For the hosted build you need SDL 1.2 or newer.

You also need a clone of https://github.com/PaulStoffregen/Time.git in basicengine-firmware/libraries/.

The BASIC Engine git repo has its own esptool.py and uses the Arduino toolchain.

ESP8266 toolchain

esptool.py requires pySerial, install with apt-get install python-serial or port install -c -u py-serial or using pip.

Alternatively the (older) Arduino toolchain can be borrowed (e.g. on MacOS from ~/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/) by adding this path to the Library Manager in the Preferences windows: http://arduino.esp8266.com/stable/package_esp8266com_index.json,https://dl.espressif.com/dl/package_esp32_index.json. Upstream is at https://github.com/esp8266/Arduino.git https://github.com/uli/Arduino_nowifi.git

Additional tools

ESPlorer is a cross-platform graphical front-end written in Java from https://esp8266.ru/esplorer https://github.com/4refr0nt/ESPlorer

Arduino includes a natively compiled esptool (not a replacement for esptool.py) from https://github.com/igrr/esptool-ck in ~/Library/Arduino15/packages/esp8266/tools/esptool/

The space-saving no-WiFi SDK is at https://github.com/pvvx/SDKnoWiFi

The firmware installed in the external Flash of ESP12 is ESP8266_AT_Bin_V1.7.zip

It is not even clear what the L106 processor Espressif used in the ESP8266 is, maybe a Tensilica Xtensa Diamond 106Micro. More info at http://cholla.mmto.org/esp8266/xtensa.html

Recompiling the firmware

basicengine-firmware.git works out of the box on Debian- and Fedora-related distributions. Invoke make native before a first make hosted, otherwise a generated file will be missing.

See https://github.com/a2ff for new features not yet merged by Uli. Support for building on MacOS is being developed.