Society of Robots - Robot Forum

Software => Software => Topic started by: klims on June 13, 2012, 05:57:47 AM

Title: Webbotlib software UART compile error in C
Post by: klims on June 13, 2012, 05:57:47 AM
I'm back again with another compile error :(

I am getting compile errors when trying to include a software UART in my project. The errors I'm getting are:

lib/gen_SerialServoDriver_uart.c: In function '__vector_14':
error: 'PB0' undeclared (first use in this function)
...and so on all relating to uses of PB0.

I have tried many other pins but I get the same compile error (but the pin changes).
I have been able to successfully compile using the pins that didn't work in other project device (eg: PB0 on another device as a digital output).

Any ideas guys? Can anyone confirm for me if they are able to use software UART in their project?


Thanks.
Title: Re: Webbotlib software UART compile error in C
Post by: Webbot on June 13, 2012, 04:26:24 PM
Its another blessed AVR anomoly. On some chips they call the pins PB0, PB1 etc but on the ATmega328P they decided to call them PORTB0, PORTB1 etc.
So until I can get a fix out then change
Code: [Select]
#define TRANSMIT_PIN   PB0
to
Code: [Select]
#define TRANSMIT_PIN   PORTB0
Title: Re: Webbotlib software UART compile error in C
Post by: klims on June 13, 2012, 05:19:31 PM
Awesome. Thanks Webbot!
Title: Re: Webbotlib software UART compile error in C
Post by: Webbot on June 13, 2012, 05:23:16 PM
No worries! New Project Designer now released that fixes the problem.