FreeRTOS singlestep issue
arunthomas opened this issue · 0 comments
I have been experimenting with SiFive's FreeRTOS demo application: https://github.com/sifive/freedom-e-sdk/tree/FreeRTOS
When I run the demo on QEMU without singlestep, the demo runs successfully:
qemu-system-riscv32 -machine sifive_e -nographic -kernel RISCV_HiFive1_GCC.elf
Sending to queue
Recieved: 100
Sending to queue
Recieved: 100
Sending to queue
Recieved: 100
Sending to queue
Recieved: 100
Giving Semaphore
RTOS Timer Callback
Semaphore taken
...
When I enable '-singlestep', the demo fails:
qemu-system-riscv32 -machine sifive_e -nographic -kernel RISCV_HiFive1_GCC.elf -singlestep
Giving Semaphore
Giving Semaphore
Giving Semaphore
Giving Semaphore
Giving Semaphore
...
I have reproduced the issue with QEMU built from the riscv-all branch. I built FreeRTOS with a recent 32-bit riscv-gnu-toolchain (--with-arch=rv32g --with-abi=ilp32
) built from master.
I built FreeRTOS by cloning https://github.com/sifive/freedom-e-sdk/tree/FreeRTOS. I made the following modifications to software/FreeRTOSv9.0.0/Demo/RISCV_HiFive1_GCC/Makefile.inc
:
- Set CC_PATH to point to my toolchain bin dir
- Modified TARGET to be riscv32-unknown-elf
I build FreeRTOS using:
make -C freedom-e-sdk/software/FreeRTOSv9.0.0/Demo/RISCV_HiFive1_GCC
The FreeRTOS demo code can be found here: https://github.com/sifive/freedom-e-sdk/blob/FreeRTOS/software/FreeRTOSv9.0.0/Demo/RISCV_HiFive1_GCC/main.c