[mc1322x] Fwd: contiki compilation error
Mariano Alvira
mar at redwirellc.com
Tue Dec 8 13:18:41 EST 2009
On Tue, Dec 08, 2009 at 11:54:33AM -0500, Camilo, Alex wrote:
>
> The thing that confuses me is why are we in chameleon code? shouldn't we be
> doing something like setting up stack frames and initializing hardware? and
> shouldn't we be branching to exception handling functions? and If i recall
> correctly isn't chameleon a packet processing library? Do you think my
> toolchain is borked?
Can you verify that your build system for contiki is making use of the
linker script at /cpu/mc1322x/mc1322x.lds?
You are correct, /cpu/mc1322x/startup.S needs to be located at
0x00400000. It sounds like, for whatever reason, your linker isn't
locating things in the right places.
> thats what I would conclude, however when taking a look at
> the blink-red disassembly i see this.
>
> 00400000 <_start>:
> 400000: ea0001ff b 400804 <_begin>
> 400004: e59ff844 ldr pc, [pc, #2116] ; 400850
> <_undefined_instruction>
> 400008: e59ff844 ldr pc, [pc, #2116] ; 400854
> <_software_interrupt>
> 40000c: e59ff844 ldr pc, [pc, #2116] ; 400858
> <_prefetch_abort>
> 400010: e59ff844 ldr pc, [pc, #2116] ; 40085c <_data_abort>
> 400014: e59ff844 ldr pc, [pc, #2116] ; 400860 <_not_used>
> 400018: e59ff844 ldr pc, [pc, #2116] ; 400864 <_irq>
> 40001c: e59ff844 ldr pc, [pc, #2116] ; 400868 <_fiq>
>
> which is exactly what i would expect.
That sounds like the way you are building mc1322x-tests is sane and
using boot.lds and src/start.S properly.
Looking at the linker command line that runs when building contiki
might be useful.
-Mar.
More information about the mc1322x
mailing list