cpu/riscv_common: fix undeclared memory region linker error#17581
cpu/riscv_common: fix undeclared memory region linker error#17581benpicco merged 1 commit intoRIOT-OS:masterfrom
Conversation
|
Never mind I though it was an error, but it's a warning, I also get it. |
|
I've seen the warning here too. A different solution would be to use a region alias and keep the names in our linker scripts in sync with the rest of RIOT. I'll leave it up to you to decide what you prefer. |
|
Or just |
Since commit 3a11b1f (RIOT-OS#16972) building RIOT applications with `BOARD=hifive1` causes the following linker error to be emitted on my system: /opt/rv32imc/lib/gcc/riscv32-unknown-elf/10.2.0/../../../../riscv32-unknown-elf/bin/ld:riscv_base.ld:220: warning: memory region `rom' not declared This is due to the fact that the RISC-V linker script doesn't have a rom memory region. While many other ARM-based boards have a rom memory region defined in the linker script, the corresponding region name in the RISC-V linker script is flash and rom is not declared as a memory region hence the warning. I think this was accidentally overlooked in 3a11b1f. It is fixed in this commit by replacing the rom region with the flash region. The linker script identifiers (e.g. _srom and _erom) are not renamed.
Looks good. Thanks for fixing ! |
Since commit 3a11b1f (#16972) building RIOT applications with
BOARD=hifive1causes the following linker warning to be emitted on my system:This is due to the fact that the RISC-V linker script doesn't have a rom memory region. While many other ARM-based boards have a rom memory region defined in the linker script, the corresponding region name in the RISC-V linker script is flash and rom is not declared as a memory region hence the warning.
I think this was accidentally overlooked in 3a11b1f. It is fixed in this commit by replacing the rom region with the flash region. The linker script identifiers (e.g. _srom and _erom) are not renamed.
@Ollrogge can you confirm that the changes proposed here are aligned with 3a11b1f?