return code

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times

return code

Post by brandonb »

is this a overflow issue
Attachments
return code.jpg
return code.jpg (19.63 KiB) Viewed 5966 times

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: return code

Post by JonnyW »

Hello. Can you detail what program and version the error is from and how you created it please? Can you replicate the issue?

Cheers,

Jonny

brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times

Re: return code

Post by brandonb »

hey jonny, the fcf is below, what i did was compile to hex, and it happens when i restarted the computer also, after i exited out of this message it gave me another saying boost c stopped working.... i usually compile to hex to see where im at for program memory use while im in the process of making a project... version 4.5..... is v5 out yet
Attachments
reduced pcm.fcf
(224.17 KiB) Downloaded 305 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: return code

Post by medelec35 »

Hi Brandon.
I believe the crashing is caused by pulsewidth macro. Either its a bit on the big side or something else within that macro is causing the crashing.
I will see if I can sort it out for you...No promises though.

Martin
Martin

brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times

Re: return code

Post by brandonb »

hey martin, thats the same pulsewidth macro and same chip i used with the last flowbench controller worked great then.... this fcf is at the moment a bunch of stuff that is hacked together, i'll be working on this through out the night because nerding is addictive, i'll do changes and see what effects it, i thought it might have been caused by my huge port interrupt which im gonna fix later or that the compiler may have ended up having a missing file somehow, thanks

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: return code

Post by medelec35 »

Brandon,
I removed that 1 macro and no longer crashes. Then import it and it does crash every time.
if you have the flowchart that works, you could try exporting the pulsewidth macro then import it into flowchart that crashes.
Could it be possible that the macro has got corrupted?
I did also notice that the two port interrupts will be using the same pin. So that will need looking at. :)

Martin
Martin

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: return code

Post by JonnyW »

Hi Brandon. The issue is something in BoostC, unfortunately (FCv5 is due out early next week but will use the same BoostC version).

I tried this on my Windows PC here and got exactly the same results - unfortunately my PC is only used for coding so is pretty humble and takes quite a while for this to happen!

The issue may very well be based around the pulsewidth macro but if Flowcode imports this OK and BoostC compiles it, it is unlikely to be something in the code directly. Size is possible - maybe the macro tips the total program size over a limit at some stage in compilation, uses too many local variables, a long variable name or causes a crash only when combined with another macro. Instead of removing the macro known to cause this, try removing the smaller macros, one at a time, until you are left with the smallest possible macro that causes the crash. If it stops crashing put that macro back in and try a different one (or individual icons). The ideal would be to have a tiny ammount of code that reliably crashes.

It is odd that it crashes accessing the same address (30FFC) on all machines - I wonder what the significance of this address is. Have you tried changing the target chip for one with more memory (temporarily)?

Alternatively, if you can find a work around the main goal is for you to be able to continue development, so hopefully someone will be able to look into this next week (I am away for the week).

Good luck with it,

Jonny

brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times

Re: return code

Post by brandonb »

thanks jonny and martin, this messed with me all day yesterday, there is something definitly wrong with the ADC on the 16f1939, it flat out doesnot work!!! i took just the adc out of the engine controller fcf and created a new with only that, hooked up a manifold pressure sensor, i got nothing that was close to the simulation, this morning i took the same file converted to 16f690, it operates perfect then!!!! i have everything on the fcf working in simulation for bench testing only now, im gonna try this on a 18f2685 to see if it works on a chip that more sompisticated, do you guys see anything wrong with the acd matrix code on the 1939 below(im running a ben fixed fcd for port)?....... on the pulsewidth deal i think it was corrupted somehow :lol: i put most of them back in from the original file, it now compiles to hex except the program doesnt work on hardware at the moment becuase of the adc or something..... will update with pic18 results.....oops the file is too big to upload sorry

brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times

Re: return code

Post by brandonb »

UPDATE....tried my new completed file on the 18f2685 and all works perfect!!!....... there is something definitly wrong with the adc for the 16f1939 as it plain doesnt work? cool man i have a engine controller now, its time to burn some valves and hydrolock some pistons(yeehaw) :twisted:

brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times

Re: return code

Post by brandonb »

if anyone was curious heres the working file, pulsewidths are abitrary numbers at this point, the display is only active during run for bench testing only, disabled for car runs http://dl.dropbox.com/u/10367218/reduced%20pcm.fcf file is 500kb, will take quite a while to open in flowcode

Post Reply