Skip to content

cortex_r5: ebldr_stage0.bin links to 0 bytes (the linker script keeps .vectors, which nothing emits) #137

Description

@Kartikey1306

What

cmake -DCMAKE_TOOLCHAIN_FILE=toolchains/arm-none-eabi-r5.cmake -DEBLDR_BOARD=cortex_r5 builds without an error and produces ebldr_stage0.bin of 0 bytes: boards/cortex_r5/cortex_r5_stage0.ld keeps *(.vectors) and declares no ENTRY(), while the only startup file in the tree, stage0/reset_entry.c, places its table in .isr_vector (Cortex-M shape: initial SP then handler addresses). Nothing emits .vectors, so --gc-sections discards everything. objdump -h ebldr_stage0.elf.vectors 00000000, .text 00000000.

The port's r5_jump() calls the target address as a function, which is the Cortex-R convention (the first word must be an instruction), so the Cortex-M-shaped table would not be the right entry for this core even if the script kept it. The stage-0 startup for a Cortex-R5 has to be written for that core.

No PR-gating workflow builds this board; the stage-1 half of the same defect (#136) is fixed for stm32f4 in the PR that closes it, and the cortex_r5 stage-1 script is anchored the same way there so its stage-1 links, but its stage-0 remains empty until this is addressed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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