Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] Frustration abounds..

Re: [AVR-Chat] Frustration abounds..

2007-07-18 by John Samperi

At 05:06 AM 19/07/2007, you wrote:

>Anyone want to have a look at this?

I won't have any free time until the middle of August
from what I have on now :-(

But if you like to send it I'll play with it once I get a
break.

Have you compared what you are doing with source
code from another boot loader that works? There seem to be
lots of them around, it will probably be something simple.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.8/906 - Release Date: 17/07/2007 6:30 PM

Re: [AVR-Chat] Frustration abounds..

2007-07-18 by David VanHorn

>
> Have you compared what you are doing with source
> code from another boot loader that works? There seem to be
> lots of them around, it will probably be something simple.

I've looked at a few, and of course the data sheet.
So far, I'm not seeing the difference.
And it works in the sim, just not in the chip!

Re: [AVR-Chat] Frustration abounds..

2007-07-18 by Cat C

Isn't there a fuse that needs setting?

Cat

_________________________________________________________________
Windows Live Hotmail. Even hotter than before. Get a better look now. 
www.newhotmail.ca?icid=WLHMENCA148

Re: [AVR-Chat] Frustration abounds..

2007-07-18 by David VanHorn

On 7/18/07, Cat C <catalin_cluj@hotmail.com> wrote:
> Isn't there a fuse that needs setting?

Which one would that be?

Re: [AVR-Chat] Frustration abounds..

2007-07-19 by Cat

I can't check now, but maybe something to do with boot size.
Your instruction to write flash (SPM?) has to be in the boot section, or it 
will not work, so if the boot section is zero...

Take this with a pinch of salt, I'm a beginner with some things.

Cat
Show quoted textHide quoted text
> On 7/18/07, Cat C <catalin_cluj@hotmail.com> wrote:
>> Isn't there a fuse that needs setting?
>
> Which one would that be?
>

Re: [AVR-Chat] Frustration abounds..

2007-07-19 by David VanHorn

On 7/18/07, Cat <catalin_cluj@hotmail.com> wrote:
> I can't check now, but maybe something to do with boot size.
> Your instruction to write flash (SPM?) has to be in the boot section, or it
> will not work, so if the boot section is zero...

It is, the whole bootloader is currently orged above $F000, and once I
get rid of the diagnostics, it would fit above $FF00

The frustrating thing is that it's working in sim!
It writes over program memory just fine, exactly where and what it should.


> Take this with a pinch of salt, I'm a beginner with some things.

We all are :)

Re: [AVR-Chat] Frustration abounds..

2007-07-19 by Jim Wagner

And don't some of them have multiple boot sizes? I suspect
that on one of these, if you specify a space that is too
large and you try to write into part of that overly large
boot space?

Just a thought
Jim Wagner

On Wed, 18 Jul 2007 19:45:49 -0600
 "Cat" <catalin_cluj@hotmail.com> wrote:
> I can't check now, but maybe something to do with boot
> size.
> Your instruction to write flash (SPM?) has to be in the
> boot section, or it 
> will not work, so if the boot section is zero...
> 
> Take this with a pinch of salt, I'm a beginner with some
> things.
> 
> Cat
> > On 7/18/07, Cat C <catalin_cluj@hotmail.com> wrote:
> >> Isn't there a fuse that needs setting?
> >
> > Which one would that be?
> >
> 

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

Re: [AVR-Chat] Frustration abounds..

2007-07-19 by David VanHorn

On 7/19/07, Jim Wagner <jim_d_wagner@applelinks.net> wrote:
> And don't some of them have multiple boot sizes? I suspect
> that on one of these, if you specify a space that is too
> large and you try to write into part of that overly large
> boot space?

That's not the case here.  The failures I'm seeing are when I'm
writing the first few pages, at $00000 and $00001  The loader is
protected, and living up at $0F000

Re: [AVR-Chat] Frustration abounds..

2007-07-19 by David VanHorn

Problem found..

The page erase MUST come before the write to the SPM buffer.

Interestingly, the approach I was using, would seem to at worst, give
me half a page of data written, but in fact it gives all FFs.

Get a packet
Write half a buffer
Get another packet
Erase Page
Write half a buffer
Write page


I changed the sequence to:

Get a packet
Erase Page
Write half a buffer
Get another packet
Write half a buffer
Write page

This works.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.