BrunoLevy / learn-fpga

Learning FPGA, yosys, nextpnr, and RISC-V
BSD 3-Clause "New" or "Revised" License
2.44k stars 236 forks source link

Icesugar-nano flash #66

Closed abderraouf-adjal closed 1 year ago

abderraouf-adjal commented 2 years ago

Fix issues in scripting, and add the support of running from flash for the dev board icesugar-nano.

details to run hello.c:

% make ICESUGAR_NANO
% cd FemtoRV/FIRMWARE/EXAMPLES
% make hello.prog
abderraouf-adjal commented 2 years ago

@BrunoLevy Hello, this chain of improvements are working fine in my end for icesugar-nano (ice40lp1k). I don't know if anyone has the same board to test it too. The CPU is running from the SPI flash very well.

Maybe @wuxx the maker of that board can help testing?

Chandler-Kluser commented 2 years ago

@abderraouf-adjal, when I cloned your fork these files didn't come along with I don't know why.

But I have tested in my icesugar-nano board. The linebreaks didn't work as expected, but it works!!

uart-hello-icesugar-nano

abderraouf-adjal commented 2 years ago

@Chandler-Kluser I didn't understand if you are saying the patch doesn't work or no. If the only issue is the new line breaks maybe it's related to the UART application, try something else like the one from Arduino IDE or gtkterm, you can easily choose the new line char mode (unix, ms-windows, mac)

Chandler-Kluser commented 2 years ago

It does work!!

about the UART: tried putty and screen, I had the same outputs

abderraouf-adjal commented 2 years ago

@Chandler-Kluser Use "gtkterm", select the right port, then from menu: "Configuration -> CR LF Auto". You have to tell the serial apps what line ending is being used.

Chandler-Kluser commented 2 years ago

In PuTTY you can solve this issue with Implicit CF on every LF in option:

https://documentation.help/PuTTY/config-crlf.html