[mc1322x] Building mc1322x contiki

Umberto Manzoli ruytenburch at gmail.com
Tue Oct 6 15:31:23 EDT 2009


Are you using a compiler for creating an executable onto a bare-metal
device, or a cross-compiler to create an application to be run into a
(uc)linux system running onto an arm7 machine?
I would suggest you to try some ready-to-use arm-none-eabi-gcc compiler
before completely rebuilding the toolchain, in order to check if it is a
problem of linker script or wrong compiler options.

2009/10/6 Jon Smirl <jonsmirl at gmail.com>

> On Tue, Oct 6, 2009 at 3:07 PM, Umberto Manzoli <ruytenburch at gmail.com>
> wrote:
> > Hi Jon,
> >   I had some similar problems some time ago, and I found out it was a
> > misplacement of (re)locations directives into the linker script.
> > Would be so kind to check your linker script  and see if all needed code
> > (and/or included by libraries) is assembled and relocated within
> 0x0040000
> > and
> > 0x00400000 + 96K? Which is the output of a size command  (with -A -x
> > switches) on the produced elf executable?
>
>
> It's just bringing in a bunch of unneeded code. Something isn't build
> right in my cross tool. I'm in the process of building the OE version.
>
> jonsmirl at terra:/home/apps/contiki-mc1322x/examples/hello-world$
> arm-v4t-linux-gnueabi-size hello-world.mc1322x
>   text    data     bss     dec     hex filename
>  490072    2360   12436  504868   7b424 hello-world.mc1322x
> jonsmirl at terra:/home/apps/contiki-mc1322x/examples/hello-world$
> arm-v4t-linux-gnueabi-size -A -x hello-world.mc1322x
> hello-world.mc1322x  :
> section                   size       addr
> .text                  0x61380   0x400000
> __libc_freeres_fn        0xcd8   0x461380
> .stack                   0x720   0x462058
> .rodata                0x14ee0   0x462778
> .ARM.extab               0x2fc   0x477658
> __libc_atexit              0x4   0x477954
> __libc_subfreeres         0x2c   0x477958
> .eh_frame                 0x7c   0x477984
> .tdata                    0x10   0x477a00
> .tbss                     0x18   0x477a10
> .fini_array                0x4   0x477a10
> .data.rel.ro              0x28   0x477a14
> .got                      0x6c   0x477a3c
> .data                    0x890   0x477aa8
> .bss                    0x2548   0x478338
> __libc_freeres_ptrs       0x14   0x47a880
> .heap                    0x400   0x47a894
> .stab                    0x18c        0x0
> .stabstr                  0x2f        0x0
> .comment                0x3206        0x0
> .debug_aranges          0x2720        0x0
> .debug_pubnames         0x673e        0x0
> .debug_info            0xdf228        0x0
> .debug_abbrev          0x21f44        0x0
> .debug_line            0x2d062        0x0
> .debug_frame            0x8004        0x0
> .debug_str             0x12a07        0x0
> .debug_loc             0x6c2f8        0x0
> .debug_ranges          0x11798        0x0
> ROM                      0x778        0x0
> .ARM.attributes           0x32        0x0
> Total                 0x24dcde
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://devl.org/pipermail/mc1322x/attachments/20091006/ab50f5e5/attachment-0001.htm>


More information about the mc1322x mailing list