Some basic problem… I hope


#1

Hi,

( I am using GENTOO Linux…)

…I hope this could be identified as some problems of a certain person sitting right in front of my monitor instead
of being caused by a damaged board…
I donwloaded uLisp 4.0a for the ESP32, load it into the Arduino IDE, fixed some compilation error (which are already reported by others) and flashed my ESP32 (a TTGO T8 1.7.1 using ESP 32 DevKit setting in the Arduino IDE with the according settings).

When booting the board, while the serial monitor is already running, most of the time there is no “About” message, but sometimes it is.

Simple examples do work - something like ( * 2 21 ) => 42 .
Floating point also works…
The wifi connect works.

But the FFT-example? No…it eats the code of the example and the benchmark…and thats it.
(solve) does nothing and anything else from above does nothing, too. The boad is “dead”.
Powercycling de-zombie-fies the board again.

What could be the possible reasons?

( for (lot a thanks) (help any) )
mcc


#3

I’ve tried the FFT example on an ESP32 board and it seems to work fine.

How did you enter the FFT example? Did you copy the entire program from:

Fast Fourier Transform program

and then paste it into the Serial Monitor? Also, you refer to executing:

(solve)

I assume for the FFT program you mean:

(pprint (fftr '(1 1 1 1 0 0 0 0)))

The problem of hanging up like you’re describing can happen if you accidentally fail to enter the correct number of matching closing brackets. The solution is to try and type a few extra ones, such as:

)))

(it doesn’t matter if you type too many), followed by Return, and that often gets your Lisp prompt back, so you can check what’s happened.

Let me know if you solve it.


#4

Hi David,

thanks for the tests and for helping me! :)

Sorry, I confused the used ‘final command’ in my post (I did it right with my uLisp Installation, though).
The problem seems to be, that the process hangs, if I feed the whole source code into the board via the serial
monitor in one go.
After entering the source code function by function I was able to get the wanted result.
I am using Linux. Do you know of any small and neat program to replace the serial monitor of the Arduino
IDE? Minicom and Putty are already “too big”, I think. I want to check, where the bottle neck is.

Cheers!
mcc


#5

I’m not very familiar with using Linux, but I know that several other uLisp users are on Linux. Does anyone else have any suggestions?


#6

Hi John,

I found an application, which at let me paste greater examples.
It is called picocom. If rlwrap is installed also, you will get a REPL with
readline functionality - that is beside other things a command history and
cursor movement commands.
You need to call this commando this way then:

rlwrap -t -a picocom -b 9600 /dev/ttyUSB0

You need to change the device depending on what the actual boards exposes.

I pasted the Sudoku-solver into my esp32 (a TTGO T8 v1.7.1) and that process works fine.
Then I started the program via (solve) and got this:

7465> (solve)
Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception).
Debug exception reason: Stack canary watchpoint triggered (loopTask)

After the that the board goes into deep sleep…only powercycling helps.

Is this correct? Does someone here uses the same board with success and would share her/his settings?

Cheers!
mcc


#7

Yes, I get the same problem with the Sudoku solver. The problem is that the program recurses too deep on the stack, and causes a stack overflow, which triggers the stack canary.

On most boards the stack is positioned above the user RAM, so you can increase the amount of available stack by reducing the amount of RAM allocated to uLisp’s workspace. However, on the ESP32 the stack size is fixed, and I haven’t found a way to increase it.

I’ll add a note to the Sudoku solver. Try some of the other examples!