Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eefc3af

Browse files
committed
* Updated documentation (lxterm is now called litex_term)
* Added orange-crab documentation * small fix in tinyraytracer (colliding min/max macros)
1 parent d54846c commit eefc3af

File tree

6 files changed

+56
-5
lines changed

6 files changed

+56
-5
lines changed

LiteX/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Synthesize
4646
Instructions to synthesize are different, depending on the board you have.
4747

4848
- [ULX3S](ULX3S.md)
49+
- [OrangeCrab](orange_crab.md)
4950
- [Other boards](litex-boards.md)
5051

5152
Connect to the SoC
@@ -57,7 +58,7 @@ of `/dev/ttyUSBnnn`), use `$dmesg` right after plugging it (or try
5758
different values). Supposing it is `ttyUSB0`, do:
5859

5960
```
60-
$lxterm /dev/ttyUSB0
61+
$litex_term /dev/ttyUSB0
6162
```
6263

6364
Then press `<enter>`. You will see the `litex>` prompt.

LiteX/ULX3S.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ improvements as compared to the original LiteX design (see
2020
FOR NOW, NEEDS TO BE ADAPTED TO NEW LITEX)
2121
- fixed a video timing problem
2222
- added a crude Blitter to accelerate some graphic functions (clear, fillrect, fillpoly)
23-
23+
- NOTE: you may need to do a [simple modification](https://github.com/enjoy-digital/litex/issues/1712) in
24+
one of LiteX's files to be able to access the SDCard.
2425

2526
To generate the bitstream for the ULX3S, you will first need to:
2627

@@ -51,7 +52,7 @@ FemtoRV directly from its github repository, great !). It will also
5152
compile the BIOS, synthesize the gateware and send it to the
5253
device. If everything went well, you will see the colorful 'knight
5354
driver' blinky of victory on the LEDs. Now you can connect to the SoC
54-
with `lxterm /dev/ttyUSB0`.
55+
with `litex_term /dev/ttyUSB0`.
5556

5657
Now let us see how to write some [software for our SoC](software/README.md).
5758

LiteX/orange_crab.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
LiteX Instructions for OrangeCrab:
2+
----------------------------------
3+
4+
Before starting:
5+
6+
Make sure you have updated `udev rules` to allow accessing the USB port of the OrangeCrab in
7+
user mode, as explained [https://github.com/BrunoLevy/learn-fpga/blob/master/FemtoRV/TUTORIALS/toolchain.md#orangecrab-ecp5](here).
8+
9+
Synthesize and program:
10+
```
11+
$ cd learn-fpga/LiteX
12+
$ python3 -m litex_boards.targets.gsd_orangecrab --device 25F --cpu-type femtorv --cpu-variant gracilis --with-spi-sdcard --build --load --ecppack-compress
13+
```
14+
(replace `25F` with the one in your device (there is also a `45F` and a `85F` version).
15+
16+
Build software:
17+
Edit `software/makefile.inc`
18+
- set `LITEX_DIR` and `LEARNFPGA_DIR`
19+
- set `LITEX_PLATFORM` to `gsd_orangecrab`
20+
```
21+
$ cd software/LiteOS
22+
$ make
23+
$ cd ../Programs
24+
$ make hello.elf
25+
```
26+
27+
Copy `LiteOS/boot.bin` and `Programs/hello.elf` to a SDCard
28+
Insert the SDCard in the OrangeCrab
29+
30+
```
31+
$ litex_term /dev/ttyACM0
32+
$ reboot
33+
```
34+
35+
This should load LiteOS from the SDCard
36+
37+
Run a simple program:
38+
```
39+
liteOS> run hello.elf
40+
```

LiteX/software/DemoBundle/demos/tinyraytracer.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616

1717
/*******************************************************************/
1818

19+
#ifdef min
20+
#undef min
21+
#endif
22+
23+
#ifdef max
24+
#undef max
25+
#endif
26+
27+
1928
typedef int BOOL;
2029

2130
static inline float max(float x, float y) { return x>y?x:y; }

LiteX/software/LiteOS/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ slot of your FPGA board.
3131
Step 3: run
3232
-----------
3333
Reboot the board. The LiteX BIOS automatically finds `boot.bin` on the
34-
SDCard and loads it. Connect to it using `lxterm /dev/ttyUSBnnn` where
34+
SDCard and loads it. Connect to it using `litex_term /dev/ttyUSBnnn` where
3535
`nnn` depends on the circumstances (it is 0 in most cases). If everything
3636
went well, you will see the LiteOS prompt.
3737

LiteX/software/Programs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Compile the programs:
88
```
99
$ make
1010
```
11-
Then copy all `.elf` files to the SDCard. Connect to the SoC (`lxterm
11+
Then copy all `.elf` files to the SDCard. Connect to the SoC (`litex_term
1212
/dev/ttyUSBnnn`), and verify that the programs are there:
1313
```
1414
liteOS> catalog

0 commit comments

Comments
 (0)