Reply by Paul Stoffregen December 18, 20062006-12-18
Here's another little bootloader utility I wrote some time ago. Also
GPL'd, so feel free to use any parts you like if you're releasing under
the GPL.

http://www.pjrc.com/arm/lpc2k_pgm/

An Engineer's Guide to the LPC2100 Series

Reply by Jason Morgan December 18, 20062006-12-18
First release, complete with documentation available here:

http://sourceforge.net/projects/pylpctools/
Reply by surveyor_corporation December 13, 20062006-12-13
> A version of this is now ready, at least in an alpha form. I'm
> getting ready to put it on Sourceforge as a release, but want to do
> a bit more testing first. It is still a bit clunky, and many of the
> features it really should have are incomplete, but is anybody up for
> giving it a go?
>
> Distribution:
> Python 2.5 script + some assembly language as an Eclipse project
> using GCC (the latter is not required unless you want to change the
> functionality big time)

Jason -

We will be very interested in this project, as we now have a Python
2.4+ based console application for controlling an LPC2106-based robot,
and we currently have to launch lpc21isp for firmware updates. When
available, let us know where the code can be found.

Thanks, Howard
Reply by Jason Morgan December 12, 20062006-12-12
Hi Bertrik,

RE: The last two; The ISP does not support these directly, indeed
neither does it support programming external flash. I have
developed a very small downloadable program that is loaded
automatically by Python. This expands the functionality of ISP, e.g.
for programming external flash and will handle these functions
too. In fact, both these are really the same function, just with a
different byte/word count.

> >
> > TODO:
> > Speed it up - currently relies on timeouts too much
> > Read/Write memory that is outside of the chip
> > Load data into external RAM
>
> How are you planning to do those last two things?
>

I'm not sure which 'this' you mean:
Flash sector write protection is just a function of the external
flash chips. Internally, the entire chip can be protected from
external reading (but not sector by sector) I don't think there is
any write protection though - is there?

If you mean handle the differences, then this is probably the most
daunting task. I only have experience of a couple of the family
members and there are many subtle differences with others. I expect
this will happen in time, especially if others find this tool useful
and want to expand it. Luckily Python is excellent at representing
really complicated and abstract data structures in a flexible way.
Reply by Bertrik Sikken December 12, 20062006-12-12
Jason Morgan wrote:
> A version of this is now ready, at least in an alpha form. I'm
> getting ready to put it on Sourceforge as a release, but want to do
> a bit more testing first. It is still a bit clunky, and many of the
> features it really should have are incomplete, but is anybody up for
> giving it a go?
>
> Distribution:
> Python 2.5 script + some assembly language as an Eclipse project
> using GCC (the latter is not required unless you want to change the
> functionality big time)
>
> Platform:
> Anything that will run Python+pySerial and has a spare RS232 serial
> port. Although I have only tested it on WindowsXP, it should
> certainly work on Cygwin, Linux and Macintosh as well.
> It should work with virtual serial ports as well.
>
> Dependencies - Runtime (script form):
> Python > 2.4
> pySerial
> wxPython (for the UI, later)
>
> Dependencies - Runtime (Win32 .EXE form)
> none
>
> Dependencies - Build:
> Runtime+
> Eclipse + WinARM (or any other GNU toolchain, but you will have to
> work it out yourself)
> py2exe if you want to make a Win32 .exe distribution
>
> Done:
> Boot into ISP mode
> Load data into internal RAM
> Read/Write internal memory
> Program external flash (AMD 29LVxxx)
> Configure external bus
> Reboot with or without ISP
>
> TODO:
> Speed it up - currently relies on timeouts too much
> Read/Write memory that is outside of the chip
> Load data into external RAM

How are you planning to do those last two things?

> Individual sector erase
> Program/erase internal Flash
> Internal and external Flash sector protection

And this?

> Handle differences between LPC family members
> User interfaces (GUI and command line)
> Support other arrangements and types of external flash
> Lots and lots of testing
> MSWindows runtime & installer - probably when the UI is done
> I am also thinking of some integration with OpenOCD?????

Kind regards,
Bertrik
Reply by Jason Morgan December 12, 20062006-12-12
Hi,

A version of this is now ready, at least in an alpha form. I'm
getting ready to put it on Sourceforge as a release, but want to do
a bit more testing first. It is still a bit clunky, and many of the
features it really should have are incomplete, but is anybody up for
giving it a go?

Distribution:
Python 2.5 script + some assembly language as an Eclipse project
using GCC (the latter is not required unless you want to change the
functionality big time)

Platform:
Anything that will run Python+pySerial and has a spare RS232 serial
port. Although I have only tested it on WindowsXP, it should
certainly work on Cygwin, Linux and Macintosh as well.
It should work with virtual serial ports as well.

Dependencies - Runtime (script form):
Python > 2.4
pySerial
wxPython (for the UI, later)

Dependencies - Runtime (Win32 .EXE form)
none

Dependencies - Build:
Runtime+
Eclipse + WinARM (or any other GNU toolchain, but you will have to
work it out yourself)
py2exe if you want to make a Win32 .exe distribution

Done:
Boot into ISP mode
Load data into internal RAM
Read/Write internal memory
Program external flash (AMD 29LVxxx)
Configure external bus
Reboot with or without ISP

TODO:
Speed it up - currently relies on timeouts too much
Read/Write memory that is outside of the chip
Load data into external RAM
Individual sector erase
Program/erase internal Flash
Internal and external Flash sector protection
Handle differences between LPC family members
User interfaces (GUI and command line)
Support other arrangements and types of external flash
Lots and lots of testing
MSWindows runtime & installer - probably when the UI is done
I am also thinking of some integration with OpenOCD?????
Reply by aethr December 6, 20062006-12-06
Hi,

taken from sourceforge:

>pySerial 1.21 is compatible with Python 2.0 on Windows, Linux and several un*x like systems, MacOSX and Jython.

So it probably will, all serial ports on Mac OS X systems, USB to serial converters, register themselves as a device in /dev, so wouldn't expect problems.

Arthur
Reply by "Jason Morgan (VPN Solutions Ltd)" December 6, 20062006-12-06
Hi Arthur,

Thanks for the offer, I will be in touch when the project is more complete.
There is still a lot more to do, but the foundations are in place.
At the moment I can boot and upload hex files into RAM, I am working on
programming external Flash, then I will add programming internal Flash.

Tell me, does pySerial work on the mac?

Cheers,
Jason.
Reply by aethr December 6, 20062006-12-06
Hi,

I could help out testing on the Mac OS X platform if you like. I also have some experience in Python.

Arthur
Reply by Jason Morgan December 3, 20062006-12-03
Hi,

Yes, I am aware of this project, infact, its source code has been
very useful in reverse engineering the Philips ISP CLI, which
differs somewhat from their own documentation.

As I said, I need to take this much furthur than internal Flash only
and also add some more useful debugging tools.

Not to mention making it platform agnostic.....

Would you be interested in contributing?

regards,
jason.