Is there a way to instruct gcc to skip initialization for certain static,volatile variables? I have several circular buffers (declared volatile) that really don't need to be zeroed at startup and on my MCU, it's a waste of about ~2500 tcy.
Thanks in advance,
If you use gcc
, you can place the array object in the .noinit
section:
uint8_t arr[1024] __attribute__ ((section (".noinit")));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With