Running existing FC8 in FC9

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
DAVIDJOINER
Posts: 140
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 7:35 pm
Been thanked: 18 times

Running existing FC8 in FC9

Post by DAVIDJOINER »

Hi

1. Have problems running an existing fully working DSPIC FC8 Program in FC9

2. Have included the FC9 log file for reference

3 Have also tried a new Minimal FC9 program in FC9 for DSPIC and that compiles and loads okay so it suggests that the overall FC9 software and my hardware is okay

4 This would therefore suggest to me that there is something in FC9 that is not comparable with FC8

Please review

Is this problem likely to be common, if so you will have to advise us which functions will have to be re written to convert from FC8 to FC9

DAVID
Attachments
FC9_MAIN_CONTROL_BOX_REV04.msg.txt
(75.4 KiB) Downloaded 172 times

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

Re: Running existing FC8 in FC9

Post by Steve-Matrix »

Hi David,

Can you please post your FCFX file and I will try to determine what the issue is. PM me with the file if you'd prefer to keep the project private.

stefan.erni
Valued Contributor
Posts: 760
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 150 times
Been thanked: 171 times

Re: Running existing FC8 in FC9

Post by stefan.erni »

Hi David

Is it possible to post the program?

There is an error:
FC9_MAIN_CONTROL_BOX_REV04.c:2314:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
FC9_MAIN_CONTROL_BOX_REV04.c:7975:40: error: 'FCI_TMP_STR' undeclared (first use in this function)

regards

Stefan

BenR
Matrix Staff
Posts: 1756
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 446 times
Been thanked: 606 times

Re: Running existing FC8 in FC9

Post by BenR »

Hi David,

We have changed the way string concatenations work so you can now do things like string = "a" + "b" + "c" + "d" all on one line.

Please can you send me your project file so we can investigate the problem for you, looks like it could be a corner case bug in the new system.

For reference here are the components we have done large rework on and will likely have differences moving from v8 to v9.

DSP
Mechatronics
GLCD
I2C - Now all transaction based but hopefully not too many issues here

DAVIDJOINER
Posts: 140
Joined: Wed Dec 02, 2020 7:35 pm
Been thanked: 18 times

Re: Running existing FC8 in FC9

Post by DAVIDJOINER »

Hi

Have included the program

Unfortunately it is quite long as Controls / syncs all my amateur radio transmitters and receivers via the main control box program & console and is under continuous change as i add / experiment with functions so may be hard to understand

It also uses a lot of string calculations / numerous serial ports linking to usb ports on the PC & also i2c

I will also wish to add the I2C MCP23017 to it to control another control box hence my other FC9 Bug Topic i raised on MCP23017 which is still not quite resolved yet

David
Attachments
FC9_MAIN_CONTROL_BOX_REV04.fcfx
(306.95 KiB) Downloaded 189 times

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

Re: Running existing FC8 in FC9

Post by Steve-Matrix »

The problem occurs in the "SYNCRONISE_TO_FREQ1_MASTER_AND_SEND" macro. In there, just over half way down, is a macro call with the name "WAIT FOR SDR FREQUENCY MESSAGE". This is a call to ReceiveString, but its return variable is blank.

A quick fix is to set a return variable to some string (a new 'dummy' one is fine). That allows it to compile.

I will continue to investigate why this is causing a problem just in case there is an error within Flowcode, but hopefully the above fix should allow you to continue.

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

Re: Running existing FC8 in FC9

Post by Steve-Matrix »

A quick update on this:

I've found the problem and fixed it within Flowcode. The next release of the core files will allow string returns to be blank (as in v8), and so the workaround suggested in my previous post will not be needed in future.

DAVIDJOINER
Posts: 140
Joined: Wed Dec 02, 2020 7:35 pm
Been thanked: 18 times

Re: Running existing FC8 in FC9

Post by DAVIDJOINER »

Hi

Thanks for the quick response and info

Program now compiles and loads okay with your fix

Most of the program appears to work ie LCD and serial communication

However the encoder does not appear to be working now

Have also tried reloading in FC8 and encoder works fine again

So appears that FC9 does not like the encoder or sub routines at present

Any ideas how to resolve

David

BenR
Matrix Staff
Posts: 1756
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 446 times
Been thanked: 606 times

Re: Running existing FC8 in FC9

Post by BenR »

Hi David,

In the IOC interrupt enable icon it looks like all pins are enabled? Is this correct?

DAVIDJOINER
Posts: 140
Joined: Wed Dec 02, 2020 7:35 pm
Been thanked: 18 times

Re: Running existing FC8 in FC9

Post by DAVIDJOINER »

HI

Thats very strange my flowcode F8 program used IOC for pins E2 & E1

I also notice in the component properties for the encoder the Pins had changed to other pins

In FC9 I changed the IOC back to E1 & E2 and put the pins back to E1 & E2 in the component properties

Then re compiled and run and now working fine

It looks like F9 reading the F8 file these values got corrupted some how

Anyway now works but will keep an eye on future F8 to F9 conversions in case it is a flowcode 9 software issue

David

Post Reply