FLOWCODE 9 - ARDUINO BL0127-1

For general Flowcode discussion that does not belong in the other sections.
ctksfc
Posts: 11
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 3:07 pm
Has thanked: 3 times
Been thanked: 2 times

FLOWCODE 9 - ARDUINO BL0127-1

Post by ctksfc »

URGENT

We are desperately trying to get the Actuators board working with BL0371 - we have tried the Demo Flowcode on you website BIT it is NOT compiling to chip (Arduino Uno R3 PDIP) ;

Code: Select all

Target folder: H:\Flowcode
Source name:   \\college.ctksfc.local\ict\StaffHomeFolders\j.teigland\BTECNats\Unit 6\BL0127 - Actuators\BL0127 - Actuators\Arduino\BL0127 Actuators Demo Flowcode9.fcfx
Title:         
Description:   
Device:        ARD.ATMEGA.ATMEGA328P
Generated by:  Flowcode v9.2.0.33
Date:          Wednesday, May 04, 2022 08:29:52
Users:         50
Registered to: ctksfc (98801268)
Licence key: E7JRY1
   NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avra.bat  "C:\Program Files (x86)\Flowcode\Compilers\avrv5\" atmega328p "H:\Flowcode\BL0127 Actuators Demo Flowcode9.elf" "H:\Flowcode\BL0127 Actuators Demo Flowcode9.c" "H:\Flowcode\BL0127 Actuators Demo Flowcode9.lst"

H:\Flowcode>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B690411241251B4A05C2B5828F4452C9F7348705C640EF477B79E0C7881D2E5EEC9BD6FE0D8D4660AC0314F98C28BCA92AF856EFD1DB5B777140BC4D00059D7958998291880A09BBE74CF7BA3F4E37F13004EE3637760F1F0B7DA0CC623CD30E3C7D6BAB4C3FE6151D92B8EC0ADD55E96639DAC02472BDE3806EF43AE3A028BD32A5DAE68BB191DA97CB6883A66D3C41849952BB2DD264AF32733E2C3050DA273BE4EEFF12703F3DAF67B119A5A5B069403B38249A6C4D8A1304B09A437E7E2D43FD26DF891DB3086C82D6 

H:\Flowcode>REM REVISION: 1.0 

H:\Flowcode>REM GUID: EA0828B2-5C70-41A5-8C54-F359DD5CC88B 

H:\Flowcode>REM DATE: 29\03\2021 

H:\Flowcode>REM DIR: FCD\AVR\batchfiles\avra.bat 

