Unspecified variables and forgetting the contents of watch window

Discussion on both general simulation and Proteus VSM microcontroller simulation.
Post Reply
TimBox100
Professional User
Posts: 87
Joined: Wed 2019-03-13 13:26

Unspecified variables and forgetting the contents of watch window

Post by TimBox100 »

Hi

I'm having issues with the VSM and floats. Using my Very old VSM there are no issues (Ver 7 something)

I have asked a friend who has 8.10 and they have no issues.

Positron (proton) and COFF files are the issue .bas seems ok

Next thing every time I stop a sim and restart any vars I placed in the watch window are removed.

Other versions do not/did not do that..

Lastly find mostly fails to find the variable even if I can see it in the list I think case sensitivity is permanently on.

Thanks
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Unspecified variables and forgetting the contents of watch window

Post by Ettore »

About unspecified floating point variable, edit the microchip mcu and type the following property in the "Other Properties" field:
DT_FLOAT=MICROCHIP_BIGENDIAN
Immagine 2022-07-29 004816.jpg
Immagine 2022-07-29 004816.jpg (253.01 KiB) Viewed 405 times
COFF files are more standard debug format than BAS and compilers may use different floating point format (HITECH, MCHIP, IEEE, etc. So you have to tell what the format fits better with the loader. Even Proteus 7.xx works this way.

As per the variables not persistent in the watch window, yes you're right; they were persistent in the version 7.xx but they are not anymore for recent version. I'm not sure if that was intentional or because a bug, albeit it might be intentional.
Watch window shows the contents at specified addresses. Ports and peripherals registers are allocated at defined addresses and so are persistent between Proteus calls. But the variables are allocated dynamically by the compiler at the build time so if you add new variables then their addresses may change at build time - and Proteus cannot know if you did re-build or not - and this may destroy contents in the watch window.
However I will ask to involved colleagues if that's a bug or intentional.
Kind regards,
Ettore Arena - Labcenter Electronics.
TimBox100
Professional User
Posts: 87
Joined: Wed 2019-03-13 13:26

Re: Unspecified variables and forgetting the contents of watch window

Post by TimBox100 »

Hello Ettore

Thanks for the COFF fix, its working now

Ref the watch window. I agree that variables address will change and that is an issue so can understand them wanting to prevent people getting caught out. Can you ask the team to make it so that if the source file changes eg the file time or size its cleared. As it is if I want to just stop the sim to do a cpu restart in the sim the variables are cleared. Its a bigger pain than the misaligned var issue.

Any pointers on the search?

Thanks
Tim
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Unspecified variables and forgetting the contents of watch window

Post by Ettore »

Yes, case sensitive is always on, so you have to search it exactly as it written. I will inform concerned people about the case.
Kind regards,
Ettore Arena - Labcenter Electronics.
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Unspecified variables and forgetting the contents of watch window

Post by Ettore »

1) I have fixed the "case sensitive always on" issue. This will be possibly in the 8.15.
2) As for the "forgetting contents of variables dragged to watch window" a case was raised up.
Kind regards,
Ettore Arena - Labcenter Electronics.
David
Site Admin
Posts: 2267
Joined: Mon 2006-02-20 14:56
Location: Head Office
Contact:

Re: Unspecified variables and forgetting the contents of watch window

Post by David »

Hi Tim,

This has been fixed for 8.16, Thanks.

Regards,
Dave.
Post Reply