[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] boot.h (was: Re: avr-libc-dev archives)
From: |
E. Weddington |
Subject: |
Re: [avr-libc-dev] boot.h (was: Re: avr-libc-dev archives) |
Date: |
Mon, 06 Jan 2003 11:24:37 -0700 |
On 23 Dec 2002 at 0:45, Volkmar Dierkes wrote:
> On Tue, 17 Dec 2002 15:57:16 -0700, E. Weddington wrote:
>
> > What I'm proposing is a *low-level* API that right now a user has to
> > write themselves, more of a boot loader *support* API:
> >
> > boot_page_fill(address, data) // Fill the temporary page write
> > buffer boot_page_erase(address) // Erase page
> > boot_page_write(address) // Write page boot_mem_read(address)
> > //
> > Read memory byte boot_rww_enable() // Enable RWW section
> > boot_lock_bits_set(__lock_bits) // Set lock bits
> > boot_spm_interrupt_enable() // Enable SPM interrupt
> > boot_spm_interrupt_disable() // Disable SPM interrupt
> > is_boot_spm_interrupt() // Check if SPM interrupt enabled
> > boot_rww_busy() // Check if RWW section is busy
> > boot_spm_busy() // Check if SPM is busy
> > boot_spm_busy_wait() //
> > Wait while SPM is busy
> >
> >
> > This doesn't provide a whole bootloader; that is up to the
> > programmer to write. But it does provide the *tools* for a
> > programmer to write one. This API pretty much corresponds to the
> > Boot Loader Support section in all the AVR data sheets. Right now
> > avrlibc does not provide any such functions.
>
> I agree with your proposal. I think I got a copy of your avr-boot.h in
> an indirect way ;-) I found a small bug because your are testing it on
> a mega128 and at the moment I try to get it working with a mega8.
>
> Look in __boot_mem_read_normal__, change
> : "=r" ((unsigned char)__result), \
> into
> : "=r" ((unsigned char)__result) \
>
> I deleted the comma at the end.
Thanks for catching that! Now corrected. That's what I get for cut
and paste. ;-)
> But I have also a question. There are some differences in the
> mega's: Especially the pagesize is different. Is there a possibility
> to include such things in the iomxxx.h (or whereever)?
>
I didn't know the pagesize differed between processors. IMO, the io
headers would be the place to do that.
Joerg, Ted, do you have an opinion on this?
Eric
- Re: [avr-libc-dev] boot.h (was: Re: avr-libc-dev archives),
E. Weddington <=