Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recompile, output overflowed #3

Open
PamiVOV opened this issue Dec 19, 2019 · 1 comment
Open

Recompile, output overflowed #3

PamiVOV opened this issue Dec 19, 2019 · 1 comment

Comments

@PamiVOV
Copy link

PamiVOV commented Dec 19, 2019

14:39:16 **** Incremental Build of configuration Release for project F1-T12 ****
make all
arm-none-eabi-g++ -o "F1-T12.elf" @"objects.list" -mcpu=cortex-m3 -T"../STM32F103C8Tx_FLASH.ld" -Wl,-Map="F1-T12.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
c:\st\stm32cubeide_1.0.2\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\arm-none-eabi\bin\ld.exe: F1-T12.elf section .rodata' will not fit in region FLASH'
c:\st\stm32cubeide_1.0.2\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\arm-none-eabi\bin\ld.exe: F1-T12.elf section .bss' will not fit in region RAM'
c:\st\stm32cubeide_1.0.2\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\arm-none-eabi\bin\ld.exe: region RAM' overflowed by 115896 bytes c:\st\stm32cubeide_1.0.2\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\arm-none-eabi\bin\ld.exe: region FLASH' overflowed by 9253216 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:60: F1-T12.elf] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

14:39:18 Build Failed. 1 errors, 0 warnings. (took 2s.504ms)

I just learned STM32, please help me. Thank you!

image

@sfrwmaker
Copy link
Owner

Optimization flags should fixed the issue:

Building file: ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c
Invoking: MCU GCC Compiler
E:\stm32\F1-T12\Debug
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft '-D__weak=attribute((weak))' '-D__packed=attribute((packed))' -DUSE_HAL_DRIVER -DSTM32F103xB -I"E:/stm32/F1-T12/Inc" -I"E:/stm32/F1-T12/Drivers/u8g2/Inc" -I"E:/stm32/F1-T12/Drivers/STM32F1xx_HAL_Driver/Inc" -I"E:/stm32/F1-T12/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy" -I"E:/stm32/F1-T12/Drivers/CMSIS/Device/ST/STM32F1xx/Include" -I"E:/stm32/F1-T12/Drivers/CMSIS/Include" -O2 -ffunction-sections -fdata-sections -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.o" -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.o" "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c"
Finished building: ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c

Building file: ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c
Invoking: MCU GCC Compiler
E:\stm32\F1-T12\Debug
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft '-D__weak=attribute((weak))' '-D__packed=attribute((packed))' -DUSE_HAL_DRIVER -DSTM32F103xB -I"E:/stm32/F1-T12/Inc" -I"E:/stm32/F1-T12/Drivers/u8g2/Inc" -I"E:/stm32/F1-T12/Drivers/STM32F1xx_HAL_Driver/Inc" -I"E:/stm32/F1-T12/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy" -I"E:/stm32/F1-T12/Drivers/CMSIS/Device/ST/STM32F1xx/Include" -I"E:/stm32/F1-T12/Drivers/CMSIS/Include" -O2 -ffunction-sections -fdata-sections -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o" -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o" "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c"
Finished building: ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c

Building file: ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c
Invoking: MCU GCC Compiler
E:\stm32\F1-T12\Debug
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft '-D__weak=attribute((weak))' '-D__packed=attribute((packed))' -DUSE_HAL_DRIVER -DSTM32F103xB -I"E:/stm32/F1-T12/Inc" -I"E:/stm32/F1-T12/Drivers/u8g2/Inc" -I"E:/stm32/F1-T12/Drivers/STM32F1xx_HAL_Driver/Inc" -I"E:/stm32/F1-T12/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy" -I"E:/stm32/F1-T12/Drivers/CMSIS/Device/ST/STM32F1xx/Include" -I"E:/stm32/F1-T12/Drivers/CMSIS/Include" -O2 -ffunction-sections -fdata-sections -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o" -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o" "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c"
Finished building: ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c

Building target: F1-T12.elf
Invoking: MCU G++ Linker
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -specs=nosys.specs -specs=nano.specs -T"../STM32F103C8Tx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -fno-exceptions -fno-rtti -o "F1-T12.elf" @"objects.list" -lm
Finished building target: F1-T12.elf

make --no-print-directory post-build
Generating hex and Printing size information:
arm-none-eabi-objcopy -O ihex "F1-T12.elf" "F1-T12.hex"
arm-none-eabi-size "F1-T12.elf"
text data bss dec hex filename
54944 608 5116 60668 ecfc F1-T12.elf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants