[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Re: avr-libc-dev archives
From: |
E. Weddington |
Subject: |
Re: [avr-libc-dev] Re: avr-libc-dev archives |
Date: |
Tue, 17 Dec 2002 15:57:16 -0700 |
On 17 Dec 2002 at 23:34, Joerg Wunsch wrote:
> > > I remember it, but by the time you posted it, i didn't understand
> > > it (or didn't have the time to understand it ;-), and then i
> > > eventually forgot about it.
>
> > I'm still interested in getting some sort of API in this realm put
> > into avrlibc, if others are interested too.
>
> I'm not against it. I've got some test boards with chips around that
> are bootloader-capable, and i'm interested in having a bootloader that
> uses a relatively `standard' protocol. Initially, i thought about
> kermit or xmodem, but i'm now more leaning towards the STK500 protocol
> since this would allow the bootloader to immediately talk to any
> STK500-aware programming tool. If i get around to implement it, i
> don't mind contributing it for the `examples' section.
Whoa! I'm not into providing any kind of "protocol". I don't want to
impose a particular protocol or communications channel. Leave all
that for the user to decide.
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.
It's difficult for a user writing for a 128 to write a bootloader,
especially in C, mainly because there is no support for the ESPM
instruction.
On a marketing note, implementing this in avrlibc could be a big draw
to bring more users over to using the open source toolset. AFAIK,
there is no API like this in other commercial offerings.
Eric