Can an ESP32 work with the ESP8266 file?


#1

There is a LISP for the ESP8266.

Unfortunately I have only ESP32’s at home.
To make it work I downloaded from https://github.com/espressif/arduino-esp32.git
and send it target directory c:/program files (x86)/Arduino/hardware/espressif/esp32
then in c:\Program files (x86)\Arduino\hardware\espressif\esp32\tools I executed get.exe
Then I followed the instructions for making the ESP8266.
That didn’t work.

Is there a way to make it work?


#2

I’ll have a look over the next few days.


#3

I’ve got a version of uLisp working with the ESP32 here:

ulisp-esp32 on GitHub

It’s functionally equivalent to the ARM version, and doesn’t yet have the Wi-Fi features of the ESP8266 version.


#4

Thank you very much, David

That’s extremely fast!
Where do you want your statue? :)

Don’t want to push you: are the Wi-Fi features in the pipeline?

Kind regards

Frank


#5

Wi-Fi (and Bluetooth) will take a bit longer!


#6

Very cool, I think ESP32 is one of the most interesting microcontroller platforms these days.
I had to change ‘Serial1’ to ‘Serial’ to make it compile for Wemos LoLin32 board.
After this modification it seems to run fine (didn’t do much testing).
Is it possible to use much more memory (RAM)? This chip has 520kBytes of RAM (I know a bit is used by the system for WiFi, Cache etc.), and there are variants with 4M PSRAM…? Would be really cool!
Kind regards,
Kaef


#7

Glad to hear you got it working.

I didn’t really experiment with allocating more memory - to try it just change the figure in the:

#define WORKSPACESIZE

Let me know how you get on.

David


#8

I didn’t know anything about ESP32 memory table, all I know is that a part of the flash is cached in RAM. I suggest FreeRTos also need some memory…

I did some quick tests:

  • WORKSPACESIZE
  • 12000 – seems to work, may not working with real lisp programs (didn’t tested yet)
  • 12500 – esp32 didn’t start / bootloop
    ‘ESP32/esp-idf-public/components/freertos/./timers.c:921 (prvCheckForValidListAndQueue)- assert failed!’
  • 13000 – no linking possible:
    section .dram0.bss' will not fit in regiondram0_0_seg
    xtensa-esp32-elf/bin/ld: region `dram0_0_seg’ overflowed by 1064 bytes

A workspace size of 12.000 cons would allocate 96kBytes of memory – too few because a few 100kBytes should be available…
The compiler says:
Globale Variablen verwenden 108260 Bytes (36%) des dynamischen Speichers
(i.e.: 'Global variables use 108260 Bytes (36%) dynamic(?) memory (possible RAM).)

I don’t habe a board with PSRAM here and I’m not sure how to use it…
Maybe we can change the dram0_0_segment size (linker settings?) or using another RAM segment for the data…

I’ll do some tests with the 12.000 workspacesize…

(tak 18 12 6) is working…

Kaef


#9

Tested with 12.000 WORKSPACESIZE:
(fib 23) works
(fib 30) works
(for-millis () (print (fib 30))) works
So generally I think this works correctly (more tests are needed to proof).

(for-millis) troughs an exception (rebooting…), don’t know what happens on other platforms

Regards,
Kaef


#10

(for-millis) should give an error message as it does on other platforms; the exception is a bug. I’ll add it to the Issues on GitHub.

Thanks, David


#11

David,

I expanded the esp32 version to use the psram (4MBytes) of the ESP32-WROVER module (I expect that other boards with psram should work too):

BOARD_HAS_PSRAM
uLisp 2.0 beta
compiled: Oct  3 2018 15:54:53
524279> (gc)
Space: 0 bytes, Time: 607855 uS
nil
524213> (tak 18 12 6)
7
524213> (for-millis () (tak 18 12 6))
10457
524213>

I didn’t do much tests with that version ( (wifi-connect “AP” “Pass”) works), but in general it seems to work fine.

I’d love to upload the modified code somewhere (or send a PM)? Are you interested?

Kindly regards,
Kaef


#12

I’m currently working on a version of uLisp designed to run on either ESP8266 or ESP32 boards; hope to have it ready in a week or so. Your PSRAM extensions sound a really good idea - please email me the file and I’ll be glad to incorporate them in the final version.

David


#13

That is great, thank you!
Do you plan to add SD card support for the esp32 too (for load/save-image and maybe to read lisp-sources from textfiles)?


#14

Yes, the SD card support is there too - I just need to test it.

I’ve recently received this ESP32-WROVER board with an SD Card slot, so plan to test both features on that:

Regards, David


#15

Very cool,
I have a wrover module which I soldered to a small baseboard. I will add a sd-card adapter, so I can test the functions…

Thank you very much,
regards,
Kaef


#16

There is now a full version of uLisp for the ESP8266 and ESP32; see http://www.ulisp.com/.


#17