STM32CubeIDE: disable warning for large sized (>4095) array declaration
Dear
Please connect me with someone to help resolve the below concern.
I have enabled all possible warnings in STM32CubeIDE.
I however just want to disable warning for one large sized constant array (possibly using #pragma <disable_large_size_Array_Warning> and then later enable it back after the constant array declaration is over).
arm-none-eabi-gcc "../User_Code/xxx.c" -mcpu=cortex-m7 -std=gnu18 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32H753xx -c -I../User_Code -I../Core/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -Wextra -pedantic -Wmissing-include-dirs -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"User_Code/xxx.d" -MT"User_Code/xxx.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "User_Code/xxx.o"
../User_Code/xxx.c:209:1: warning: string length '4523' is greater than the length '4095' ISO C99 compilers are required to support [-Woverlength-strings]
209 | "----------------------------------------------------------------------------------------\r\n";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I believe the compiler should be able to provide correct address for the large array and allow its sizeof() to be calculated as well as allow its data to be transmitted over serial.
Please help!
Thanks!
Rajeev