stm32n6 using cubeai to train its model; compilation fails: `.rodata' will not fit in region `ROM'
- May 21, 2025
- 1 reply
- 515 views
Hello
I trained handwritten digits using Keras, and then used cubeai of cubeMX to train and deploy, and then there was an error when compiling. Do you know how to solve it?
16:20:25 **** Incremental Build of configuration Debug for project stm32N6_hand02_FSBL ****
make -j8 all
arm-none-eabi-gcc -o "stm32N6_hand02_FSBL.elf" @"objects.list" -l:NetworkRuntime1000_CM55_GCC.a -mcpu=cortex-m55 -T"E:\07_Stm32\stm32u575\stm32N6_hand02\FSBL\STM32N657X0HXQ_AXISRAM2_fsbl.ld" --specs=nosys.specs -Wl,-Map="stm32N6_hand02_FSBL.map" -Wl,--gc-sections -static -Wl,--cmse-implib -Wl,--out-implib=./secure_nsclib.o -L../../Middlewares/ST/AI/Lib -Wl,--wrap=malloc -Wl,--wrap=free -u _printf_float --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: D:/15_STM32CubeIDE_1.18.0/stm32cubeide1.17/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-closer.o): in function `_close_r':
(.text._close_r+0xc): warning: _close is not implemented and will always fail
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: D:/15_STM32CubeIDE_1.18.0/stm32cubeide1.17/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-fstatr.o): in function `_fstat_r':
(.text._fstat_r+0xe): warning: _fstat is not implemented and will always fail
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: D:/15_STM32CubeIDE_1.18.0/stm32cubeide1.17/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-signalr.o): in function `_getpid_r':
(.text._getpid_r+0x0): warning: _getpid is not implemented and will always fail
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: D:/15_STM32CubeIDE_1.18.0/stm32cubeide1.17/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-isattyr.o): in function `_isatty_r':
(.text._isatty_r+0xc): warning: _isatty is not implemented and will always fail
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: D:/15_STM32CubeIDE_1.18.0/stm32cubeide1.17/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-signalr.o): in function `_kill_r':
(.text._kill_r+0xe): warning: _kill is not implemented and will always fail
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: D:/15_STM32CubeIDE_1.18.0/stm32cubeide1.17/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-lseekr.o): in function `_lseek_r':
(.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: D:/15_STM32CubeIDE_1.18.0/stm32cubeide1.17/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-readr.o): in function `_read_r':
(.text._read_r+0x10): warning: _read is not implemented and will always fail
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: stm32N6_hand02_FSBL.elf section `.rodata' will not fit in region `ROM'
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: section .data VMA [341c0000,341c0bf7] overlaps section .rodata VMA [34190f80,341d236f]
D:\15_STM32CubeIDE_1.18.0\stm32cubeide1.17\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130\tools\arm-none-eabi\bin\ld.exe: region `ROM' overflowed by 92512 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:68: stm32N6_hand02_FSBL.elf] Error 1
"make -j8 all" terminated with exit code 2. Build might be incomplete.
16:20:27 Build Failed. 4 errors, 7 warnings. (took 1s.454ms)
