uLisp support for CH32 EVT Boards?


#21

There were three things going wrong there:

  1. uLisp makes any variable starting with ‘:’ evaluate to itself, so:
> :integer
:integer 

I’m not sure why yours is evaluating to 0, but perhaps you can fix it with defvar.

  1. The correct command to compile your fib function is:
(compile 'fib)
  1. In the version of the RISC-V compiler on the website I had inadvertently called the compile function “compiler”. I’ve fixed it now (or you can just type compiler).

Then it should work!


#22

David, thank you very much !

I added :integer and :boolean in lines :

(defvar :boolean ':boolean)
(defvar :integer ':integer)

The (compiler …) call is working.

27802> (defun fib (n)
  (if (< n 3) 1
    (+ (fib (- n 1)) (fib (- n 2)))))
fib

27771> (compiler 'fib)
fib

27510> (time (fib 27))
196418
Time: 93 ms

27510> 

This is fantastic!
I’m impressed with both uLisp assembler and compiler. They’re very effective tools.


#23

Hello, friends. My uLisp computer is now assembled on a PCB board and has been successfully tested. It can accommodate up to 1 MB of full-speed SRAM. There’s also an SD card slot and plenty of GPIO pins, battery for real time clocks. There are two TFT connectors:
NT35510 800x480 https://aliexpress.ru/item/1005003064492991.html?sku_id=12000023730188980

and ILI9488 480x320 https://aliexpress.ru/item/1005009422879126.html?sku_id=12000049049406632.

Perhaps this will be useful to someone. The Gerber files and program are available on the same GitHub link mentioned above.

This uLisp sandwich computer now looks like this

https://github.com/molnija2/CH32V307_uLisp/blob/main/IMG_1.jpg

https://github.com/molnija2/CH32V307_uLisp/blob/main/IMG_2.jpg


#24

Hello,

Thank you very much for sharing.

Best Regards