Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support to compile and run ESP32Forth #227

Closed
hemmerling opened this issue Nov 13, 2021 · 1 comment
Closed

Please support to compile and run ESP32Forth #227

hemmerling opened this issue Nov 13, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@hemmerling
Copy link

hemmerling commented Nov 13, 2021

Please support to compile and run ESP32Forth

https://esp32forth.appspot.com/ESP32forth.html
https://eforth.storage.googleapis.com/releases/ESP32forth-7.0.5.4.zip
contains the single file.

ESP32forth.ino
which is a Forth written in Arduino-C to run on ESP32 Chips in general. No special Arduino ESP32 adoption, so far.

I was able to import the file into the IDE, but compilation fails.

  1. Please extend your emulation so that a "keyboard" and a "terminal" is supported and provided as visual tool. Forth is an interactive language, with embedded systems, so it wants to communicate by serial line with another computer running a "terminal" application, e.g. like "PuTTY" on Windows. So a serial port of ESP32, selectable by the developing user, should be connected to a virtual terminal, with VT100 emulation, virtual display on the browser screen, with option to enter text from the real Windows/Linux keyboard which run the browser, and it shall display text send by the serial device.

  2. Please check why the compilation of ESP32forth.ino fails, and if possible extend your system so that it can´t be compiled properly.
    First not accepted statement is

#define n1 (*sp)

Line 114
Compiler comment:
ESP32forth.ino1 of 38 problems
invalid conversion from 'cell_t' {aka 'int'} to 'void*' [-fpermissive]

Sincerely
Rolf

@hemmerling hemmerling added the enhancement New feature or request label Nov 13, 2021
@urish urish added bug Something isn't working and removed enhancement New feature or request labels Nov 13, 2021
@urish
Copy link
Contributor

urish commented Nov 13, 2021

Hi,

I was able to get it to compile after disabling the I2C support (commenting out #define ENABLE_I2C_SUPPORT). It seems like the current I2C support is not compatible with the latest Arduino core for the ESP32 (some methods like readTransmission/writeTransmission were removed, and ESP32Forth wasn't updated to support these changes).

Here's the version that compiles:

https://wokwi.com/arduino/projects/315160775983366721

Currently, it fails with an error, which might have to do with the fact I disabled the I2C support. You can try tinkering with the code and see if you can pinpoint the reason.

You can also try to compile a version on your computer and load it into the emulator as a bin file.

As for the serial terminal, it's already supported. You can enable it by adding the following to your diagram.json:

  "serialMonitor": {
    "display": "terminal"
  }

See here for the documentation.

@urish urish closed this as completed Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants