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


#25

Dear friends, good afternoon!
My experiments with assembler continued, and I tried receiving data from a one-dimensional photodiode array ILX554B (2048 elements).

https://github.com/molnija2/CH32V307_uLisp/blob/main/IMG_03-01-2026.jpg

and draw it

https://github.com/molnija2/CH32V307_uLisp/blob/main/IMG_03-01-2026-g.jpg
Assembler significantly speeds up the code and allows for adjustments to very small time intervals.
As an experiment, I plan to try making a small spectrometer.
I’d also be interested in making a distance meter and a 3D scanner.
Both rvasm and ulisp together allow you to solve a wide range of problems

But I think the best platform for realizing all the possibilities is Sipeed MAiX One Dock

(8 Mbytes RAM, 16 Mbytes flash, a Micro SD card slot, a LCD interface)
http://www.ulisp.com/show?30X8


#26

Hello!

Do you have any suggestions on which of these two boards to choose? Will uLisp work mostly the same on both? The naming is really confusing! :S

https://www.aliexpress.com/item/1005005819702456.html

CH32V307 Evaluation Board RISC-V MCU Onboard Wch-link CH32V307VCT6 CH32V307V-EVT-R1 WCH

image

https://www.aliexpress.com/item/1005006504033913.html

CH32V307VCT6 development board CH32V307 VCT6 Demo Board RISC-V core support RT-Thread onboard

Best Regards


#27

Good afternoon, dear friends!

I apologize for not responding sooner. I couldn’t access the forum due to a poor connection.

I tried one of these boards (first image). ULISP launched successfully. But I had to disable macros:
//#define BOARD_HAS_ExternalRAM
//#define graphics_package
//#define touchscreen_support
//#define gfx_stdout
//#define lisplibrary
//#define sdcardsupport
//#define gfxsupport

I think you can buy any of these boards. And if you have any problems, we can fix the program.

After that, you can solder new SD card module (from AliExpress) to the connectors that match the schematic of my sandwich computer and uncomment #define sdcardsupport.


#28

Hello,

Thanks a lot for your feedback.

Currently, I’m tinkering with the micro:bit and waiting for a Calliope mini to arrive, but I will try to find some time in the coming months for general testing (though I don’t think I will go as far as soldering the SD card).

Best regards,