# PROGMEM - major feature requirement

**URL:** <https://community.particle.io/t/progmem-major-feature-requirement/3284>\
**Category:** uncategorized\
**Created:** [March 7, 2014, 2:20am UTC](https://community.particle.io/t/progmem-major-feature-requirement/3284 "2014-03-07T02:20:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BDub](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bdub/32/5137_2.png) [@BDub](https://community.particle.io/u/BDub)\
**Post date:** [March 7, 2014, 2:35am UTC](https://community.particle.io/t/progmem-major-feature-requirement/3284/2 "2014-03-07T02:35:45Z")

</div>

> **[Fix for #include "avr/pgmspace.h"](https://community.particle.io/t/fix-for-include-avr-pgmspace-h/2269/7?redirected=true)**
>
> PROGMEM is only needed on AVR because the AVR has separate program memory and data memory spaces. On STM32, there is no need for PROGMEM because the memory space is unified. Declare the memory you wish to be placed only in flash as static const and...

I did some other testing before and found `const` to work great for ensuring the data structure you are defining is in FLASH and not RAM. I can’t find my post with test code at the moment. Not sure if `static` is needed, but might be a good idea to add it just to be explicit about things.

> <https://stackoverflow.com/questions/177437/what-does-const-static-mean-in-c-and-c>

A follow up question would be, can you think of a way to automatically redefine it so that it works for the STM32… I haven’t been able to. That is, create a macro called PROGMEM that does something to give us `static const` in the right place.

---

_[View the full topic](https://community.particle.io/t/progmem-major-feature-requirement/3284)._
