This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to tell the compiler a C++ const object is ROM-able ?

I defined a global static const object of the user-defined class type, assuming that the compiler may understand that object can be plce on ROM.I found that the arm compiler is really good at empty base class optimization, however, tt is not able to find out the "static const" c++ object is ROM-able...

The RAM is really a kind of scarce resource for MCUs. Is there any way to tell the compiler that a c++ const object is ROM-albe ?

By the way, the discussion about ROM-able can be found from the book Effective C++ in an Embedded Environment.

0