[mc1322x] New to the list and Freescale CPUs - firmware loading question

Mariano Alvira mar at devl.org
Thu Jul 29 11:56:44 EDT 2010


On Thu, Jul 29, 2010 at 11:30:32AM -0400, Barry Michels wrote:
> After seeing the 2010 DefCon Ninja Badge, I started investigating the Freescale
> MC13224V.  I come from a Microchip PIC background, but don't really care for
> their ZigBee offerings.  The Freescale CPU with everything on-board is very
> attractive.
> 
> I just subscribed and looked through the archives of this mailing list, but
> haven't found an answer to my question: If I get a RedBee EconoTAG and develop
> something, what then?  What is required to program my firmware onto a blank
> chip?  

This chip runs entirely out of RAM --- that's a little different than
most so it's worth mentioning early.

On boot, if there is a valid image in flash it will copy that to RAM
and start execution there. If there is not a valid image, then it
looks for on on SPI, then I2C, then over UART1 (if RTS was held low on
reset).

So then a simple way to run code is over UART1. There are three
programs to do this: I wrote and use mc1322x-load.pl it's part of
libmc1322x. See:

   http://mc1322x.devl.org/libmc1322x.html

Andrew has written a python loader called red-bsl --- I think it's
included in the python-on-a-chip distribution. Freescale provides
TestTool.

Now to write an image to flash, you first load a flashing stub and
then send the stub the image. mc1322x-load and red-bsl both support
this. libmc1322x includes a flashing stub called flasher.c

That example is also at: 

   http://mc1322x.devl.org/libmc1322x.html

If you have JTAG access then you can write to memory and run code. If
you can do that then you can flash the part as well. OpenOCD doesn't
support this yet but it would be easy for someone to add.

There is a hardware erase option described on that page too.

If you have JTAG you can also erase by loading a program that does so.


> programming hardware is necessary."  Sounds to me like the CPU populated on
> that board has a bootloader, but chips from the factory won't.  Is that
> correct?

The bootloader is part of the ROM and they come from the factory that
way. 

You don't need any fancy hardware to run/flash this part --- that's
one of the reasons it's so good.

Also checkout:

http://mc1322x.devl.org/files/qc-2010.pdf

-Mar.



More information about the mc1322x mailing list