Newbie compile errors.

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

Moderator: Benj

Post Reply
ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times

Newbie compile errors.

Post by ianjoh »

First time attempt at Flowcode. It is producing multiple errors so I could be miles off.

The idea is to produce some different tones from an alarm board out of my scrap box, I have have chosen a 12F629 as it has the same pin count as the original 12c508. It works fine on simulation, one uncertainty is with the switch as I have only got bits 0 to 5 to read on the port I have used 6 bits in the condition (0bxxxxxx).

Target folder: C:\Users\Owner\DOCUME~1
Source name: C:\Users\Owner\Documents\sounder_12F629.fcfx
Title:
Description:
Device: PIC.12F.12F629
Generated by: Flowcode v8.0.0.6
Date: Tuesday, November 13, 2018 10:39:45
Users: 1
Registered to: ianjoh
License key: DTHTBY
NOT FOR COMMERCIAL USE
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat 12F629 "C:\Users\Owner\DOCUME~1\" "sounder_12F629"

C:\Users\Owner\DOCUME~1>C:\PROGRA~3\Flowcode\Common\COMPIL~1\pic\batch\..\bin\xc8.exe --chip=12F629 "sounder_12F629.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32
Microchip MPLAB XC8 C Compiler (Free Mode) V1.45
Build date: Nov 15 2017
Part Support Version: 1.45
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

using updated 32-bit floating-point libraries; improved accuracy might increase code size
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_IO.c: 216: non-reentrant function "_FC_CAL_Port_In_DDR__x" appears in multiple call graphs and has been duplicated by the compiler
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_Delay.c: 85: non-reentrant function "_delay_us" appears in multiple call graphs and has been duplicated by the compiler
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_Delay.c: 152: non-reentrant function "_FCI_DELAYINT_US" appears in multiple call graphs and has been duplicated by the compiler
sounder_12F629.c: 744: non-reentrant function "_FCD_0ba81_PiezoSounder1__BuzzerOnDelay" appears in multiple call graphs and has been duplicated by the compiler
C:\PROGRA~3\Flowcode\Common\COMPIL~1\pic\sources\common\fltol.c: 43: non-reentrant function "___fltol" appears in multiple call graphs and has been duplicated by the compiler
C:\PROGRA~3\Flowcode\Common\COMPIL~1\pic\sources\common\sprcdiv.c: 8: non-reentrant function "___fldiv" appears in multiple call graphs and has been duplicated by the compiler
C:\PROGRA~3\Flowcode\Common\COMPIL~1\pic\sources\common\sprcmul.c: 8: non-reentrant function "___flmul" appears in multiple call graphs and has been duplicated by the compiler
C:\PROGRA~3\Flowcode\Common\COMPIL~1\pic\sources\common\xxtofl.c: 10: non-reentrant function "___xxtofl" appears in multiple call graphs and has been duplicated by the compiler
C:\PROGRA~3\Flowcode\Common\COMPIL~1\pic\sources\common\Umul8_16.c: 4: non-reentrant function "__Umul8_16" appears in multiple call graphs and has been duplicated by the compiler
. .

Non line specific message: (1359) no space for ___xxtofl parameters
(908) exit status = 1
(908) exit status = 1

Error returned from [xc8.exe]

C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1



FINISHED
Attachments
sounder_12F629.fcfx
(18.41 KiB) Downloaded 231 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: Newbie compile errors.

Post by medelec35 »

Hi Ian,
Welcome to Matrix forums
It looks like the device you have selected has run out of memory.
Also, one very important rule to observe.
Its best not to use the same component within an interrupt that's used elsewhere.
E.g Sounder component in both Normal call macro and interrupt call macro
I have converted your flowchart to use the more superior 12F1840.
It's being run with internal osc of 16MHz as I don't know if power should be kept to a minimum or not?
These devices can run with internal osc of 32MHz if required.
Attachments
sounder_12F1840.fcfx
(19.34 KiB) Downloaded 238 times
Martin

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times

Re: Newbie compile errors.

Post by ianjoh »

Hi Martin

Thank you so much for your prompt reply.
I have been digesting your changes - its takes a while!
The reason behind the interrupt was to break the 8 second timer on the Normal macro so there would be no delay to switching to the emergency tone should the timer be active. Could you suggest a way of doing this if I cannot use the macro in the interrupt as I was?

Is there a way of checking for remaining available memory as the project is being built?

Ian

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: Newbie compile errors.

Post by medelec35 »

Hi Ian,
Take a look at at attached flowchart, in the normal call macro. That is one way of overriding the 8 sec delay if interrupt is triggered (independent of osc speed)
The only way I know of to check memory as you go is to keep compiling to hex.
Then the available memory remaining will be displayed.
Attachments
sounder_12F1840 V2.fcfx
(19.95 KiB) Downloaded 255 times
Martin

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times

Re: Newbie compile errors.

Post by ianjoh »

Hi Martin
That's brilliant - thank you. I think I will apply it to the toilet call macro as well to neaten it up.

Ian

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: Newbie compile errors.

Post by medelec35 »

Hi Ian,
You're welcome.
I did notice I made a mistake, sorry about that.
Can you change

Code: Select all

(Loop < 160) || (INT0TriggerFlag = 1)
to

Code: Select all

(Loop < 160) && (INT0TriggerFlag = 0)
If you did not already know:
|| = logical OR
&& = logical AND
Logical is used for calculations whereas bitwise (& |)are used for bit masking and manipulation.
You can single step flowchart by pressing F8 then use mouse to press buttons and observe what happens.
The INT0 interrupt does simulate OK.
Alternatively, you can use the keyboard to trigger a button.
It's called Key mapping
If you need help with that then let me know.
Martin

Post Reply