[flashrom] Arduino LPC flasher?
Stefan Tauner
stefan.tauner at student.tuwien.ac.at
Sun Mar 27 14:10:55 CEST 2011
On Sun, 27 Mar 2011 13:25:05 +0200
Benjamin Henrion <bh at udev.org> wrote:
> Hi,
>
> I am trying to port this code to an Arduino Duemilanove (atmega328p):
>
> http://mikestirling.co.uk/2010/08/programming-an-lpc-flash-with-an-avr-and-flashrom/
>
> When I change the chip to atmega168, I have the following error:
>
> avr-gcc -c -mmcu=atmega168 -I. -g -Os -funsigned-char
> -funsigned-bitfields -fpack-struct -fshort-enums -Wall
> -Wstrict-prototypes -Wa,-adhlns=uart.lst -std=gnu99 -DF_CPU=7372800
> -Wp,-M,-MP,-MT,uart.o,-MF,.dep/uart.o.d uart.c -o uart.o
> uart.c: In function ‘__vector_18’:
> uart.c:65: error: ‘_UDR’ undeclared (first use in this function)
> uart.c:65: error: (Each undeclared identifier is reported only once
> uart.c:65: error: for each function it appears in.)
> uart.c: In function ‘__vector_19’:
> uart.c:83: error: ‘_UDR’ undeclared (first use in this function)
> uart.c: In function ‘uart_init’:
> uart.c:281: error: ‘_UBRR’ undeclared (first use in this function)
> make: *** [uart.o] Error 1
>
> Any idea what to change?
>
> Having a simple Arduino being able to flash BIOS chips would be
> awesome...
>
the register names for the uart are probably different. e.g. for my
atmega32u2 i would have to use UDR1 and UBRR1[H|L].
just look it up in the datasheet or /usr/lib/avr/include/avr/.
HTH
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
More information about the flashrom
mailing list