Skip to content
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

Building picosoc test firmware fails #1967

Closed
nickoe opened this issue Jan 24, 2021 · 0 comments · Fixed by #1972
Closed

Building picosoc test firmware fails #1967

nickoe opened this issue Jan 24, 2021 · 0 comments · Fixed by #1972

Comments

@nickoe
Copy link
Contributor

nickoe commented Jan 24, 2021

I just wanted to try to modify the firmware for the picosoc demo in symbiflow-examples. I found the firmware for it in this symbiflow-arch-defs repository.

I installed the toolchain with:
conda install -c litex-hub gcc-riscv32-elf-newlib

But when building I get this error:

riscv32-unknown-elf-gcc -DHX8KDEMO -DCLK_FREQ=25000000 -DNOSPIFLASH -march=rv32im -Wl,-Bstatic,-T,sections.lds,--strip-debug -ffreestanding -nostdlib -mstrict-align -O0 -o firmware_noflash_25.elf start.s firmware.c
cc1: error: requested ABI requires '-march' to subsume the 'D' extension
make: *** [Makefile:22: firmware_noflash_25.elf] Error 1

There is some details about the compiler args on https://www.sifive.com/blog/all-aboard-part-1-compiler-args

I found that I could add -mabi=ilp32 and then it would build. I am not sure if this is the correct fix, but it appears to be working when I synth the verilog and put it on the basys3. At least it includes my new "printf" and it runs as before.

./hex2progmem.py --rom-style initial firmware/firmware_noflash_100.hex  > ~/symbiflow-examples/xc7/picosoc_demo/progmem.v
.....
make
openocd ....

Version info about compiler for completeness:

riscv32-unknown-elf-gcc --version
riscv32-unknown-elf-gcc (9.2.0) 9.2.0
nickoe added a commit to nickoe/symbiflow-arch-defs that referenced this issue Jan 24, 2021
Add mabi option to make the picosoc example build

Fixes f4pga#1967
nickoe added a commit to nickoe/symbiflow-arch-defs that referenced this issue Jan 25, 2021
Add mabi option to make the picosoc example build

Fixes f4pga#1967

Signed-off-by: Nick Østergaard <oe.nick@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant