Page 1 of 1

Undeclared Errors when using Stepper motor component

Posted: Mon Jun 15, 2020 3:34 pm
by rstechnics
Hi,
trying to get a Stepper motor working in FC8 with Arduino Uno R3 SMD.
Tried with both OUTPUTS/GENERIC and NEMA8 components in a new file.
At compiling only getting ERROR CODE 1 after a series of Undeclared.... lines, see below.
Updated version of FC8.2 and the Stepmotor components seem to have no actual newer updates..

Please your reaction how to correct this.
Many thanks and regards,
Luuk Aalders

Code: Select all

Target folder: U:\Projecten\FlowCode
Source name:   U:\Projecten\FlowCode\StepmotorTest_v01.fcfx
Title:         
Description:   
Device:        ARD.ATMEGA.ATMEGA328P
Generated by:  Flowcode v8.2.0.12
Date:          Monday, June 15, 2020 16:22:09
Users:         1
Registered to: rstechnics
License key: CXXNET
https://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\avr\batchfiles\avra.bat  atmega328p "U:\Projecten\\FlowCode\Test_v0101.elf" "U:\Projecten\FlowCode\StepmotorTest_v01.c" "U:\Projecten\FlowCode\Test_v0101.lst"
U:\Projecten\FlowCode>"C:\PROGRA~2\Flowcode\Common\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega328p -Os -ffunction-sections -fdata-sections -funsigned-char -o "U:\Projecten\FlowCode\Test_v0101.elf" "U:\Projecten\FlowCode\StepmotorTest_v01.c" -lm -Wl,-gc-sections 
U:\Projecten\FlowCode\Test_v0101.c: In function 'FCD_02411_stepper_base__EnableMotor':
U:\Projecten\FlowCode\Test_v0101.c:244: error: 'FCP_TRIS_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c:244: error: (Each undeclared identifier is reported only once
U:\Projecten\FlowCode\Test_v0101.c:244: error: for each function it appears in.)
U:\Projecten\FlowCode\Test_v0101.c:244: error: 'FCP_PORT_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c: In function 'FCD_02411_stepper_base__Output_Step':
U:\Projecten\FlowCode\Test_v0101.c:310: error: 'FCP_TRIS_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c:310: error: 'FCP_PORT_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c: In function 'FCD_02411_stepper_base__DisableMotor':
U:\Projecten\FlowCode\Test_v0101.c:375: error: 'FCP_TRIS_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c:375: error: 'FCP_PORT_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c:384: error: 'FCP_PIN_A' undeclared (first use in this function)
Error returned from [avr-gcc.exe]
C:\Program Files (x86)\Flowcode\Common\Compilers\avr\batchfiles\avra.bat reported error code 1
Autoclose turned off
FINISHED

Re: Undeclared Errors when using Stepper motor component

Posted: Mon Jun 15, 2020 4:14 pm
by medelec35
Can you post your flowchart?
That will be a big help in to seeing what the issue.

Re: Undeclared Errors when using Stepper motor component

Posted: Tue Jun 16, 2020 7:20 am
by rstechnics
Test_v0101.fcfx
For testing it now is just a basic Steppermotor setup rotating one direction in endless loop.
(8.64 KiB) Downloaded 226 times

Re: Undeclared Errors when using Stepper motor component

Posted: Tue Jun 16, 2020 7:34 am
by rstechnics
--SOLVED--
Oops, just found out the cause for this errors..

At placement the Stepper motor components it is standard initialised at PortA0-A3.
The Arduino chip has only PortB-PortD.
Configuring the coil output properties to Port C0-C3 did the trick, now works fine without errors.

Anyway Medelec35, thanks!