[En-Nut-Discussion] anyone using SAM7S32?

Bernd Walter enut at cicely.de
Sun May 2 17:02:31 CEST 2010


On Wed, Jul 29, 2009 at 11:11:43PM +0200, Bernd Walter wrote:
> On Wed, Jul 29, 2009 at 09:43:24PM +0200, Adam Dybkowski wrote:
> > Bernd Walter wrote:
> > 
> > >> Have you tried to link and load program into RAM? Then debug it
> > >> step-by-step by JTAG. Atmel has complicated JTAG debugging of software
> > >> written in AT91SAM7Sxx Flash memory (only one hardware breakpoint usable
> > >> in gcc) - that's why it's easier to load it in RAM.
> > 
> > > I can't load 18k programm code into 8k RAM.
> > 
> > I thought you have problems in startup code - it's easy to link it with
> > "almost-nothing-code", making binaries short.
> 
> I have almost nothing - even compiled several ethernut sourcefiles
> with thumb.
> Maybe I can get it below 8k, but I still need a few k RAM left for
> stacks and 4k doesn't sound possible to me.
> 
> > > The board has no JTAG anyway.
> > 
> > No JTAG - no bonus. :-(
> 
> That's true :-(
> Well - I'm sure I will find the problem without it.

Long time ago, but I've finally found time to debug this problem until
success.
The problem was that I'm running FreeBSD and use a simple flasher
tool instead of the more common ones.
For performance reasons it doesn't verify and it failed to unlock the
second flash region, so code between 0x1000 and 0x1fff wasn't written
at all.
I never noticed this bug because I had only been flashing SAM7X chips
and they don't lock any region for sam-ba code.
Ethernut is running fine on this Controller once you flash all bits :-)

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



More information about the En-Nut-Discussion mailing list