Skip to content

Compiling large baremetal programs for dram #215

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

Open
Juan-Gg opened this issue May 29, 2025 · 0 comments
Open

Compiling large baremetal programs for dram #215

Juan-Gg opened this issue May 29, 2025 · 0 comments

Comments

@Juan-Gg
Copy link

Juan-Gg commented May 29, 2025

I am trying to compile a reasonably large bare-metal program that does not fit in the 64K spm by about 15K, so I am linking it for dram with the provided makefile.

It throws the following error:
strlen.c:(.text.strlen+0x8): relocation truncated to fit: R_RISCV_HI20 against `.LC0'`

Which I on a google search I found to be related with using -mcmodel=medlow instead of -mcmodel=medany. But cheshire's makefile already uses -mcmodel=medany.

Any ideas on why may I be getting this error?

Thanks.

P.D. Just noticed spm is set to 128 KB. But the problem remains.

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

1 participant