gnupic: Re: sdcc feature request


Previous by date: 29 Apr 2005 21:22:31 +0100 code_pack, Jan Wagemakers
Next by date: 29 Apr 2005 21:22:31 +0100 gpsim-0.21.4, Scott Dattalo
Previous in thread:
Next in thread:

Subject: re: sdcc feature request
From: Peter ####@####.####
Date: 29 Apr 2005 21:22:31 +0100
Message-Id: <mlg.xhvh@qeti.cetb.aa>

I have a feature request:

I would like code like:

code char at 0x1234 foo[] = "abcd";

to generate initialised data at the indicated absolute address. Assume 
that the absolute address chosen will not collide with anything 
generated by the compiler for a start. This does not happen currently, 
and no error is raised. For example, compiling something like:

--snip--
code char at 0x2000 foo = '0';

void main(void)
{
 	char x;

 	x = foo;
}
--snap--

yields in .rst:

--snip--
                             162         .area CSEG    (CODE)
                     1000    163 _foo    =       0x1000
--snap--

and the relevant binary output shows no trace of the initialisation. It 
does not make any difference if the symbol is invoked in any function.

The feature would be useful for embedding signature and mark bytes in 
object files. These must often be located at well known absolute 
addresses to work as intended.

I would like to know if such a feature would be welcome, if someone 
could implement it in sdcc (I am currently linking an externally 
generated assembly .rel file to implement this), and if not, helpful 
hints as to where approximately the code generator should be changed to 
make it happen. The parser obviously accepts the statement so that is 
not a problem.

thanks,
Peter

Previous by date: 29 Apr 2005 21:22:31 +0100 code_pack, Jan Wagemakers
Next by date: 29 Apr 2005 21:22:31 +0100 gpsim-0.21.4, Scott Dattalo
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.