То ли настолько позабыл Си, то ли...
В общем, не могу понять, почему лезет undefined external:
Содержимое main.c
CODE
#define ENABLE_BIT_DEFINITIONS
#define F_CPU 4000UL //36864UL !!!
#include <intrinsics.h>
#include <ioavr.h>
#include <stdio.h>
#include "USART.h"
int main ( void )
{
__disable_interrupt ();
USART_init ( 9600U );
...
Содержимое USART.h
CODE
#include <ioavr.h>
void USART_Init( unsigned int baud );
...
Содержимое USART.c
CODE
#define ENABLE_BIT_DEFINITIONS
#include "USART.h"
void USART_Init ( unsigned int baud )
{
/* Set baud rate */
UBRRH = (unsigned char)(baud>>8);
UBRRL = (unsigned char)baud;
/* Enable receiver and transmitter */
UCSRB = (1<<RXEN)|(1<<TXEN);
/* Set frame format: 8data, 2stop bit */
UCSRC = (1<<USBS)|(3<<UCSZ0);
}
...