Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Compile error with 2.0.0 source file : section .data' will not fit in region rom' #2159

Description

@Ludovic37-center

Hi,
I followed the procedure to compile the latest firmware (https://black-magic.org/knowledge/compiling-windows.html).
When i try to build the firmware with these commands:

meson setup build --cross-file=cross-file/native.ini
cd build
ninja
ninja flash

I've got an error with ninja

[14/681] Linking target src/target/flashstub/rp_stub
Memory region         Used Size  Region Size  %age Used
            sram:         260 B         4 KB      6.35%
[15/681] Linking target src/target/flashstub/efm32_stub
Memory region         Used Size  Region Size  %age Used
            sram:          80 B         1 KB      7.81%
[16/681] Linking target src/target/flashstub/lmi_stub
Memory region         Used Size  Region Size  %age Used
            sram:          48 B         1 KB      4.69%
[494/681] Compiling C object deps/libopencm3/lib/stm32/u5/libopencm3_stm32u5.a.p/rcc.c.o
../deps/libopencm3/lib/stm32/u5/rcc.c: In function 'rcc_clock_setup_hsi':
../deps/libopencm3/lib/stm32/u5/rcc.c:104:12: warning: this condition has identical branches [-Wduplicated-branches]
  104 |         if (clock->ahb_frequency > rcc_ahb_frequency) {
      |            ^
[503/681] Compiling C object deps/libopencm3/lib/stm32/u5/libopencm3_stm32u5.a.p/.._.._cm3_dwt.c.o
../deps/libopencm3/lib/cm3/dwt.c: In function 'dwt_read_cycle_counter':
../deps/libopencm3/lib/cm3/dwt.c:103:1: warning: control reaches end of non-void function [-Wreturn-type]
  103 | }
      | ^
[545/681] Linking target blackmagic_native_firmware.elf
FAILED: [code=1] blackmagic_native_firmware.elf
"arm-none-eabi-gcc" @blackmagic_native_firmware.elf.rsp
C:/msys64/home/xxxx.yyyy/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: blackmagic_native_firmware.elf section `.data' will not fit in region `rom'
C:/msys64/home/xxxx.yyyy/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: region `rom' overflowed by 132 bytes
Memory region         Used Size  Region Size  %age Used
             rom:      131204 B       128 KB    100.10%
             ram:        7928 B        20 KB     38.71%
collect2.exe: error: ld returned 1 exit status
[562/681] Compiling C object blackmagic.exe.p/src_target_adiv5.c.obj
ninja: build stopped: subcommand failed.

Where did i go wrong ?

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