Wiping old Code

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

Moderator: Benj

Post Reply
Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times
Contact:

Wiping old Code

Post by Docara »

Hi,

I'm messing around with an Ardiuno Uno - using both Xloader and FC to program it.

I've noticed if that part of some old code still runs after I've uploaded a new (shorter) file - is there a away to clear old the flash space

Thanks
MAtt

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Wiping old Code

Post by LeighM »

Hi Matt,
That sounds like perhaps the device is not programming correctly, or your new program is not correctly written.
If your program is executing past it's end, then that is going to cause unpredictable results, whether the remaining flash space is erased or not.

Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times
Contact:

Re: Wiping old Code

Post by Docara »

Hi Leigh,

Thanks for the reply.

Solved - I have just realised that I had an unseen component (ADC Pot) on the dashboard from a deleted macro (and Component Macro)

To give you some feedback, I am using an LCD display with 5 buttons connected to an analogue line. I had assigned a variable for a Pot and used it in a macro to find out what values popped out when the buttons where pressed - all worked fine.

I deleted that macro without deleting the component and or variable, I accidentally left the declared ADC variable and the Pot dashboard panel component in place (both unused). I saved and uploaded some new code and found that when the buttons where pressed the LCD displayed garbage - pulled power, reopened project, tried different programmer (xloader) and even downloaded the 'proper' Arduino IDE to try to clear the Flash memory by burning a big program to the Arduino etc etc

Finally I found the left over Pot when I expanded the dash panel. It seems that the left over component, though not used with in the new code, had still been included and compiled in some form when the code was uploaded just by virtue of it 'being there'

Interestingly, I could not delete this left over component because it was still 'apparently' assigned to a Component Macro. I had to start completely from scratch - deleting the project to get things working properly again, I would imagine this highlights an issue for you guys??

Matt

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

Re: Wiping old Code

Post by medelec35 »

Hi Matt,
Docara wrote:Interestingly, I could not delete this left over component because it was still 'apparently' assigned to a Component Macro. I had to start completely from scratch - deleting the project to get things working properly again, I would imagine this highlights an issue for you guys??
If you have Project Explorer (View, Project Explorer) open, just select Components Icon from the top icons.
Right click on the component you wish to delete that's assigned to ADC component e.g.Pot_Color_Cap1:
Comp1.png
(8.05 KiB) Downloaded 2748 times
Select

Code: Select all

List Occurrences
.
Then all the places within flowchart where component macro has been added will be shown in a list.
All you do is double click on each listed item to show where its been added on the flowchart.


Martin
Martin

Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times
Contact:

Re: Wiping old Code

Post by Docara »

Thank you buddy

Post Reply