7 Segment Compile Error on Arduino Uno

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
AbeFM
Posts: 16
Joined: Sat Jun 04, 2016 8:03 pm
Has thanked: 2 times

7 Segment Compile Error on Arduino Uno

Post by AbeFM »

I'm pretty new to FlowCode, though I have so far been able to do everything I want without any big issues.

Running through a quick test, I wanted to use the 7 segment display output. There's a couple issues, which may be a root cause, but here's the short version - I get compile errors for undefined functions.

Code: Select all

Target folder: C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice
Source name:   C:\Users\Abe\Google Drive\Arduino\FlowCode\Practice\CounterTest.fcfx
Title:         
Description:   
Device:        AVR.ATMEGA.ATMEGA328P
Generated by:  Flowcode v6.1.3.2
Date:          Saturday, June 04, 2016 12:10:21
Users:         0
Registered to: 32649934
Licence key:   Z82HUT
   NOT FOR COMMERCIAL USE
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avra.bat  atmega328p "C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.elf" "C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c" "C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.lst"
Launching compiler...

C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice>"C:\PROGRA~2\FLOWCO~1\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega328p -Os -funsigned-char -o "C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.elf" "C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c" -lm 
C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c: In function 'FCD_0d511_LED_7Seg1__ClearDigit':
C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c:109: error: 'FCP_TRIS_A' undeclared (first use in this function)
C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c:109: error: (Each undeclared identifier is reported only once
C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c:109: error: for each function it appears in.)
C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c:109: error: 'FCP_PORT_A' undeclared (first use in this function)
C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c: In function 'FCD_0d511_LED_7Seg1__ShowDigit':
C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c:161: error: 'FCP_TRIS_A' undeclared (first use in this function)
C:\Users\Abe\GOOGLE~1\Arduino\FlowCode\Practice\CounterTest.c:161: error: 'FCP_PORT_A' undeclared (first use in this function)

Error returned from [avr-gcc.exe]
Completed compilation, return = 1

C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avra.bat reported error code 1


FINISHED
Then again, it uses Port B for its output, and portB doesn't have 8 pins on an UNO. I can manually run the display with portA, but not with the component macro.

Am I doing something wrong? Is there a reasonable work-around? I don't really need this functionality (I hope it's clear my garbage code was just to test come features).

Final note: It won't compile if the functions (disabled or not) are in the program. It would be better if you didn't have to DELETE something but could just disable it to see if it's the problem. Is there some way to do this?


Thanks!!!!
Attachments
CounterTest.fcfx
(6.4 KiB) Downloaded 288 times

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: 7 Segment Compile Error on Arduino Uno

Post by medelec35 »

Hi AbeFM,
Errors like that usually occur when a pin is assigned to a pin which does not exist on hardware.
Looking at flowchart the issue would be with Common Pin
PortA0 does not exist with your current target, so perhaps you can chenge it to PortD0 for example.


Martin
Martin

AbeFM
Posts: 16
Joined: Sat Jun 04, 2016 8:03 pm
Has thanked: 2 times

Re: 7 Segment Compile Error on Arduino Uno

Post by AbeFM »

Thanks Martin! I thought disabling the icon would do it. Changing the port as you said worked.

Is there some option to keep it from putting in includes for commented out items?

Post Reply