uLisp on ESP32C3 (RISC-V)


#1

Hi all,
has anybody tried uLisp on the ESP32C3? This is the one version of ESP32 which is based on RISC-V ISA, has only one core, but otherwise should be very similar to other ESP32s.

The board starts to be supported by arduino IDE via https://github.com/espressif/arduino-esp32 .
I did first steps with a fork of ulisp-esp, disabled the problem parts and managed to produce a slightly crippled version (no analog functions) that seems to run fine on the board: https://github.com/VaclavSynacek/ulisp-esp32c3-riscv .

Now I would like to use this as a study tool to learn RISC-V assembler. I started merging the assembler parts from ulisp-riscv, I have produced a version that compiles and boots, but it crashes badly with the first defun evaled. Fixing this is probably far above my skills so I would like to see if anybody got further. My crashing version is at the same repository, branch ‘with-assembler’.


#2

Thanks for your post. I also have a preliminary build of the ESP version of uLisp that supports the ESP32C3, and I tried porting the RISC-V assembler from the RISC-V version of uLisp, but like you I got stuck. The reason is that it doesn’t seem to be possible to run code in RAM on the ESP32C3 without causing an exception.

I posted a description of the problem on the ESP32 forum here:

How can I write machine code into RAM and then execute it?

There’s a simple test program there that demonstrates the problem. I haven’t been able to make any further progress.

In the meantime if you want to learn RISC-V assembler I would recommend getting one of the Sipeed RISC-V boards; the assembler works really well on these. See Sipeed MAiX RISC-V boards.