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

Subversion Repositories neorv32

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

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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