[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] multiple definition of `__bad_interrupt'
From: |
Thomas D. Dean |
Subject: |
[avr-gcc-list] multiple definition of `__bad_interrupt' |
Date: |
Sun, 07 Jun 2009 18:01:44 -0700 |
I think I missed something.
I am using the packages: avr-gcc 4.3.2 and avr-libc 1.6.2.cvs100810-2 on
Ubuntu 9.04.
I get several multiple definition errors
avr-gcc -Os -mmcu=atmega128 hello.o hello -o hello.elf -lc
hello: In function `__bad_interrupt':
../../../../crt1/gcrt1.S:193: multiple definition of `__bad_interrupt'
/usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr51/crtm128.o:../../../../crt1/gcrt1.S:193:
first defined here
... etc.
Source below.
These are the latese Ubuntu packages. What did I miss?
tomdean
#include <stdio.h>
#include <avr/io.h>
#define F_CPU 16000000
#define BAUD 38400
#include <util/setbaud.h> // uart values
static int uart_putchar(char c, FILE *stream);
static FILE mystdout = FDEV_SETUP_STREAM(uart_putchar, NULL,
_FDEV_SETUP_WRITE);
static int uart_putchar(char c, FILE *stream) {
loop_until_bit_is_set(UCSR0A, UDRE);
UDR0 = c;
return 0;
}
int main(void) {
UBRR0H = UBRRH_VALUE;
UBRR0L = UBRRH_VALUE;
stdout = &mystdout;
printf("Hello, world!\n");
return 0;
}
- [avr-gcc-list] multiple definition of `__bad_interrupt',
Thomas D. Dean <=