UART compiler error ATTINY4313

For general Flowcode discussion that does not belong in the other sections.
Post Reply
ChrisT66
Posts: 37
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 12:47 pm
Been thanked: 1 time

UART compiler error ATTINY4313

Post by ChrisT66 »

Hello, first of all a happy new year to everyone here!
And here is my problem: I want to transfer a program from an ATMEGA328P to an ATTINY4313. I use a simple UART transfer in the program. when I compile the project now I get the following error:

C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_UART.c: In function 'FC_CAL_UART_Init_1':
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR\AVR_CAL_UART.c:661:24: error: 'URSEL' undeclared (first use in this function)
UCSR0C = ((1 << URSEL) | (1 << UCSZ01) | (1 << UCSZ00)); // configuration for 8 data bits (Combined UBRRHx/UCSRCx)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR\AVR_CAL_UART.c:661:24: note: each undeclared identifier is reported only once for each function it appears in
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR\AVR_CAL_UART.c: In function 'FC_CAL_UART_Send_1':
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR\AVR_CAL_UART.c:1236:11: error: lvalue required as left operand of assignment UDR0 = nChar;

Can anyone give me a tip? Thank you very much! Greetings Chris

ChrisT66
Posts: 37
Joined: Mon Dec 07, 2020 12:47 pm
Been thanked: 1 time

Re: UART compiler error ATTINY4313

Post by ChrisT66 »

Even if I create a new program and enter UART1 initialize as the only command, the error.... appears.

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

Re: UART compiler error ATTINY4313

Post by chipfryer27 »

Hi

Happy New Year to you too.

I created a simple chart using the ATTINY4313 with just the UART on Ch1. In the chart I initialise the UART then enter an endless loop. Chart won't compile to Hex citing all sorts of errors.

Changing the UART from ch1 to software did allow the chart to compile. Perhaps you could test using the software channel too?

Regards

ChrisT66
Posts: 37
Joined: Mon Dec 07, 2020 12:47 pm
Been thanked: 1 time

Re: UART compiler error ATTINY4313

Post by ChrisT66 »

Hello, thanks for the answer.

With the ATMEGA328P (and other controllers) it works fine, without error messages. There seems to be something wrong with the 4313 implementation for flowcode, I'm afraid.

Regards Chris

ChrisT66
Posts: 37
Joined: Mon Dec 07, 2020 12:47 pm
Been thanked: 1 time

Re: UART compiler error ATTINY4313

Post by ChrisT66 »

I made another attempt with an ATTINY2313.
With the 2313 (which has only half the memory of the 4313) it works as it should without any problems.
So it seems to be due to the implementation of the 4313 here...

Post Reply