By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,331 Members | 1,454 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,331 IT Pros & Developers. It's quick & easy.

C/C++ for EPROM chip?

P: n/a
Have some experience with C/C++ programming for EPROM chips? I am newbie in
that area, any advice will be helpful..
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Mon, 2 Aug 2004 16:19:33 +0200, "PHP2" <gp@nospm.hr> wrote in
comp.lang.c++:
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 news:comp.arch.embedded, 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.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 22 '05 #2

P: n/a
"PHP2" <gp@nospm.hr> wrote in message news:<ce**********@ls219.htnet.hr>...
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.
Jul 22 '05 #3

P: n/a
PHP2 wrote:
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 news:comp.arch.embedded.

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

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.