-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build(Examples,Tools): Upgrade RISC-V Toolchain, Update Project Files #628
build(Examples,Tools): Upgrade RISC-V Toolchain, Update Project Files #628
Conversation
- This also adds the RISCV_PREFIX and ARM_PREFIX options to better avoid conflicts for multi-core projects
… rename this in the future to 'make info')
- Upgrade RISCV toolchain to riscv-none-elf v12.2.0-3.1 - Remove duplicate entries in settings.json arrays - Match project settings to projects with non-default BSPs
fdebeaf
to
6bdcc24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know too much about the toolchain and project files, but looks good.
Reverted mass project generation to make this PR more readable. The diff shouldn't crash your laptop anymore |
"${config:board}", | ||
"TARGET=${config:target}", | ||
"TARGET_REV=0x4131", | ||
"__GNUC__" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have any code anymore that uses 'TARGET_REV'. We should probably start trying to phase it out.
@@ -44,7 +44,7 @@ all: build/$(PROJECT)-combined.elf | |||
build/$(PROJECT)-combined.elf: build/$(PROJECT).elf buildrv/$(PROJECT).elf arm riscv | |||
@arm-none-eabi-objcopy -I elf32-littlearm build/$(PROJECT).elf -O ihex build/$(PROJECT).hex | |||
@cat build/$(PROJECT).hex | sed '/^:00000001FF/d' > build/$(PROJECT)a.hex | |||
@riscv-none-embed-objcopy buildrv/$(RV_PROJECT).elf -O ihex buildrv/$(PROJECT).hex | |||
@riscv-none-elf-objcopy buildrv/$(RV_PROJECT).elf -O ihex buildrv/$(PROJECT).hex | |||
@cat build/$(PROJECT)a.hex buildrv/$(PROJECT).hex > build/$(PROJECT)-combined.hex | |||
@arm-none-eabi-objcopy -I ihex build/$(PROJECT)-combined.hex -O elf32-littlearm build/$(PROJECT)-combined.elf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using $(ARM_PREFIX)-objcopy
and $(RISCV_PREFIX)-objcopy
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, I verified the added RISCV extensions are supported in the RTL
- Bump RISCV toolchain - Use project_defines.h
This PR depends on #619 for its consolidated gcc.mk files.
Overview
riscv-none-elf
toolchain. (5188f32)riscv-none-elf
toolchain as default instead of the deprecatedriscv-none-embed
. (d678542)riscv-none-elf
version 12.2.0-3.1. (d678542, 92d8d1c)Tools/xPack/riscv-none-elf-gcc/12.2.0-3.1
Project File Updates
For the most part, the changes are:
.vscode/settings.json
(resolves MSDK-1201)MSDKGen has also been updated to check for projects that come preconfigured for non-default boards to match project settings when needed.
RISC-V -march Change
Commit: 5188f32
The upgrade to
riscv-none-elf
changed the default ISA spec. As recommended by this discussion post, the default-march
option when using the new toolchain is now-march=rv32im_zicsr_zifencei
. Note the new option does not use the compressed instruction set.The old toolchain still defaults to
-march=rv32imc
.-mabi
has been kept atilp32
.Our old
gcc_riscv.mk
file also seemed to be passing-march=rv32im
to the compiler, but-march=rv32imafdc
to the linker. It also did not give the-mabi
option to the linker. I think this was a mistake but I'm not sure what the ramifications of the old behavior was. The new implementation passes the same-march
and-mabi
to the compiler, assembler, and linker stages.