Update RISC-V Demo for Spike simulator - #1415
Draft
JanMatCodasip wants to merge 1 commit into
Draft
JanMatCodasip wants to merge 1 commit into
JanMatCodasip wants to merge 1 commit into
Conversation
Some commands in the Makefile and OpenOCD config file had to be updated to work with the current OpenOCD and RISC-V toolchain. Makefile: - Zicsr is now a standalone extension, so update the value of the -march argument, passed to GCC. spike-1.cfg for OpenOCD: - Update commands that changed their syntax - avoid deprecation warnings. - Remove "adapter_khz" command - the virtual jtag_vpi adapter does not have any concept of clock frequency. - Update -expected-id to match the JTAG IDCODE used by the Spike simulator. - Fix the syntax of the "expr" command. - Remove the command that zeroes mstatus register upon startup, as this would break the program operation. It is unclear why the command was there in the first place. Signed-off-by: Jan Matyas <[email protected]>
JanMatCodasip
marked this pull request as draft
June 24, 2026 11:38
Author
|
I’m keeping this PR in draft for now because, as of June 2026, FreeRTOS support for RISC-V in OpenOCD is still in a complicated state:
Even so, the changes in this PR may be useful to other developers working on FreeRTOS support in OpenOCD, so I’m publishing them in draft form. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some commands in the Makefile and OpenOCD config file had to be updated to work with the current OpenOCD and RISC-V toolchain.
Makefile:
spike-1.cfg for OpenOCD:
Test Steps
cd FreeRTOS/Demo/RISC-V-spike-htif_GCCPATH=/path/to/your/xpack-riscv-none-elf-gcc-15.2.0-1/bin:$PATH make CROSS=riscv-none-elf- DEBUG=1/path/to/your/bin/spike -p1 --isa rv32ima_zicsr -m0x80000000:0x10000000 --rbb-port 9824 build/RTOSDemo32.axf/path/to/your/bin/openocd -f spike-1.cfgChecklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.