Page 1 of 1

Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Sun Jan 15, 2012 9:57 pm
by PICFriend
Hey Guys,

Since i updated my Flowcode 4.3x to 4.5.18.74 a written PIC program is not working anymore.
There is a program that i wrote in the year 2010. Now in V4.5 i have to change one value in the code.
I can compile, get a hex file. After transfer in the target device the program does not read the RTC via I2C.
But I2C function seems to be working, because other functions (LM75) are ok.
The hexfile has a different size:

V4.3 = 29 KB
V4.5 = 27 KB

Is there a problem you can give a solution for?

When i transfer the older hex file, everything is ok!
The compiled one with V4.5 does not running.

PIC 16F876-04SP Running with 4Mhz Xtal

The attached file is the "not running" one.

Greets from germany

Carsten

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Mon Jan 16, 2012 11:05 am
by DavidA
Hello,

This does sound strange, I will ensure that someone has a look at this.

Was there any changes to the flowchart itself between the two versions?

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Mon Jan 16, 2012 11:13 am
by PICFriend
Yes and no! :!:

When i use the same (not altered) flowchart, the same problem occured.
That means, there is no difference when i use changed code.

The 4.5 Version seems to make the fault.
I had have made a copy from the running code (build with V4.3), compile it with V4.5 and then it is bad.

In the attached file there is one value changed at the beginning of MAIN routine. Old=216 New=220. That is all.

:?:

regards

Carsten

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Mon Jan 16, 2012 12:31 pm
by Benj
Hello Carsten,

Do you have the C code from the v4.3 compilation I could use to compare against the v4.5 generated c code?

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Mon Jan 16, 2012 2:06 pm
by PICFriend
Hallo Benj,

Do you mean the C-File what you see in Flowcode under "View C Code"?
And this from both Versions?

OK, i will post the 2 files later from home.

Greets

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Mon Jan 16, 2012 2:39 pm
by Benj
Hello,

I meant the .c file that is produced in the project folder when you click the compile to C/ASM/HEX buttons.

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Mon Jan 16, 2012 6:16 pm
by PICFriend
OK here are the C sources.

I have test it again. The older hex from the backup is working.
The actual compiled one is bad.
The only difference (my opinion) is the verson change.

From the running system (V4.3) i had made a copy and compile with V4.5. => not working!

Carsten

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Wed Jan 18, 2012 11:53 am
by PICFriend
Hi Benj,

Is there anybody working on that?
Perhaps it is a compiler conflict. The boostC compiler is a newer one with the flowcode V4.5, am i right?

regards

###

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Wed Jan 18, 2012 1:05 pm
by Benj
Hello,

Yes the compiler was updated for v4.5 but this shouldn't cause any issues.

Comparing the two C code files there is not too much of a difference between the two so I can't really see whats gone wrong.

There is no config data embedded in the C code, could this be the cause of the problem? Use Chip -> Configure -> Expert mode menu to insert config data into the file.

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Wed Jan 18, 2012 1:19 pm
by PICFriend
Hi,

"Chip -> Configure -> Expert mode menu" => that is not available. There is only an empty window __CONFIG data!

How can i get this window?

Carsten

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Wed Jan 18, 2012 1:32 pm
by Benj
Hello Carsten,

In Chip -> Compiler options make sure the second set of Programmer paths look like this.

Use external program - Ticked

Location: C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PPP\PPPv3.exe
Parameters: -cs 2 -chip PIC%p -config

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Wed Jan 18, 2012 2:59 pm
by PICFriend
Hello!

OK, i will try. The window i found but never used befor. I will have a look at the software today in the afternoon.
I´ll report it then.

Carsten

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Wed Jan 18, 2012 6:28 pm
by PICFriend
Hello Benj,

I hade made a test again. I compiled a copy from the working flowchart with new CONFIG - data as you required.
Unfortunately no function. I don´t know what is going wrong.

The attached file is with Configuration data.
More error description:
In the targetdivice there is a display build in, that shows the time/date from the I2C - RTC and LM75 temperatures.
The temperatures are ok (I2C working), the display shows time = 11:11:11 or somtimes 22:22:22.

Perhaps that is another possibility to find a error or something like that.

regards

Carsten

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Wed Jan 18, 2012 9:05 pm
by PICFriend
Hi!

Now! There is a solution (not realy)!

I have had installed the flowcode V4.3.7.63 on another computer, compiled and it works fine.
I altered the program, compiled and it works too!

There must be a difference between the two Versions!

At V 4.5 i changed the compilersettings and configurationdata => not ok.

What is going on guys?

Carsten

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Wed Jan 18, 2012 9:26 pm
by JonnyW
Hello. Would it be possible for you to post the .c code generated from your v4.3 file as well? We can diff these files to see what has changed then and maybe this gives us a clue to the problem.

Cheers,

Jonny

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Thu Jan 19, 2012 8:51 am
by PICFriend
Good morning,

OK, here is that file that works fine generated from V4.3.7.63 yesterday evening.
The bad one from V4.5 you can find in the last posts. (titled with strange program)

regards

Carsten

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Thu Jan 19, 2012 11:08 am
by Steve
Hello Carsten,

Without access to the hardware, this is going to be a difficult problem for us to fix. Are you able to isolate it to a particular part of the code or a particular component function?

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Thu Jan 19, 2012 6:31 pm
by PICFriend
Hello together,

I thing i got it. Now it works perfect on V4.5 too!! :mrgreen:

I found that the cause was in the stringcalculation:
This c-routine is building the timestring for the display. (worked under 4.3 correct, not or different under V4.5)

Sek = ToString$(RTC_sec_1)
ZSek = ToString$(RTC_sec_10)
Min = ToString$(RTC_min_1)
ZMin = ToString$(RTC_min_10)
Std = ToString$(RTC_std_1)
ZStd = ToString$(RTC_std_10)
Sek = ZSek + Sek
Min = ZMin + Min
Std = ZStd + Std
Zeit = Min + ":" + Sek
Zeit = Std + ":" + Zeit

Now i altered the string function with more new variables and it is ok now.

Sek = ToString$(RTC_sec_1)
ZSek = ToString$(RTC_sec_10)
Min = ToString$(RTC_min_1)
ZMin = ToString$(RTC_min_10)
Std = ToString$(RTC_std_1)
ZStd = ToString$(RTC_std_10)
Sek_1 = ZSek + Sek => x+y=z (added new string variable)
Min_1 = ZMin + Min => here too
Std_1 = ZStd + Std => here too
Zeit_1 = Min_1 + ":" + Sek_1 => here too
Zeit = Std_1 + ":" + Zeit_1


I this the cause of the "versions-problem" ?? :?

Carsten

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Thu Jan 19, 2012 6:44 pm
by Benj
Hello Carsten,

That's great glad you got it working and thanks for letting us know. I seem to remember there was a bit of an update to some of the string manipulation stuff for v4.5 so this could have been corrupting the string before it got sent across to the LCD. I know we fixed this potential issue for v5 anyway so both the v4.3 and v4.5 programs should work as is with v5.

Re: Programm not workin anymore since Flowcodeupdate to 4.5

Posted: Fri Jan 20, 2012 11:40 am
by PICFriend
Hey!

Everything is all right! Thank MM for this support! Great Software!

Greets from Germany

Carsten :wink: