Skip to content

link error when building for debug, works with --release #19

Closed
rust-embedded/cortex-m-rt
#36
@bootchk

Description

@bootchk

This works: xargo build --release --target thumbv7m-none-eabi -v
But without --release I get:

error: linking with arm-none-eabi-ld failed: exit code: 1
....
= note: arm-none-eabi-ld:
You must specify the exception handlers.
Create a non pub static variable with type
cortex_m::exception::Handlers and place it in the
'.rodata.exceptions' section. (cf. #[link_section]). Apply the
#[used] attribute to the variable to make it reach the linker.
arm-none-eabi-ld:
Invalid '.rodata.exceptions' section.
Make sure to place a static with type cortex_m::exception::Handlers
in that section (cf. #[link_section]) ONLY ONCE.

Same error as in your FAQ but different cause?

Rookie to rust. My dev environment is in a vagga container https://github.com/bootchk/rustDevContainers rustNordicBlinky. The container script follows your tutorial more or less, for Nordic nrf52832. I get a blinky.rs to compile and load to a NRF52DK board, but it doesn't blink yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions