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

Unable to compile app-helloworld #7

Closed
szczys opened this issue Oct 4, 2019 · 1 comment
Closed

Unable to compile app-helloworld #7

szczys opened this issue Oct 4, 2019 · 1 comment

Comments

@szczys
Copy link
Contributor

szczys commented Oct 4, 2019

When typing make from the app-helloworld folder I'm hit with the inability to find gcc (although this is in my path so not sure why):
make: /riscv32-unknown-elf-gcc: Command not found

Adding this line into the apps-sdk/sdk.mk file gets the make process running for a bit:
RISCV_TOOLCHAIN_PATH := /opt/riscv/bin

But then I run into a linker error:

/opt/riscv/lib/gcc/riscv32-unknown-elf/9.2.0/../../../../riscv32-unknown-elf/bin/ld: build//apps-sdk/gloss//crt0.o: in function `.L0 ':
/home/mike/compile/hadbadge2019_fpgasoc/apps-sdk/gloss/crt0.S:20: multiple definition of `_start'; /home/mike/compile/hadbadge2019_fpgasoc/app-helloworld/build/apps-sdk/gloss/crt0.o:/home/mike/compile/hadbadge2019_fpgasoc/apps-sdk/gloss/crt0.S:20: first defined here
collect2: error: ld returned 1 exit status
../apps-sdk/sdk.mk:111: recipe for target 'helloworld.elf' failed
make: *** [helloworld.elf] Error 1

Any idea where I'm going wrong?

@Spritetm
Copy link
Owner

Spritetm commented Oct 4, 2019

I blame the incomprehensibleness of gcc linking / not linking against system libs. Should be fixed now, both the issue where the sdk borks with no prefix and the toolchain in $PATH as well as the linker error. Please retry with current master.

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

No branches or pull requests

2 participants