Line 1... |
Line 1... |
# FreeRTOS Demo for the NEORV32 Processor
|
# FreeRTOS Demo for the NEORV32 Processor
|
|
|
This is simple example shows the usage of [FreeRTOS](https://www.freertos.org/) on the NEORV32 processor. It uses the default *blink*
|
This example shows how to run [FreeRTOS](https://www.freertos.org/) on the NEORV32 processor. It features the default
|
demo application (`blinky_demo/main_blinky.c`). See the comments in that source file for more information.
|
"blinky_demo" and the more sophisticated "full_demo" demo applications. See the comments in `main.c` and the according
|
|
source files for more information.
|
|
|
The chip-specific extensions folder (`chip_specific_extensions/neorv32`) should be in `$(FREERTOS_HOME)/Source/portable/GCC/RISC-V/chip_specific_extensions`,
|
The chip-specific extensions folder (`chip_specific_extensions/neorv32`) should be in `$(FREERTOS_HOME)/Source/portable/GCC/RISC-V/chip_specific_extensions`,
|
but is placed in this source directory for simplicity.
|
but is placed in this source directory for simplicity.
|
|
|
|
|
## Hardware Requirements
|
## Hardware Requirements
|
|
|
* 8kB DMEM and 16kB IMEM
|
* DMEM/IMEM requriements depend on the actual application (for example: 8kB DMEM and 16kB IMEM for *blinky_demo*)
|
* MTIME (machine timer)
|
* MTIME (machine timer) + UART + GPIO
|
* `Zicsr` CPU extension
|
* `Zicsr` CPU extension
|
|
|
|
|
## Instructions
|
## Instructions
|
|
|
Download FreeRTOS from the [official GitHub repository](https://github.com/FreeRTOS/FreeRTOS).
|
Download FreeRTOS from the [official GitHub repository](https://github.com/FreeRTOS/FreeRTOS) or from the its official homepage.
|
|
|
$ git clone https://github.com/FreeRTOS/FreeRTOS.git
|
$ git clone https://github.com/FreeRTOS/FreeRTOS.git
|
|
|
Open the makefile from this example folder and configure the `FREERTOS_HOME` variable to point to the `FreeRTOS/FreeRTOS` home folder.
|
Open the makefile from this example folder and configure the `FREERTOS_HOME` variable to point to your FreeRTOS home folder.
|
|
|
FREERTOS_HOME ?= /mnt/n/Projects/FreeRTOS/FreeRTOS
|
FREERTOS_HOME ?= /mnt/n/Projects/FreeRTOSv10.4.1
|
|
|
Compile the NEORV32 executable. Do not forget the `RUN_FREERTOS_DEMO` switch.
|
Compile the NEORV32 executable. Do not forget the `RUN_FREERTOS_DEMO` switch.
|
|
|
$ make USER_FLAGS+=-DRUN_FREERTOS_DEMO clean_all exe
|
$ make USER_FLAGS+=-DRUN_FREERTOS_DEMO clean_all exe
|
|
|
Line 36... |
Line 37... |
```
|
```
|
Awaiting neorv32_exe.bin... OK
|
Awaiting neorv32_exe.bin... OK
|
CMD:> e
|
CMD:> e
|
Booting...
|
Booting...
|
|
|
FreeRTOS V10.3.1
|
FreeRTOS V10.4.1
|
Blink
|
Blink
|
Blink
|
Blink
|
Blink
|
Blink
|
```
|
```
|
|
|
|
## FreeRTOS Plus
|
|
|
## Note
|
To automatically add source and include files from FreeRTOS plus extensions add one (or more) of the following arguments when invoking `make`:
|
|
|
|
* FreeRTOS-Plus-CLI: `USER_FLAGS+=-FREERTOS_PLUS_CLI`
|
|
* FreeRTOS-Plus-TCP: `USER_FLAGS+=-FREERTOS_PLUS_TCP`
|
|
|
|
Example:
|
|
|
|
$ make USER_FLAGS+=-DRUN_FREERTOS_DEMO USER_FLAGS+=-FREERTOS_PLUS_TCP clean_all exe
|
|
|
|
|
|
## Notes
|
|
|
The onfiguration of the FreeRTOS home folder (via `FREERTOS_HOME`) is corrupted if the compiler shows the following error:
|
The onfiguration of the FreeRTOS home folder (via `FREERTOS_HOME`) is corrupted if the compiler shows the following error:
|
|
|
```
|
```
|
main.c:36:10: fatal error: FreeRTOS.h: No such file or directory
|
main.c:36:10: fatal error: FreeRTOS.h: No such file or directory
|