closed

Loginbox

Please enter your username and password into the following fields to log in.


  • Username:
  • Password:
  •  
  • Auto log in on every visit.


  •  

Compiler bug?



Merlin offline
Administrator
Avatar
Gender: male
Location: UNITED KINGDOM 
Age:
Posts: 1035
Registered: 03 / 2005
Private message
Subject: Compiler bug?  -  Posted: 25.08.2021 - 20:00   -  
@ALL

in examining the compiler code I have identified a potential bug.

Has anyone imported 'STEPPORT' (as opposed to 'STEPPORTX', 'STEPPORTY' or 'STEPPORTZ')?

It seems to me that this cannot work.

Merlin.
Merlin.

:magic:

Software is a black art.
go down go up
miparo offline
Schreiberling
Avatar
Gender: male
Location: GERMANY  Germany
Age: 100
Posts: 760
Registered: 09 / 2007
Private message
Subject: Re: Compiler bug?  -  Posted: 25.08.2021 - 21:02   -  
Hi Merlin,
... and a MCU change in the project has no more effect in the *.ppro project file.
DeviceId etc are not replaced.

miparo
Kein Support per PN! | No support via PM!
go down go up
Merlin offline
Administrator
Avatar
Gender: male
Location: UNITED KINGDOM 
Age:
Posts: 1035
Registered: 03 / 2005
Private message
Subject: Re: Compiler bug?  -  Posted: 25.08.2021 - 23:23   -  
Hi Miparo.

Is this a new issue with the new compiler?

My comment relates to the old compiler too.

Regards
Merlin.

:magic:

Software is a black art.
This post has been edited 1-times. Last edit: 25.08.2021 - 23:24 by Merlin.
go down go up
miparo offline
Schreiberling
Avatar
Gender: male
Location: GERMANY  Germany
Age: 100
Posts: 760
Registered: 09 / 2007
Private message
Subject: Re: Compiler bug?  -  Posted: 26.08.2021 - 14:08   -  
Hi Merlin,
sorry.
This happens in the new compiler.

miparo
Kein Support per PN! | No support via PM!
go down go up
Merlin offline
Administrator
Avatar
Gender: male
Location: UNITED KINGDOM 
Age:
Posts: 1035
Registered: 03 / 2005
Private message
Subject: Re: Compiler bug?  -  Posted: 26.08.2021 - 18:16   -  
@All

I have resolved the stepper issue. It was a semi-benign bug.

What I mean by that is that it might or might not cause the compiler to crash, but if it does not crash, the the resultant code will be correct. I have resolved the issue and it will be fixed in the next release.

I believe that I have seen reports of this kind of behaviour on this site, by I can't remember who reported it or where.

@Miparo, I believe I have resolved your issue. I will publish a fix shortly.
Merlin.

:magic:

Software is a black art.
go down go up
rh offline
Administrator
Avatar
Gender: male
Location: GERMANY  Germany
Age:
Posts: 5539
Registered: 03 / 2002
Homepage Private message
Subject: Re: Compiler bug?  -  Posted: 26.08.2021 - 18:39   -  
Hi Merlin,

I think you do a great job.
I'm very happy about your progress.

rolf
Cars don't buy cars -- Autos kaufen keine Autos.
Henry Ford
go down go up
Merlin offline
Administrator
Avatar
Gender: male
Location: UNITED KINGDOM 
Age:
Posts: 1035
Registered: 03 / 2005
Private message
Subject: Re: Compiler bug?  -  Posted: 26.08.2021 - 19:41   -  
Thank you Rolf.
Merlin.

:magic:

Software is a black art.
go down go up
miparo offline
Schreiberling
Avatar
Gender: male
Location: GERMANY  Germany
Age: 100
Posts: 760
Registered: 09 / 2007
Private message
Subject: Re: Compiler bug?  -  Posted: 27.08.2021 - 20:37   -  
Hi Merlin,
and the next one :)

Quote


type

tParmRecX = record
xProgVerStart : word;
end;

var
parX : array[0..59] of byte;
ParmRecX[@parX] : tParmRecX;
......
......
ProgVerStart : word;

begin
ProgVerStart:= ParmRecX.xProgVerStart;
^


miparo
You must be logged in or your permissions are to low to see this Attachment(s).
Kein Support per PN! | No support via PM!
go down go up
Merlin offline
Administrator
Avatar
Gender: male
Location: UNITED KINGDOM 
Age:
Posts: 1035
Registered: 03 / 2005
Private message
Subject: Re: Compiler bug?  -  Posted: 28.08.2021 - 13:39   -  
Thanks miparo.

Fix attached.

This type of testing is exactly what I need to help me maintain the software, so thank you again.
Merlin.

:magic:

