[mc1322x] linking in math libraries?

Jon Smirl jonsmirl at gmail.com
Thu Apr 8 09:36:29 EDT 2010


On Thu, Apr 8, 2010 at 9:31 AM, Mariano Alvira <mar at devl.org> wrote:
> On Thu, Apr 08, 2010 at 12:00:49AM -0700, Andrew Pullin wrote:
>> On 4/7/2010 2:37 PM, Mariano Alvira wrote:
>>> On Wed, Apr 07, 2010 at 01:05:13PM -0700, Andrew Pullin wrote:
>>>
>> Well, that seems to work properly. Would newlib solve this & other
>> problems?
>
> I just tried my newlib build and it does solve the build issue. The
> rftests are 10KB larger though and it looks like printf doesn't work
> at all...

Are you using -nodefaultlibs? If not you are mixing the two libs.

>
>> newlib-1.16 seems to build with the OpenEmbedded toolchain if
>> you link arm-elf-* to arm-linux-* , although I don't know where to
>> install it or how to link against it. I'm no compiler expert!
>
> For now you can change the linking line in Makefile.include from
> something like:
>
> %_$(BOARD).elf: $(OBJDIR)/%.o $(START) $(ISR) $(SRCOBJS)
> $(LINKERSCRIPT) $(LIBMC1322X)/libmc1322x.a $(OBJDIR)/b\
> oard.a $(MC1322X)/src/src.a
>        $(CC) $(LDFLAGS)  \
>        -L $(LIBMC1322X) -L $(MC1322X)/src -L $(OBJDIR) $< -o $@
>        $(START) $(MC1322X)/src/src.a --start-group $(OBJDIR)/board.a
> $(LIBMC1322X)/libmc1322x.a -lm --end-group
>
> to:
>
> %_$(BOARD).elf: $(OBJDIR)/%.o $(START) $(ISR) $(SRCOBJS)
>  $(LINKERSCRIPT) $(LIBMC1322X)/libmc1322x.a $(OBJDIR)/b\
> oard.a $(MC1322X)/src/src.a
>        $(CC) $(LDFLAGS)  \
>        -L $(LIBMC1322X) -L $(MC1322X)/src -L $(OBJDIR) $< -o $@
>  $(START) $(MC1322X)/src/src.a -L /home/malvira\
> /build-newlib/arm-elf/newlib/ --start-group $(OBJDIR)/board.a
>  $(LIBMC1322X)/libmc1322x.a -lm --end-group
>
>
> where I added a -L to the patch that has libm.a etc.. from newlib.
>
>>
>> Along the same lines, is there an accepted way of  building a more
>> minimal toolchain?
>
> Louis has some scripts over at open-mc13224v. I haven't tried them
> though.
>
> There is also a VM for Quahogcon:
>
>    http://quahogcon.org/contests/
>
>    http://quahogcon.org/mc1322x-Dev-VM.torrent
>
>> OE works great, but it seems to be more targeted to
>> linux development; lots and lots and packages to build.
>
> I only use OE to build the toolchain once, then I add add the cross
> tools it builds to my path and such when I need to build mc1322x
> stuff. e.g. I source a file that has this:
>
> export PATH=/home/malvira/mc1322x-oe/tmp/cross/armv4t/bin:/home/malvira/build-gdb/gdb:$PATH
>
>> There are
>> instructions at http://www.gnuarm.org/support.html that will results in
>> a compiler that seems to have problems with
>> "-mcallee-super-interworking" when building the libmc1322x tests.
>
> Unfortunately the callee-super-interworking is necessary to use the ROM
> calls...
>
> -Mar.
>
> _______________________________________________
> mc1322x mailing list
> mc1322x at devl.org
> http://devl.org/cgi-bin/mailman/listinfo/mc1322x
>



-- 
Jon Smirl
jonsmirl at gmail.com



More information about the mc1322x mailing list