[Icc-mot] memory sections

Edward Karpicz ekarpicz at freemail.lt
Tue Jul 24 14:08:21 PDT 2007


Wade A Smith wrote:
> well, since it seems no one has been able to handle interrupts while
> programming EEPROM...

Are you subscribed? It looks like you aren't receiving replies. If you
indeed are, then please bother to answer which EEPROM you are talking about.
Is it D64 EETS1K EEPROM module; or is it indeed FTS64K Flash EEPROM module?
First one, which is usually called just EEPROM, is very easy to handle and
nobody should have problems with it, even with interrupts always enabled.
Another one, Flash EEPROM, which is usually called just Flash, is
troublesome for beginners (even with interrupts disabled).

>
> How about telling the compiler which memory "section" to put programs
> into.
>

> I have a main program that I want to start at 8000 and all the associated
> files.  I like the startup and library files, along with tables, to all
> be at 0x5000, so that is the default.  I use "#pragma abs_address:0x8000"
> for the main function.  But all the other C files, even if they are
> included at the end of main.c, all go to 0x5000.

You should use not absolute but relocatable area. Put 
"-bmyarea:0x8000.0xBFFF" to projects Other Options. This will define myarea
area from 8000 to BFFF. Then all you C files should begin with

   #pragma text:myarea

and end with

   #pragma text:text

#pragma text:myarea" can be moved to common include file..



>
> How do I get the "other" C files to stay in 0x8000 without specifying an
> absolute address for each file?

> Is there some way to designate a "section" and get the C files to go to
> that specific "section" and let the other stuff (startup, libraries,
> tables, etc.) go to the default "section"?
>

> In the past this was all done in assembler.  Using C is a little more
> challenging.
>

What for do you need it? Bootloader?



Edward



> wade
>
>
> _______________________________________________
> Icc-mot mailing list
> Icc-mot at imagecraft.com
> http://dragonsgate.net/mailman/listinfo/icc-mot
>




More information about the Icc-mot mailing list