RC5 - compiler error - Arduino

For general Flowcode discussion that does not belong in the other sections.
Post Reply
zoli2496
Posts: 28
http://meble-kuchenne.info.pl
Joined: Wed Sep 22, 2021 7:23 am
Been thanked: 2 times

Flowcode v9 RC5 - compiler error - Arduino

Post by zoli2496 »

Hello!

Unfortunately, the compiler stops with an error, and I can't figure out how to set up the RC5 component macro correctly so that the compiler is also good.

Please help! Tank you.

Error message:

C:\___NEW LIFE___\FC\RC5>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-gcc.exe" -mmcu=atmega328p -Os -ffunction-sections -fdata-sections -funsigned-char -o "C:\___NEW LIFE___\FC\RC5\RXRC5.elf" "C:\___NEW LIFE___\FC\RC5\RXRC5.c" -lm -Wl,-gc-sections
C:\___NEW LIFE___\FC\RC5\RXRC5.c:439:4: error: #error "RC5 Interrupt Edge Control Bit and Register not set, does chip have INT interrupt pin? If so then contact support"
#error "RC5 Interrupt Edge Control Bit and Register not set, does chip have INT interrupt pin? If so then contact support"
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:442:4: error: #error "RC5 Interrupt Enable Bit and Register not set, does chip have INT interrupt pin? If so then contact support"
#error "RC5 Interrupt Enable Bit and Register not set, does chip have INT interrupt pin? If so then contact support"
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:445:4: error: #error "RC5 Timer Enable Bit and Register not set, does chip have Timer0? If so then contact support"
#error "RC5 Timer Enable Bit and Register not set, does chip have Timer0? If so then contact support"
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:448:4: error: #error "RC5 Timer Count Register not set, does chip have Timer0? If so then contact support"
#error "RC5 Timer Count Register not set, does chip have Timer0? If so then contact support"
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:451:4: error: #error "RC5 Timer Control Bit and Register not set, does chip have Timer0? If so then contact support"
#error "RC5 Timer Control Bit and Register not set, does chip have Timer0? If so then contact support"
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:454:4: error: #error "RC5 Clock Select Control Bit and Register not set, does chip have Timer0? If so then contact support"
#error "RC5 Clock Select Control Bit and Register not set, does chip have Timer0? If so then contact support"
^
In file included from C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\includes.c:814:0,
from C:\___NEW LIFE___\FC\RC5\RXRC5.c:497:
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_PWM.c:110:5: warning: #warning "PWM Channel Uses Resource Timer 0" [-Wcpp]
#warning "PWM Channel Uses Resource Timer 0"
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_PWM.c:495:3: warning: #warning "Period control register not available on target device, period will default to 255 + 1" [-Wcpp]
#warning "Period control register not available on target device, period will default to 255 + 1"
^
In file included from C:\___NEW LIFE___\FC\RC5\RXRC5.c:45:0:
C:\___NEW LIFE___\FC\RC5\RXRC5.c: In function 'FCD_01bf1_RC51__Initialise_States':
C:\___NEW LIFE___\FC\RC5\RXRC5.c:766:11: error: 'TIMER_ENREG' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:766:4: note: in expansion of macro 'st_bit'
C:\___NEW LIFE___\FC\RC5\RXRC5.c:766:11: note: each undeclared identifier is reported only once for each function it appears in
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:766:4: note: in expansion of macro 'st_bit'
C:\___NEW LIFE___\FC\RC5\RXRC5.c:766:24: error: 'TIMER_ENBIT' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:53: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:766:4: note: in expansion of macro 'st_bit'
C:\___NEW LIFE___\FC\RC5\RXRC5.c: In function 'FCD_01bf1_RC51__RXDisable':
C:\___NEW LIFE___\FC\RC5\RXRC5.c:797:14: error: 'TIMER_ENREG' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:412:39: note: in definition of macro 'clear_bit'
#define clear_bit( reg, bitNumb ) ((reg) &= ~(1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:797:6: note: in expansion of macro 'cr_bit'
#endif
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:797:27: error: 'TIMER_ENBIT' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:412:55: note: in definition of macro 'clear_bit'
#define clear_bit( reg, bitNumb ) ((reg) &= ~(1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:797:6: note: in expansion of macro 'cr_bit'
#endif
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c: In function 'FCD_01bf1_RC51__Timer_Event':
C:\___NEW LIFE___\FC\RC5\RXRC5.c:911:3: error: 'TIMER_REGISTER' undeclared (first use in this function)
{
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c: In function 'FCD_01bf1_RC51__Signal_Edge':
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1070:19: error: 'TIMER_REGISTER' undeclared (first use in this function)
#ifdef MX_CAL_PIC16
^
In file included from C:\___NEW LIFE___\FC\RC5\RXRC5.c:45:0:
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1079:24: error: 'TIMER_FLAGREG' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:414:38: note: in definition of macro 'test_bit'
#define test_bit( reg, bitNumb ) ((reg) & (1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1079:17: note: in expansion of macro 'ts_bit'
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1079:39: error: 'TIMER_FLAGBIT' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:414:52: note: in definition of macro 'test_bit'
#define test_bit( reg, bitNumb ) ((reg) & (1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1079:17: note: in expansion of macro 'ts_bit'
C:\___NEW LIFE___\FC\RC5\RXRC5.c: In function 'FCD_01bf1_RC51__RXEnable':
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1307:14: error: 'TIMER_FLAGREG' undeclared (first use in this function)
#ifdef MX_CAL_PIC16
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:412:39: note: in definition of macro 'clear_bit'
#define clear_bit( reg, bitNumb ) ((reg) &= ~(1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1307:6: note: in expansion of macro 'cr_bit'
#ifdef MX_CAL_PIC16
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1307:29: error: 'TIMER_FLAGBIT' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:412:55: note: in definition of macro 'clear_bit'
#define clear_bit( reg, bitNumb ) ((reg) &= ~(1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1307:6: note: in expansion of macro 'cr_bit'
#ifdef MX_CAL_PIC16
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1318:13: error: 'TIMER_ENREG' undeclared (first use in this function)
#ifdef MX_CAL_AVR
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1318:5: note: in expansion of macro 'st_bit'
#ifdef MX_CAL_AVR
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1318:26: error: 'TIMER_ENBIT' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:53: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1318:5: note: in expansion of macro 'st_bit'
#ifdef MX_CAL_AVR
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1319:13: error: 'INT_GLOBREG' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1319:5: note: in expansion of macro 'st_bit'
sei();
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1319:26: error: 'INT_GLOBAL' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:53: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1319:5: note: in expansion of macro 'st_bit'
sei();
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c: At top level:
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1403:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
st_bit(INT_FLAGREG, INT_FLAGBIT);
^
C:\___NEW LIFE___\FC\RC5\RXRC5.c:1423:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
st_bit(TIMER_FLAGREG, TIMER_FLAGBIT);
^

Error returned from [avr-gcc.exe]

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avra.bat reported error code 0x1

Autoclose turned off


FINISHED

chipfryer27
Valued Contributor
Posts: 1165
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 287 times
Been thanked: 415 times

Re: RC5 - compiler error - Arduino

Post by chipfryer27 »

Hi

If you can post your Flowcode file it is easier to offer help.

Regards

Steve-Matrix
Matrix Staff
Posts: 1265
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 168 times
Been thanked: 279 times

Re: RC5 - compiler error - Arduino

Post by Steve-Matrix »

And also, it helps to know what version of Flowcode you are using. I can see from the reported messages that it is v9, but to make supporting you easier, please select the appropriate v9/v10 icon when you post in future. I have edited your post to add the v9 this time.

zoli2496
Posts: 28
Joined: Wed Sep 22, 2021 7:23 am
Been thanked: 2 times

Re: RC5 - compiler error - Arduino

Post by zoli2496 »

Hello! :)
OK. I am using Flowcode V9.
I wrote an RC5 test program to test the macro. Unfortunately, I get a lot of error messages during the translation. I have attached the flowcode file.
Attachments
RC5_Rx_Test_FC9.fcfx
(19.95 KiB) Downloaded 43 times

zoli2496
Posts: 28
Joined: Wed Sep 22, 2021 7:23 am
Been thanked: 2 times

Re: RC5 - compiler error - Arduino

Post by zoli2496 »

Any ideas, my dear friends? I posted the v9 program code in the previous post.

mnfisher
Valued Contributor
Posts: 974
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 516 times

Re: RC5 - compiler error - Arduino

Post by mnfisher »

There is quite a bit on getting RC5 working on Arduino at viewtopic.php?f=3&t=1120

Martin

Post Reply