C/C++ for EPROM chip?

P

PHP2

Have some experience with C/C++ programming for EPROM chips? I am newbie in
that area, any advice will be helpful..
 
J

Jack Klein

Have some experience with C/C++ programming for EPROM chips? I am newbie in
that area, any advice will be helpful..

Your question is vague, and there is a good chance that it is
off-topic for this newsgroup. I will try to point out a few
possibilities.

Your question could be about how to write a program in C or C++ (two
different languages, there is no language "C/C++") that will program a
binary image that you already have into an EPROM chip. If this is
what you are trying to do, you need an EPROM programmer, and they
usually come with all the software needed to operate them.

On the other hand, you could be asking how to write code in C or C++
that can be placed into an EPROM which in turn can be placed into a
system with a processor in such a way that the processor will execute
the code.

In that case you are pretty much off-topic here as well. The C and
C++ languages do not specify where executable images come from,
whether it is from a hard disk drive, a CD, or an EPROM.

If what you are talking about is the second case, the newsgroup you
want to post to is where putting code into
EPROM or flash is something they do everyday. When you post there,
give them enough information to be able to help you. Tell them what
sort of processor or microcontroller you are using, and some idea of
what your code needs to do.
 
C

Carl Muller

PHP2 said:
Have some experience with C/C++ programming for EPROM chips? I am newbie in
that area, any advice will be helpful..

Use the keyword "const" a lot (e.g. for any data tables that can be
made const, and for any parameters passed by reference that are not
altered). Of course, this is good practice in general anyway. An
untested example:

const char* const mystrings[] = { "hello", "good-bye" };

Apart from that, learn how your compiler starts up programs, i.e. what
happens before main() is called. This is compiler specific (not
usually on-topic for comp.lang.c++). Note that C++ requires more
initialisation than C, so look carefully at the examples the
documentation provides to ensure it includes the correct startup code.
 
T

Thomas Matthews

PHP2 said:
Have some experience with C/C++ programming for EPROM chips? I am newbie in
that area, any advice will be helpful..
As Jack said, see the folks in
Another possibility is that you want advice about programming
EEPROM chips. This task requires data sheets from the
EEPROM manufacturer and details about how to access the
device on the platform. Both of which are off-topic in
this newsgroup.

However, one can use non-portable code to access a device
{provided your operating system, if there is one, allows
for it) by using pointers (in memory mapped system).

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top