2021-05-04 08:11 AM
It says that our BOOTCODE (section in our linker file) has overflowed, see below
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: P5000 Comms Bootloader.elf section `.text' will not fit in region `BOOTCODE'
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: region `BOOTCODE' overflowed by 3888 bytes
When I set the ide to produce the assembler (.s) file I see that the gcc flags applied are slightly different . So my questions is where are the default gcc flags set for the STM32CubeIDE defined i.e. which file(s) and how can I change them? I have notice that the versions ar ethe same for the Atollic TrueSTUDIO except for isl version (0.15)
.file "P5000_CODI_Modbus_Test_Board.c"
@ GNU C11 (GNU Tools for STM32 9-2020-q2-update.20201001-1621) version 9.3.1 20200408 (release) (arm-none-eabi)
@ compiled by GNU C version 5.3.1 20160211, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP
Extract for STM32CubeIDE
...
@ GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
options passed:
-fpreprocessed Src\P5000_CODI_Modbus_Test_Board.i
-mcpu=cortex-m7
-mfpu=fpv5-d16
-mfloat-abi=hard
-mthumb
-march=armv7e-m+fp.dp
-auxbase-strip Src\P5000_CODI_Modbus_Test_Board.o
-g
-O0
-Wall
-std=gnu11
-fverbose-asm
-ffunction-sections
-fdata-sections
-fstack-usage
options enabled: ****** WHERE ARE THESE DEFINED? ******
-faggressive-loop-optimizations
-fassume-phsa
-fauto-inc-dec
-fcommon
-fdata-sections
...
Thanks.
2021-05-04 08:34 AM
Right click project -> C/C++ Build -> Settings -> Tool settings
They are changed from within there.
2021-05-04 01:28 PM
Thanks for the reply. I have already looked in there and although it gives some of the flags it is not an exhaustive list.
below is the STM32CubeIDE .s output followed by the Atollic output both have been re formated for clarity.
STM32CubeIDE
.cpu cortex-m7
.eabi_attribute 28, 1 @ Tag_ABI_VFP_args
.eabi_attribute 20, 1 @ Tag_ABI_FP_denormal
.eabi_attribute 21, 1 @ Tag_ABI_FP_exceptions
.eabi_attribute 23, 3 @ Tag_ABI_FP_number_model
.eabi_attribute 24, 1 @ Tag_ABI_align8_needed
.eabi_attribute 25, 1 @ Tag_ABI_align8_preserved
.eabi_attribute 26, 1 @ Tag_ABI_enum_size
.eabi_attribute 30, 6 @ Tag_ABI_optimization_goals
.eabi_attribute 34, 1 @ Tag_CPU_unaligned_access
.eabi_attribute 18, 4 @ Tag_ABI_PCS_wchar_t
.file "P5000_CODI_Modbus_Test_Board.c"
GNU C11 (GNU Tools for STM32 9-2020-q2-update.20201001-1621) version 9.3.1 20200408 (release) (arm-none-eabi)
compiled by GNU C version 5.3.1 20160211, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
options passed:
-fpreprocessed Src\P5000_CODI_Modbus_Test_Board.i
-mcpu=cortex-m7
-mfpu=fpv5-d16
-mfloat-abi=hard
-mthumb
-march=armv7e-m+fp.dp
-auxbase-strip Src\P5000_CODI_Modbus_Test_Board.o
-g
-O0
-Wall
-std=gnu11
-fverbose-asm
-ffunction-sections
-fdata-sections
-fstack-usage
options enabled:
-faggressive-loop-optimizations
-fassume-phsa
-fauto-inc-dec
-fcommon
-fdata-sections
-fdelete-null-pointer-checks
-fdwarf2-cfi-asm
-fearly-inlining
-feliminate-unused-debug-types
-ffp-int-builtin-inexact
-ffunction-cse
-ffunction-sections
-fgcse-lm
-fgnu-runtime
-fgnu-unique
-fident
-finline-atomics
-fipa-stack-alignment
-fira-hoist-pressure
-fira-share-save-slots
-fira-share-spill-slots
-fivopts
-fkeep-static-consts
-fleading-underscore
-flifetime-dse
-flto-odr-type-merging
-fmath-errno
-fmerge-debug-strings
-fpeephole
-fplt
-fprefetch-loop-arrays
-freg-struct-return
-fsched-critical-path-heuristic
-fsched-dep-count-heuristic
-fsched-group-heuristic
-fsched-interblock
-fsched-last-insn-heuristic
-fsched-rank-heuristic
-fsched-spec
-fsched-spec-insn-heuristic
-fsched-stalled-insns-dep
-fsemantic-interposition
-fshow-column
-fshrink-wrap-separate
-fsigned-zeros
-fsplit-ivs-in-unroller
-fssa-backprop
-fstdarg-opt
-fstrict-volatile-bitfields
-fsync-libcalls
-ftrapping-math
-ftree-cselim
-ftree-forwprop
-ftree-loop-if-convert
-ftree-loop-im
-ftree-loop-ivcanon
-ftree-loop-optimize
-ftree-parallelize-loops= -ftree-phiprop
-ftree-reassoc
-ftree-scev-cprop
-funit-at-a-time
-fverbose-asm
-fzero-initialized-in-bss
-masm-syntax-unified
-mbe32 -mlittle-endian
-mpic-data-is-text-relative
-msched-prolog
-mthumb
-munaligned-access
-mvectorize-with-neon-quad
Atollic TrueSTUDIO
.cpu cortex-m7
.eabi_attribute 28, 1 @ Tag_ABI_VFP_args
.eabi_attribute 20, 1 @ Tag_ABI_FP_denormal
.eabi_attribute 21, 1 @ Tag_ABI_FP_exceptions
.eabi_attribute 23, 3 @ Tag_ABI_FP_number_model
.eabi_attribute 24, 1 @ Tag_ABI_align8_needed
.eabi_attribute 25, 1 @ Tag_ABI_align8_preserved
.eabi_attribute 26, 1 @ Tag_ABI_enum_size
.eabi_attribute 30, 6 @ Tag_ABI_optimization_goals
.eabi_attribute 34, 1 @ Tag_CPU_unaligned_access
.eabi_attribute 18, 4 @ Tag_ABI_PCS_wchar_t
.file "P5000_CODI_Modbus_Test_Board.c"
@ GNU C11 (GNU Tools for ARM Embedded Processors (Build 17.03)) version 6.3.1 20170215 (release) [ARM/embedded-6-branch revision 245512] (arm-atollic-eabi)
@ compiled by GNU C version 5.3.1 20160211, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.15
@ GGC heuristics:
--param ggc-min-expand=100
--param ggc-min-heapsize=131072
@ options passed:
-fpreprocessed Src\P5000_CODI_Modbus_Test_Board.i
@
-mthumb
-mcpu=cortex-m7
-mfloat-abi=hard
-mfpu=fpv5-d16
@
-auxbase-strip Src\P5000_CODI_Modbus_Test_Board.o
-g
-O0
-Wall
-std=gnu11
@
-fverbose-asm
-ffunction-sections
-fdata-sections
-fstack-usage
@ options enabled:
-faggressive-loop-optimizations
-fauto-inc-dec
-fchkp-check-incomplete-type
-fchkp-check-read
-fchkp-check-write
-fchkp-instrument-calls
-fchkp-narrow-bounds
-fchkp-optimize
-fchkp-store-bounds
-fchkp-use-static-bounds
-fchkp-use-static-const-bounds
-fchkp-use-wrappers
-fcommon
-fdata-sections
-fdelete-null-pointer-checks
-fdwarf2-cfi-asm
-fearly-inlining
-feliminate-unused-debug-types
-ffunction-cse
-ffunction-sections
-fgcse-lm
-fgnu-runtime
-fgnu-unique
-fident
-finline-atomics
-fira-hoist-pressure
-fira-share-save-slots
-fira-share-spill-slots
-fivopts
-fkeep-static-consts
-fleading-underscore
-flifetime-dse
-flto-odr-type-merging
-fmath-errno
-fmerge-debug-strings
-fpeephole
-fplt
-fprefetch-loop-arrays
-freg-struct-return
-fsched-critical-path-heuristic
-fsched-dep-count-heuristic
-fsched-group-heuristic
-fsched-interblock
-fsched-last-insn-heuristic
-fsched-rank-heuristic
-fsched-spec
-fsched-spec-insn-heuristic
-fsched-stalled-insns-dep
-fsemantic-interposition
-fshow-column
-fsigned-zeros
-fsplit-ivs-in-unroller
-fssa-backprop
-fstdarg-opt
-fstrict-volatile-bitfields
-fsync-libcalls
-ftrapping-math
-ftree-cselim
-ftree-forwprop
-ftree-loop-if-convert
-ftree-loop-im
-ftree-loop-ivcanon
-ftree-loop-optimize
-ftree-parallelize-loops= -ftree-phiprop
-ftree-reassoc
-ftree-scev-cprop
-funit-at-a-time
-fverbose-asm
-fzero-initialized-in-bss
-masm-syntax-unified
-mlittle-endian
-mpic-data-is-text-relative
-msched-prolog
-mthumb
-munaligned-access
-munaligned-double-access
-mvectorize-with-neon-quad
Somebody has determined these flags, but I cannot find anywhere within the ST's directories that define them, also optimizations is set to -O0 (None)