[mc1322x] CodeSourcery , flash loader

Andrew Pullin pullin at berkeley.edu
Fri Apr 30 21:30:50 EDT 2010


Here's a couple of things that I've discovered in my tinkering:

CodeSourcery released a new version of their ARM toolchain recently, and 
it supposedly fixes a lot of issue for minimal ARM targets, specifically 
the atexit() calls. It's pretty nice to just be able to unpack a TAR 
file and not have to build the whole toolchain!

It builds all of the RAM applications, and they all seem to work, 
including printf (need to comment out declarations of stderr).
Math libraries seem to work and only add a few KB to code size. I've 
read that float-point ops work by compiling with normal FPU 
instructions, and then will handle problems in the interrupt if it turns 
out to be an illegal instruction; I don't know if that's happening here 
or not. Once I get my J-Link JTAG pod I should be able to step through 
it, I think.

The downside: none of application that reference NVM code seem to 
compile. The compiler segfaults when trying to assemble start-romvars.o 
. No idea why, though.


On a separate front: up until now, I was running mc1322x-load inside 
VMware, and it was very slow. As an exercise, I implemented it in 
Python. Comparing them now in linux, it seems the python one is faster, 
by 2x. Maybe it's a fluke? If anyone cares, or loves python more than perl:
http://bmi.berkeley.edu/~pullin/red-bsl.py
Although, I haven't put in the function where it drops to a serial 
terminal afterwards.

On the same topic of the boot loader, why not use the Second Stage 
Loader that is provided by Freescale? It's a very small binary, ~3K, and 
it writes to the flash really fast, since it uses palletized transfers.

-Andrew



More information about the mc1322x mailing list