Re: ATTiny2313/4313 Flowcode development board
Posted: Wed Jun 03, 2026 9:18 pm
I mentioned that UART doesn't compile in hardware mode.
Looking at the CAL file - I wasn't sure why:
// UDR is defined...
As a 'crude' fix I added before this block:
#define UDR0 UDR
And the code compiles (and runs) correctly - I did the usual "hello world" and this is correctly sent.
I'm not sure why the current CAL code doesn't work though - and my 'fix' will surely break things for other AVR MCUs?
Martin
Looking at the CAL file - I wasn't sure why:
Code: Select all
#ifndef MX_XMEGA // It's not an XMEGA
#ifndef UDR0 // Not defined - compilation fails
#ifdef UDR
#define UDR0 UDRAs a 'crude' fix I added before this block:
#define UDR0 UDR
And the code compiles (and runs) correctly - I did the usual "hello world" and this is correctly sent.
I'm not sure why the current CAL code doesn't work though - and my 'fix' will surely break things for other AVR MCUs?
Martin