[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: C question



On Mar 3, 2007, at 4:57 PM, carzrgr8@xxxxxxxxxxxxx wrote:

Thanks. I threw the question to the group because I know there's plenty of knowledgable people reading willing to answer it.

Anyway, I was trying to get the compiler to generate 2 versions of an initialized array: ROM, and RAM. The processor I am using has more ROM than RAM, so
placing the code into ROM makes more sense, yet I was having trouble getting access it correctly due to a routine expecting a const ptr. So, I was trying it in
RAM, but not sure if the code was correct.


Thanks again for the help :)

You didn't say which compiler you're using, nor which architecture.

But Keil's 8051 compiler has the "code" keyword, which tells the compiler that the variable should be put into CODE space, which is by definition ROM.

-a


_______________________________________________ geda-user mailing list geda-user@xxxxxxxxxxxxxx http://www.seul.org/cgi-bin/mailman/listinfo/geda-user