C++ for embedded

Angelo Fraietta angelo_f at bigpond.com
Sat Mar 23 01:31:54 UTC 2002


Thinking about it some more, you don't even need to use a constructor at 
all! You can just typecast a pointer to the ROM location as a pointer to 
the the class object. I did this a couple of years ago on a project 
where a non-volatile database had to be rebuilt upon startup in NVRAM. 
The concept is the same -- you just make a pointer to that memory 
location and acces it as a pointer to that class from then on.

Peter Mueller wrote:

>Hi all,
>
>we want to use C++ for our future systems. But it seems that there are several design aspects that should be taken into account to develop efficient C++ code especially in terms of RAM usage. E.g. to be able to put an object into rom the class can not have
>- others than the default ctor
>- only public methods etc
>- ...
>
>I found some links in the net but not much. Can you recommend papers etc. about this topic and C++ in embedded systems in general?
>
>Thanks a lot,
>Peter
>

-- 
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page


http://www.users.bigpond.com/angelo_f/

There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)







More information about the users mailing list