cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C031C6 - FLASH Overflow Error During FFT Implementation with ARM CMSIS-DSP

Reebin
Associate

Hi 

I am working on an embedded project with the STM32C031C6 microcontroller using STM32CubeIDE. My goal is to perform an FFT on ADC input data and transmit the results over UART. I am utilizing the ARM CMSIS-DSP library for the FFT processing.

Here are the details of my project:

  • Microcontroller: STM32C031C6
  • Toolchain: STM32CubeIDE 1.15.1
  • Compiler: arm-none-eabi-gcc 12.3.1
  • CMSIS-DSP: Using arm_rfft_instance_q15 and arm_cmplx_mag_q15 for FFT calculations

Peripherals: ADC (with DMA) and UART

The issue arises when I try to compile the project. I receive the following error:
arm-none-eabi-gcc -o "FFT.elf" @"objects.list" -larm_cortexM0l_math -mcpu=cortex-m0plus -T"STM32C031C6TX_FLASH.ld" --specs=nosys.specs -Wl,-Map="FFT.map" -Wl,--gc-sections -static -L"Lib" --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
C:/.../ld.exe: FFT.elf section `.rodata' will not fit in region `FLASH'
C:/.../ld.exe: region `FLASH' overflowed by 63696 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:64: FFT.elf] Error 1


2 REPLIES 2

Suggests the ~95KB of code you've generated, or pulled-in, ain't fitting in the 32KB of FLASH on your MCU

Hard to tell if that's the actual or minimal foot-print, but certainly not a promising start.

Put it on something more capable and try determining what's necessary and what's not.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KnarfB
Principal III

The other day I used https://github.com/adafruit/Adafruit_ZeroFFT.git for a STM32C0116-DK fftq15. About 26 kB .bin file in debug mode, but just a fft demo, no adc, no uart, and: no HAL.

Started with an empty VS Code + STM32 Extension project skeleton and used default (generated) compile & link options.

hth

KnarfB