Software is a black art.
go down go up
miparo offline
Schreiberling
Avatar
Gender: male
Location: GERMANY  Germany
Age: 100
Posts: 760
Registered: 09 / 2007
Private message
Subject: Re: Compiler bug?  -  Posted: 28.08.2021 - 22:54   -  
Hi Merlin,
thanks great job :)

But strings are not accepted.
And all other types please test :) :)

Quote

type

tParmRecX = record
eProjectName : String[12];
end;

var
parX : array[0..59] of byte;
ParmRecX[@parX] : tParmRecX;
......
......
ProgName : String[12];

begin
ProgName := ParmRecX.eProjectName;


miparo
Kein Support per PN! | No support via PM!
This post has been edited 1-times. Last edit: 28.08.2021 - 23:04 by miparo.
go down go up
Harry offline
PowerUser
Avatar
Gender: male
Location: GERMANY  zwischen Augsburg und Ulm
Age: 56
Posts: 1834
Registered: 03 / 2003
Private message
Subject: Re: Compiler bug?  -  Posted: 29.08.2021 - 11:39   -  
Hello Merlin,

you should only make the updates available in one place / thread.
Otherwise it is a little confusing.

Regards
Harry

Great job :)
Elektronik arbeitet mit Rauch - wenn man den Rauch raus läßt, funktioniert es nicht mehr.
Electronics works with smoke - if you let the smoke out, it works no longer.
go down go up
Merlin offline
Administrator
Avatar
Gender: male
Location: UNITED KINGDOM 
Age:
Posts: 1035
Registered: 03 / 2005
Private message
Subject: Re: Compiler bug?  -  Posted: 29.08.2021 - 12:38   -  
Hi Miparo

Fix attached.

Quote
And all other types please test :) :)


This is of course not possible.

The best I can hope to do is batch test all demo programs (although that will of course only pick up compile issues, not run issues) but that is of course very time expensive. I will look into how I can do batch runs.
Merlin.

:magic:

Software is a black art.
go down go up
Merlin offline
Administrator
Avatar
Gender: male
Location: UNITED KINGDOM 
Age:
Posts: 1035
Registered: 03 / 2005
Private message
Subject: Re: Compiler bug?  -  Posted: 29.08.2021 - 12:43   -  
@Harry

I agree, but this is temporary.

I am trying to build an installer that will run on the main site. It is clear though that I need to build a full install first, which is a shame, as there are several hundred files. And of course I will need to test.

So please bear with me for a while :-)
Merlin.

:magic:

Software is a black art.
go down go up
miparo offline
Schreiberling
Avatar
Gender: male
Location: GERMANY  Germany
Age: 100
Posts: 760
Registered: 09 / 2007
Private message
Subject: Re: Compiler bug?  -  Posted: 29.08.2021 - 20:25   -  
Quote by Merlin

Hi Miparo

Fix attached.

Quote
And all other types please test :) :)


This is of course not possible.

The best I can hope to do is batch test all demo programs (although that will of course only pick up compile issues, not run issues) but that is of course very time expensive. I will look into how I can do batch runs.


Hi Merlin,
Sorry. I meant the other types in the record.
Int,Float .....


and the next bug :)
Quote

Unit Comptest;

interface


type
tParmRecX = record
xProgVerStart : word;
eProjectName : string[12];
end;
{--------------------------------------------------------------}
{ Var Declarations }
var

{--------------------------------------------------------------}
{ functions }


implementation
// local part

{--------------------------------------------------------------}
{ Type Declarations }
type
TWzSocket = record
inherit tParmRecX;
end;



This happens only in a unit when the two records are separated by interface/implementation


miparo
Kein Support per PN! | No support via PM!
This post has been edited 2-times. Last edit: 29.08.2021 - 20:35 by miparo.
go down go up
Avra hidden
Schreiberling
Avatar
Gender: male
Location: SERBIA  Belgrade, Serbia
Age: 50
Posts: 637
Registered: 07 / 2002
Homepage Private message
Subject: Re: Compiler bug?  -  Posted: 30.08.2021 - 09:29   -  
Quote by Merlin
The best I can hope to do is batch test all demo programs (although that will of course only pick up compile issues, not run issues) but that is of course very time expensive. I will look into how I can do batch runs.

Some time ago I've researched unit testing frameworks which could be used in microcontroller world. TAP looked like a good candidate which could be adapted for using MCU serial output stream as a test result (AvrCo simulator serial output stream?). With some effort even continous integration should not be that far away. This automation could save time needed for testing in the long run.

http://testanything.org
https://sourceforge.net/projects/tap4pascal/
This post has been edited 2-times. Last edit: 30.08.2021 - 09:31 by Avra.
go down go up
 


Registered users in this topic
Currently no registered users in this section

Delete cookies of this forum  •  FAQ / Help  •  Team page  •  Imprint   |  Local time: 18.10.2021 - 22:20