stm32duino / VL53L8CX

Arduino library to support the VL53L8CX low-power high-performance 8x8 multizone Time-of-Flight sensor (ToF)
BSD 3-Clause "New" or "Revised" License
11 stars 3 forks source link

Compilation error with Arduino IDE #2

Closed cedrick-f closed 1 year ago

cedrick-f commented 1 year ago

Hi

I try to compile the example VL53L8CX_HelloWorld_I2C.ino into a Nucleo-F401RE board with Arduino IDE (version 2.0.4) on Windows 10 OS, but i get the following error during the compilation :

c:/users/xxx/appdata/local/arduino15/packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\Cedrick\AppData\Local\Temp\arduino\sketches\2E654FFD584778FA4B92CD8319F2CC50/VL53L8CX_HelloWorld_I2C.ino.elf section '.rodata' will not fit in region 'FLASH'
c:/users/xxx/appdata/local/arduino15/packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: region 'FLASH' overflowed by 91800 bytes
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

thanks by advance for your help Cédrick

fpistm commented 1 year ago

This simply means you exceed the size of the flash. You can try to reduce your code or to optimize the core. You can refers to the wiki how to do tha.t. anyway maybe I'm surprised as F401RE have 512k flah. Are you sure you select the correct board part number?

cedrick-f commented 1 year ago

Among the STM32 MCU based boards, I selected Nucleo-64. For information, the program compiles well if I choose Nucleo-144 (but of course cant't be uploaded)

fpistm commented 1 year ago

You have to select also the part number. Else you build for the first one in the menu which is a C0 with 32k.

cedrick-f commented 1 year ago

Thanks !