2024-12-10 10:38 AM
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:
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
2024-12-10 11:18 AM
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.
2024-12-10 12:54 PM - edited 2024-12-10 01:29 PM
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