Compile Errors

Hi, I am trying to port 2boots to the Arduino Mega (running a 3.3v and 8Mhz)

The following code seems to produce this error message can someone shed some light please?

Code

Error

avr-gcc -g -Wall -Os -funsigned-char -fno-split-wide-types -fno-inline-small-functions -mcall-prologues -ffunction-sections -fdata-sections -ffreestanding -fno-jump-tables -fno-tree-scev-cprop -fno-split-wide-types -mmcu=atmega2560 -DF_CPU=8000000L  -DMMC_CS=PB0 -DMMC_PORT=PORTB -DMMC_DDR=DDRB  -Wl,--section-start=.text=0x1F000 -Wl,--relax -nostartfiles -Wl,-gc-sections board-ArduinoMegaPro.c mmc_fat.c stk500v1.c prog_flash.c -o build/2boots-ArduinoMegaPro-atmega2560-8000000L-PB0.elf 
board-ArduinoMegaPro.c: In function 'main':
board-ArduinoMegaPro.c:62:45: warning: function with qualified void return type called [enabled by default]
stk500v1.c: In function 'setup_uart':
stk500v1.c:129:2: error: 'UBRRL' undeclared (first use in this function)
stk500v1.c:129:2: note: each undeclared identifier is reported only once for each function it appears in
stk500v1.c:130:2: error: 'UBRRH' undeclared (first use in this function)
stk500v1.c:131:2: error: 'UCSRA' undeclared (first use in this function)
stk500v1.c:132:2: error: 'UCSRC' undeclared (first use in this function)
stk500v1.c:133:2: error: 'UCSRB' undeclared (first use in this function)
stk500v1.c:133:10: error: 'TXEN' undeclared (first use in this function)
stk500v1.c:133:20: error: 'RXEN' undeclared (first use in this function)
stk500v1.c: In function 'putch':
stk500v1.c:155:11: error: 'UCSRA' undeclared (first use in this function)
stk500v1.c:155:19: error: 'UDRE' undeclared (first use in this function)
stk500v1.c:156:2: error: 'UDR' undeclared (first use in this function)
stk500v1.c: In function 'getch':
stk500v1.c:192:10: error: 'UCSRA' undeclared (first use in this function)
stk500v1.c:192:18: error: 'RXC' undeclared (first use in this function)
stk500v1.c:201:9: error: 'UDR' undeclared (first use in this function)
stk500v1.c: In function 'handle_addr':
stk500v1.c:236:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
stk500v1.c: In function 'getch':
stk500v1.c:203:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [2boots-atmega2560-8000000L-PB0-board-ArduinoMegaPro.hex] Error 1

Hi,
register names and bit names have a numeric value inside, e.g. UCSR0A, UDRE0, where 0 is the USART number. On the Mega you have four of them, numbered 0 to 3.

Ahhhh
That would make sense, thank you. I decided to drop support for serial which has made life a little easier.