H:\Flowcode>"C:\Program Files (x86)\Flowcode\Compilers\avrv5\bin\avr-gcc.exe" -mmcu=atmega328p -Os -ffunction-sections -fdata-sections -funsigned-char -o "H:\Flowcode\BL0127 Actuators Demo Flowcode9.elf" "H:\Flowcode\BL0127 Actuators Demo Flowcode9.c" -lm -Wl,-gc-sections 
In file included from C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\includes.c:814:0,
                 from H:\Flowcode\BL0127 Actuators Demo Flowcode9.c:547:
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:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.c:43:0,
                 from C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:431,
                 from H:\Flowcode\BL0127 Actuators Demo Flowcode9.c:45:
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c: In function 'FCD_05261_switch_base__ReadState':
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:64:65: error: 'FCP_PIN_A' undeclared (first use in this function)
 #define FCP_GET_B(Port, Mask, Shift)   (FC_CAL_Port_In_DDR__x((&FCP_PIN##Port), (&FCP_TRIS##Port), (Mask), (Shift)))
                                                                 ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:61:42: note: in expansion of macro 'FCP_GET_B'
 #define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(_##Port, Mask, Shift)
                                          ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:48:31: note: in expansion of macro 'FCP_GET'
 #define GET_PORT_PIN(p,b)     FCP_GET(B,p,(1<<b),b)
                               ^
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c:571:12: note: in expansion of macro 'GET_PORT_PIN'
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:64:65: note: each undeclared identifier is reported only once for each function it appears in
 #define FCP_GET_B(Port, Mask, Shift)   (FC_CAL_Port_In_DDR__x((&FCP_PIN##Port), (&FCP_TRIS##Port), (Mask), (Shift)))
                                                                 ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:61:42: note: in expansion of macro 'FCP_GET_B'
 #define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(_##Port, Mask, Shift)
                                          ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:48:31: note: in expansion of macro 'FCP_GET'
 #define GET_PORT_PIN(p,b)     FCP_GET(B,p,(1<<b),b)
                               ^
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c:571:12: note: in expansion of macro 'GET_PORT_PIN'
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:64:83: error: 'FCP_TRIS_A' undeclared (first use in this function)
 #define FCP_GET_B(Port, Mask, Shift)   (FC_CAL_Port_In_DDR__x((&FCP_PIN##Port), (&FCP_TRIS##Port), (Mask), (Shift)))
                                                                                   ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:61:42: note: in expansion of macro 'FCP_GET_B'
 #define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(_##Port, Mask, Shift)
                                          ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:48:31: note: in expansion of macro 'FCP_GET'
 #define GET_PORT_PIN(p,b)     FCP_GET(B,p,(1<<b),b)
                               ^
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c:571:12: note: in expansion of macro 'GET_PORT_PIN'
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c: In function 'FCD_05261_switch_base__WaitUntilHigh':
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:64:65: error: 'FCP_PIN_A' undeclared (first use in this function)
 #define FCP_GET_B(Port, Mask, Shift)   (FC_CAL_Port_In_DDR__x((&FCP_PIN##Port), (&FCP_TRIS##Port), (Mask), (Shift)))
                                                                 ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:61:42: note: in expansion of macro 'FCP_GET_B'
 #define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(_##Port, Mask, Shift)
                                          ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:48:31: note: in expansion of macro 'FCP_GET'
 #define GET_PORT_PIN(p,b)     FCP_GET(B,p,(1<<b),b)
                               ^
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c:624:20: note: in expansion of macro 'GET_PORT_PIN'
    #if (0) // 0 == 1
                    ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:64:83: error: 'FCP_TRIS_A' undeclared (first use in this function)
 #define FCP_GET_B(Port, Mask, Shift)   (FC_CAL_Port_In_DDR__x((&FCP_PIN##Port), (&FCP_TRIS##Port), (Mask), (Shift)))
                                                                                   ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:61:42: note: in expansion of macro 'FCP_GET_B'
 #define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(_##Port, Mask, Shift)
                                          ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:48:31: note: in expansion of macro 'FCP_GET'
 #define GET_PORT_PIN(p,b)     FCP_GET(B,p,(1<<b),b)
                               ^
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c:624:20: note: in expansion of macro 'GET_PORT_PIN'
    #if (0) // 0 == 1
                    ^
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c: In function 'FCD_05261_switch_base__WaitUntilLow':
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:64:65: error: 'FCP_PIN_A' undeclared (first use in this function)
 #define FCP_GET_B(Port, Mask, Shift)   (FC_CAL_Port_In_DDR__x((&FCP_PIN##Port), (&FCP_TRIS##Port), (Mask), (Shift)))
                                                                 ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:61:42: note: in expansion of macro 'FCP_GET_B'
 #define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(_##Port, Mask, Shift)
                                          ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:48:31: note: in expansion of macro 'FCP_GET'
 #define GET_PORT_PIN(p,b)     FCP_GET(B,p,(1<<b),b)
                               ^
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c:675:20: note: in expansion of macro 'GET_PORT_PIN'
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:64:83: error: 'FCP_TRIS_A' undeclared (first use in this function)
 #define FCP_GET_B(Port, Mask, Shift)   (FC_CAL_Port_In_DDR__x((&FCP_PIN##Port), (&FCP_TRIS##Port), (Mask), (Shift)))
                                                                                   ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:61:42: note: in expansion of macro 'FCP_GET_B'
 #define FCP_GET(Type, Port, Mask, Shift) FCP_GET_##Type(_##Port, Mask, Shift)
                                          ^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_IO.h:48:31: note: in expansion of macro 'FCP_GET'
 #define GET_PORT_PIN(p,b)     FCP_GET(B,p,(1<<b),b)
                               ^
H:\Flowcode\BL0127 Actuators Demo Flowcode9.c:675:20: note: in expansion of macro 'GET_PORT_PIN'

Error returned from [avr-gcc.exe]

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

Autoclose turned off


FINISHED

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: FLOWCODE 9 - ARDUINO BL0127-1

Post by BenR »

Hello,

It looks like you have a switch component that has a pin connection set to use PortA which doesn't exist on the Arduino device.
In function 'FCD_05261_switch_base__ReadState':
error: 'FCP_PIN_A' undeclared (first use in this function)
If you attach the project file then I can take a look for you.

ctksfc
Posts: 11
Joined: Mon Dec 07, 2020 3:07 pm
Has thanked: 3 times
Been thanked: 2 times

Re: FLOWCODE 9 - ARDUINO BL0127-1

Post by ctksfc »

Thank you as mentioned the Sample is taken from your website here- NOT modified ;
https://www.matrixtsl.com/webshop/e-blo ... board.html

We have tried BOTH FC8 and FC9 in combination with same errors
Attachments
BL0127 Actuators Demo Flowcode 7-8.fcfx
(21.09 KiB) Downloaded 108 times
BL0127 Actuators Demo Flowcode9.fcfx
(25.72 KiB) Downloaded 110 times

