OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [example/] [demo_freeRTOS/] [README.md] - Blame information for rev 36

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 36 zero_gravi
  # FreeRTOS Demo for the NEORV32 Processor
2 22 zero_gravi
 
3 36 zero_gravi
This example shows how to run [FreeRTOS](https://www.freertos.org/) on the NEORV32 processor. It features the default
4
"blinky_demo" and the more sophisticated "full_demo" demo applications. See the comments in `main.c` and the according
5
source files for more information.
6 22 zero_gravi
 
7
The chip-specific extensions folder (`chip_specific_extensions/neorv32`) should be in `$(FREERTOS_HOME)/Source/portable/GCC/RISC-V/chip_specific_extensions`,
8
but is placed in this source directory for simplicity.
9
 
10
 
11
## Hardware Requirements
12
 
13 36 zero_gravi
* DMEM/IMEM requriements depend on the actual application (for example: 8kB DMEM and 16kB IMEM for *blinky_demo*)
14
* MTIME (machine timer) + UART + GPIO
15 22 zero_gravi
* `Zicsr` CPU extension
16
 
17
 
18
## Instructions
19
 
20 36 zero_gravi
Download FreeRTOS from the [official GitHub repository](https://github.com/FreeRTOS/FreeRTOS) or from the its official homepage.
21 22 zero_gravi
 
22
    $ git clone https://github.com/FreeRTOS/FreeRTOS.git
23
 
24 36 zero_gravi
Open the makefile from this example folder and configure the `FREERTOS_HOME` variable to point to your FreeRTOS home folder.
25 22 zero_gravi
 
26 36 zero_gravi
    FREERTOS_HOME ?= /mnt/n/Projects/FreeRTOSv10.4.1
27 22 zero_gravi
 
28
Compile the NEORV32 executable. Do not forget the `RUN_FREERTOS_DEMO` switch.
29
 
30
    $ make USER_FLAGS+=-DRUN_FREERTOS_DEMO clean_all exe
31
 
32
Note: The *.c sources and the FreeRTOS-specific part of the makefile have (include) guards that test if `RUN_FREERTOS_DEMO` is defined.
33
This has no pratical usage for the user - it is just a work-around for the NEORV32 CI environment.
34
 
35
Upload the executable (`neorv32_exe.bin`) to the processor via the bootloader and execute it.
36
 
37
```
38
Awaiting neorv32_exe.bin... OK
39
CMD:> e
40
Booting...
41
 
42 36 zero_gravi
FreeRTOS V10.4.1
43 22 zero_gravi
Blink
44
Blink
45
Blink
46
```
47
 
48 36 zero_gravi
## FreeRTOS Plus
49 22 zero_gravi
 
50 36 zero_gravi
To automatically add source and include files from FreeRTOS plus extensions add one (or more) of the following arguments when invoking `make`:
51 22 zero_gravi
 
52 36 zero_gravi
* FreeRTOS-Plus-CLI: `USER_FLAGS+=-FREERTOS_PLUS_CLI`
53
* FreeRTOS-Plus-TCP: `USER_FLAGS+=-FREERTOS_PLUS_TCP`
54
 
55
Example:
56
 
57
    $ make USER_FLAGS+=-DRUN_FREERTOS_DEMO USER_FLAGS+=-FREERTOS_PLUS_TCP clean_all exe
58
 
59
 
60
## Notes
61
 
62 22 zero_gravi
The onfiguration of the FreeRTOS home folder (via `FREERTOS_HOME`) is corrupted if the compiler shows the following error:
63
 
64
```
65
main.c:36:10: fatal error: FreeRTOS.h: No such file or directory
66
   36 | #include 
67
      |          ^~~~~~~~~~~~
68
compilation terminated.
69
make: *** [makefile:203: main.c.o] Error 1
70
```
71
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.