Re: [Fx2lib-devel] fix linker and example build errors.
Status: Beta
Brought to you by:
mulicheng
From: Steve C. <nos...@ya...> - 2009-11-25 19:39:25
|
Hi Dennis, Fine, don't make the changes to lights.c - it was just to test my lib changes anyway. Please consider the benefits of putting default interrupt routines in the library. That way each app doesn't have to have the same no-op irqs patched into them. Each app would only need to define the irqs that it needs and the linker will add the default (noop) irqs for the other entries. Regards, Steve --- On Wed, 11/25/09, Dennis Muhlestein <de...@ub...> wrote: > From: Dennis Muhlestein <de...@ub...> > Subject: Re: [Fx2lib-devel] fix linker and example build errors. > To: "fx2lib developer mailing list" <fx2...@li...> > Date: Wednesday, November 25, 2009, 8:29 AM > Hi Steve, > > I'd rather leave lights, serial, and a couple of the > examples very > simple projects that don't include the usb jump table, and > require > re-enumeration to use. Those are concepts > that take a bit to get your > head around and I want fx2lib to be approachable for > someone who is just > beginning to learn to develop > firmware. I've been in the process of > porting the examples to a new common Makefile, but haven't > finished that > completely yet, hence the build warning. A couple of > the more complex > examples (bulkloop, eeprom, et al) build correctly with the > Makefile > already, I just haven't modified the Makefile to exclude > the portions > the more simple examples don't need. All that is > needed really, is to > not add the DSCR_AREA AND INT2JT defines to the linker > arguments in the > Makefile. Perhaps I'll make the modification and push > that change. > > -Dennis > > Steve Calfee wrote: > > Hi Dennis, > > > > I don't really know how to do this. I am sure Yahoo > will mess up the patch file, so I will both include it in > this message and attach it. > > > > Note, I don't have hardware to test this, I have built > the example light program to test my hypothetical build > fixes. > > > > If you don't want to adopt this fine, or if you want > me to change things let me know. Eventually I would like to > submit ezusb/fx1 code to this library. > > > > ==================================== > > >From b09aaa448599e5acca0bec5fbf465f05bb7adade Mon > Sep 17 00:00:00 2001 > > From: Steve Calfee <nos...@ya...> > > Date: Tue, 24 Nov 2009 21:03:08 -0800 > > Subject: [PATCH] Simplify examples to fix link errors > and provide default interrupt routines > > > > A linker first resolves the symbols in the project > objects and then looks in > > libraries for unresolved symbols. A good linker only > adds functions that are > > referenced, the as51 linker includes the entire object > module that contains > > a referenced function. So every default routine should > be in its own > > source module. I only did the most commonly used > modules, as an example. > > A program that wants to use any symbol defined in > def_ints.c must define > > all the entries their or multiple definition errors > will happen. > > > > However, a simple example that does not use interrupts > will not need to > > include them in the example source code. I show this > in lights.c where > > a few interrupt routines are used, but most are not, > and the defaults > > from the library are used. > > > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Fx2lib-devel mailing list > Fx2...@li... > https://lists.sourceforge.net/lists/listinfo/fx2lib-devel > |