ctksfc
Posts: 11
Joined: Mon Dec 07, 2020 3:07 pm
Has thanked: 3 times
Been thanked: 2 times

Re: FLOWCODE 9 - ARDUINO BL0127-1

Post by ctksfc »

So Yes the switch was the issue - set if for C0 (BL0114 on Ports A/D) have so far managed to get Servo and DC Motor running - can you please advice Pin Settings for Stepper motor (Pins D8-D13) - thanks in advance (this in FC8) (FC9 only ServoMotor working)

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 469 times

Re: FLOWCODE 9 - ARDUINO BL0127-1

Post by medelec35 »

Hello.
Can you try the attached flowchart, please?
If it works OK, then the current example will be updated.
Attachments
BL0127 Actuators Demo Flowcode9.fcfx
(25.61 KiB) Downloaded 116 times
Martin

ctksfc
Posts: 11
Joined: Mon Dec 07, 2020 3:07 pm
Has thanked: 3 times
Been thanked: 2 times

Re: FLOWCODE 9 - ARDUINO BL0127-1

Post by ctksfc »

I've Cracked it for FC8 - will post results later

ctksfc
Posts: 11
Joined: Mon Dec 07, 2020 3:07 pm
Has thanked: 3 times
Been thanked: 2 times

Re: FLOWCODE 9 - ARDUINO BL0127-1

Post by ctksfc »

Thanks Martin - YES that is now working with ALL 3 actuators

Nur_khan
Posts: 2
Joined: Fri Sep 24, 2021 2:37 pm

Re: FLOWCODE 9 - ARDUINO BL0127-1

Post by Nur_khan »

Hi Martin ,
Having issue transferring the code to the BL0371 board
Could you pls help ... see message below

Code: Select all

Target folder: C:\Users\Owner\Downloads
Source name:   C:\Users\Owner\Downloads\BL0127 Actuators Demo Flowcode9.fcfx
Title:         
Description:   
Device:        ARD.ATMEGA.ATMEGA328P
Generated by:  Flowcode v9.2.0.33
Date:          Thursday, May 12, 2022 13:34:15
Users:         50
Registered to: nur_khan (93752989)
Licence key: 33QGBX
   NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Compilation is up-to-date
Linking is up-to-date
Using FCD settings for programmer
Launching the programmer...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avrc_arduinoA.bat  "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" m328p arduino  115200 "C:\Users\Owner\Downloads\BL0127 Actuators Demo Flowcode9.hex"

C:\Users\Owner\Downloads>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B69041072C26934F62BA2AD18E3139D88C14D7BD8C8CEEE570C34335B9BD40DC91ABF9F6A4CCB7873802B223E4F4A1008A3591FE0D8D4660AC0314F98C28BCA92AF856EFD1DB5B777140BC4D00059D79589982ACF9C651DE9EEE6B2C2BCACE9467A07961E9396118791606FB531939F6539CFCA719F5A675CCBEE4B35B6B3E06A3B6EA1F1C802F1E0729A39B031A08340CB3AD07D220268868A23DD35657CD8CE9A282EF4678980A2C5F4D2C3050DA273BE4EE29956884B1FB575DFD3894D13ADA1E109287F1E6B0940B29850400E5B608E745107C571680B732A8 

C:\Users\Owner\Downloads>REM REVISION: 1.0 

C:\Users\Owner\Downloads>REM GUID: BC89C337-8FBB-43B7-A3A7-C7902C121931 

C:\Users\Owner\Downloads>REM DATE: 29\03\2021 

C:\Users\Owner\Downloads>REM DIR: FCD\AVR\batchfiles\avrc_arduinoA.bat 

C:\Users\Owner\Downloads>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avrdude.exe" -pm328p -P115200 -b"C:\Users\Owner\Downloads\BL0127 Actuators Demo Flowcode9.hex" -carduino -D -Uflash:w:""                      
avrdude.exe: invalid baud rate specified 'C:\Users\Owner\Downloads\BL0127 Actuators Demo Flowcode9.hex'

Error returned from [avrdude]

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

Autoclose turned off


FINISHED

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 469 times

Re: FLOWCODE 9 - ARDUINO BL0127-1

Post by medelec35 »

Hello.
I have moved the compiler messages within the code tags as it looks better and takes up less room.
The issue being

Code: Select all

avrdude.exe: invalid baud rate specified
This normally happens when you have not selected the correct com port for your Arduino.
With the Arduino connected to USB, select Build, Project Options.
On the lower right below the Programmer port, select the correct com port for your Arduino.
Don't leave it showing n/a.
Martin

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 469 times

Re: FLOWCODE 9 - ARDUINO BL0127-1

Post by medelec35 »

Just a thought.
A simular issue can occur if there is a comms issue between the Arduino and the PC
Martin

Post Reply