mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 08:47:45 -04:00
* Remove co-routine centric CORTEX_LM3S102_Rowley demos. Remove CORTEX_LM3S102_Rowley Demo2 and Demo3. Update Demo1 to no longer use coroutines. * Remove co-routines from MB91460_Softune demo * FreeRTOS_96348hs_SK16FX100PMC: Remove co-routine usage. Remove co-routine usage from FreeRTOS_96348hs_SK16FX100PMC demo. * MB96350_Softune_Dice_Kit: Remove co-routine usage Remove co-routines usage from MB96350_Softune_Dice_Kit demo * AVR_Dx_IAR: Remove co-routine usage * AVR_Dx_Atmel_Studio: Remove co-routine usage * PIC24_MPLAB: Remove autogenerated files and add to .gitignore * PIC24_MPLAB: Remove co-routine usage from demo * AVR_ATMega323_IAR: Remove co-routine usage * ColdFire_MCF52221_CodeWarrior: Remove coroutine usage * AVR_ATMega4809_MPLAB.X: Remove co-routine usage * AVR_ATMega4809_IAR: Remove co-routine usage * AVR_ATMega4809_Atmel_Studio: Remove coroutine usage * AVR_ATMega323_WinAVR: Remove coroutine usage * AVR_Dx_MPLAB.X: Remove coroutine usage * dsPIC_MPLAB: Remove coroutine usage * CORTEX_LM3S102_GCC: Remove coroutines and coroutine centric demos * CORTEX_LM3S102_GCC: Update makefile to discard unused symbols Allows fitting in the limited ram/flash for this part. * CORTEX_LM3S316_IAR: Remove coroutines * Demos: Remove references to crflash.c, crhook.c, crflash.h, crhook.h * Remove coroutine options from FreeRTOSConfig.h files * Xilinx: Remove backup file generated by revup utility * Demos: Remove Coroutine related config items and references * Format CBMC FreeRTOSConfig.h * Update URL from aws.amazon.com/freertos to github.com/FreeRTOS * Fix copyright year and license text * Fix license text in demo files * Update header check excluded path list * Add configBENCHMARK to lexicon |
||
---|---|---|
.. | ||
build/gcc | ||
FreeRTOSConfig.h | ||
main.c | ||
main_blinky.c | ||
main_full.c | ||
ns16550.c | ||
ns16550.h | ||
Readme.md | ||
riscv-reg.h | ||
riscv-virt.c | ||
riscv-virt.h | ||
vector.S |
Emulating generic RISC-V 32bit machine on QEMU
Requirements
- GNU RISC-V toolchains (tested on pre-built Sifive GNU Embedded Toolchain — v2020.12.8)
- qemu-riscv32-system (tested on pre-built Sifive QEMU — v2020.08.1)
- Linux OS (tested on Ubuntu 20.04.3 LTS)
How to build
Add path of toolchain that is described above section, such as:
$ export PATH="/YOUR_PATH/riscv64-unknown-elf/bin:${PATH}"
For release build:
$ make -C build/gcc/
For debug build:
$ make -C build/gcc/ DEBUG=1
To clean build artifacts:
$ make -C build/gcc/ clean
If the build was successful, the RTOSDemo.elf executable will be located in the build/gcc/output directory.
How to run
$ qemu-system-riscv32 -nographic -machine virt -net none \
-chardev stdio,id=con,mux=on -serial chardev:con \
-mon chardev=con,mode=readline -bios none \
-smp 4 -kernel ./build/gcc/output/RTOSDemo.elf
How to debug with gdb
Append -s and -S options to the previous qemu command.
- -s: enable to attach gdb to QEMU at port 1234
- -S: start and halted CPU (wait for attach from gdb)
It is recommended to use the 'debug build' so that gdb can automatically map symbols. Run these commands after starting the QEMU with above options:
$ riscv64-unknown-elf-gdb -x build/gcc/gdbinit
Description
This demo just prints Tx/Rx message of queue to serial port, use no other hardware and use only primary core (currently hart 0). Other cores are simply going to wfi state and execute nothing else.