I run below code for Arduino Uno and it compiled successfully. But I am expecting an error since I have used uint32_t data type for the variables. It should exceed the dynamic memory, right? Because I have used 1000 uint32_t. But it just consumes 13 bytes. Why?
Arduino console log Sketch uses 482 bytes (1%) of program storage space. Maximum is 32256 bytes. Global variables use 13 bytes (0%) of dynamic memory, leaving 2035 bytes for local variables. Maximum is 2048 bytes.
If the compiler not optimize remove it, it will cause the error you expect.
volatile uint32_t data[1000];
Sketch uses 514 bytes (1%) of program storage space. Maximum is 32256 bytes.
data section exceeds available space in board
Global variables use 4013 bytes (195%) of dynamic memory, leaving -1965 bytes for local variables. Maximum is 2048 bytes.
Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.
Error compiling for board Arduino Uno.