[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
emulating linker script functionality?
From: Charles Lepple ####@####.#### Date: 16 Dec 2002 04:48:22 -0000 Message-Id: <3DFD5999.2030008@ghz.cc> Please bear with me as I try and explain what I want to do. I'm a little rusty when it comes to PIC programming, and so my terminology might be slightly off. I downloaded some sample code from Microchip which is intended to demonstrate the use of the USB peripheral on the 16C745/765 chips. It is designed to be assembled and linked with MPASM, and it uses several .ASM files and a linker script. Since I realize that the gputils linker is not finished, I concatenated the files in the link order given in the project file, commented out the 'global' directives, and replaced the first of each 'extern' directive with the symbol definition itself. That worked fine, except that since the linker script is never consulted, the vectors are not placed at the beginning of program space, etc. (from "CODEPAGE NAME=vectors START=0x0 END=0x4F PROTECTED" and "SECTION NAME=STARTUP ROM=vectors" in the linker script). Has anyone else run into this before? I think I can move most of the code around by hand, but I was looking for a more formal method. Also, I'm kind of in the dark since I didn't write the original code, and I'm sure there are things that will take a few crash-and-burn cycles to work out. Also, if you've read this far, then maybe this next suggestion might interest you: has anyone considered integration with GNU binutils? I realize that a lot of work has been put into gputils, but the GNU linker is pretty advanced, and would make a nice framework. Plus, it already has a modular COFF support system which could be adapted to work with the Microchip object format (if it is indeed a variant of COFF). I have had some experience porting binutils, but at the moment my hands are tied (the FSF needs a copyright assignment from me, and my university is being a pain about signing it) so I can only answer porting questions at the moment (no code writing). Food for thought, anyway... -- Charles Lepple ####@####.#### http://www.ghz.cc/charles/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: emulating linker script functionality?
From: Craig Franklin ####@####.#### Date: 17 Dec 2002 02:42:00 -0000 Message-Id: <3DFE8E2F.D251CAD2@attbi.com> Charles Lepple wrote: > Also, if you've read this far, then maybe this next suggestion might > interest you: has anyone considered integration with GNU binutils? I > realize that a lot of work has been put into gputils, but the GNU linker > is pretty advanced, and would make a nice framework. Plus, it already > has a modular COFF support system which could be adapted to work with > the Microchip object format (if it is indeed a variant of COFF). I have > had some experience porting binutils, but at the moment my hands are > tied (the FSF needs a copyright assignment from me, and my university is > being a pain about signing it) so I can only answer porting questions at > the moment (no code writing). Food for thought, anyway... I considered using binutils, but decided against it. I reviewed the hc11 and avr ports to get a feel for what challenges we would have. I spoke with the people who did the work. I wasn't convienced it was the best solution for us. We have a functioning assembler, COFF is straight forward, and "rolling our own" allowed the greatest flexiblity. Don't get me wrong, binutils is a great package, but it wasn't what we needed. This weekend I got gpasm generating COFF objects. I successfully linked the objects with mplink. I hope to commit the changes this weekend. Once I do, I will finish up gplink. > > -- > Charles Lepple ####@####.#### > http://www.ghz.cc/charles/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: ####@####.#### > For additional commands, e-mail: ####@####.#### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |