|
Re: Re: [Sdcc-user] aligning functions in memory
From: Beau E. Cox <beaucox@ha...> - 2005-10-25 10:06
|
Hi Peter - At 2005-10-24, 12:12:53 you wrote: > >On Mon, 24 Oct 2005, Paul Stoffregen wrote: > >> >>> Now, anyone interrested in some code snippets to make the USB Autovector >>> feature of the EzUSB chips work with sdcc? >>> >> Several months ago, I played with one of these chips. I never did figure out >> a nice way to get SDCC (mainly the linker) to build the autovector table and >> endpoint descriptor tables at absolute addresses. So instead I did some very >> ugly hacks with perl scripts to read a couple simple text files, and the >> symbol table from the linker. The scripts output absolute addressed >> assembly, which is then run through an assembler, and the intel hex is post >> processed and merged with the linker's hex by more ugly perl scripts. >> >> An ugly hack, but it worked. I'd be really curious to see if anyone has >> found a "nice" was to do this using SDCC. > >Not nice, but I posted a tiny patch to sdcc that allows >initialised static symbols at absolute addresses. It is against 2.4.0 >but it should work with newer versions of sdcc. It allows you to do: > >code char at 0x1234 foo[] = "abcd"; // etc > >and may clobber other data in the code segment (it is your >responsability to ensure that it does not). Of course you can put >whatever you like as 0x1234 and "abcd", as long as the symbols resolve >to static data at code generation time for the module where they are >declared (not the whole program). I do not think that it works with >relocated symbols on the rhs of the assignment (yet). > >You could generate a table of symbols by linking with dummy values, and >then recompile and link after stuffing static data from the symbol >file into the source. Basically what you are doing now with Perl imho. > >The file was posted in the thread: "Subject: re: sdcc feature request" >and I posted a patch in response to myself, in the thread: "Subject: re: >sdcc feature request: some help needed (partial solution patch)" on 2 >May 2005 > >Peter > > >------------------------------------------------------- >This SF.Net email is sponsored by the JBoss Inc. >Get Certified Today * Register for a JBoss Training Course >Free Certification Exam for All Training Attendees Through End of 2005 >Visit http://www.jboss.com/services/certification for more information >_______________________________________________ >Sdcc-user mailing list >Sdcc-user@... >https://lists.sourceforge.net/lists/listinfo/sdcc-user > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.1.361 / Virus Database: 267.12.5/147 - Release Date: 10/24/2005 > Aloha => Beau; beaucox@... 2005-10-25 |
| Thread | Author | Date |
|---|---|---|
| Re: Re: [Sdcc-user] aligning functions in memory | Beau E. Cox <beaucox@ha...> |