Society of Robots - Robot Forum
Software => Software => Topic started by: GWER57 on December 09, 2009, 11:19:43 AM
-
Hi, I am working on a project that is based on an ATMega 328p. Every thing has been going well ;D but when I try to use any of the functions from avrlib the compiler says this:
undefined reference to uartSendByte
undefined reference to rprintfInit
undefined reference to uartInit
etc.
If anyone could help me out that would be great :D and the sooner the better because I am going to use this as a Christmas present.
Thanks
-
Could you please post your code?
-
Could you please post your code?
Here it is:
#include <avr/io.h>
#include <util/delay.h>
#include "uart.h"
#include "rprintf.h"
#include "global.h"
#define F_CPU 8000000
int main()
{
uartInit(); // initialize UART (serial port)
uartSetBaudRate(9600); // set UART speed to 9600 baud
rprintfInit(uartSendByte); // configure rprintf to use UART for output
}
-
How are you building the file? In AVRStudio or a makefile?
Not that it will change much but you should specify the CPU speed in the build file rather than the source file but it makes me wonder if your build file is also not specifying the processor type.
-
How are you building the file? In AVRStudio or a makefile?
In AVRStudio