KVA_to_PA function

Beta Testing discussion on mikroPascal PRO for PIC32.
Post Reply
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

KVA_to_PA function

#1 Post by Dany » 02 Apr 2015 17:02

Hi, I noticed a problem with the KVA_to_PA function (mP v3.5.0; P32MX534F064H):

This call gives a compiler error "constant expected),

Code: Select all

DWrd := KVA_to_PA(@BDT);
while this one is accepted ($A0000000 being the address of "BDT").

Code: Select all

Dwrd := KVA_to_PA($A0000000);
The variable definitions are:

Code: Select all

Type TBD = record
             ByteCount: word;
             Stat: byte;
             Res1: byte;
             Addr: DWord;
           end;

const NrOfEndPoints = 4;

var BDT: array[NrOfEndPoints] of TBD; absolute $A0000000; volatile;

var DWrd: DWord; volatile;
In my opinion the expression "@BDT" is also a "constant" and the statement should not be flagged as erroneous.

Thanks in advance!
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: KVA_to_PA function

#2 Post by marina.petrovic » 03 Apr 2015 16:29

Hi,

I will certainly consult my colleagues from Software Department regarding this error message.
Thank you for pointing on this behavior/error message.

Best regards,
Marina

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: KVA_to_PA function

#3 Post by Dany » 19 Apr 2015 18:31

Hi, it would be nice also to fave functions (KVA_TO_PA and PA_TO_KVA1) that have a non constant value as parameter, but a variable value.

Thanks in advance!
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: KVA_to_PA function

#4 Post by marina.petrovic » 20 Apr 2015 10:17

Hi,

I pass this suggestions and also behavior which you previously mentioned to our software developers
and they will certainly try to implement them as soon as possible.

Best regards,
Marina

Post Reply

Return to “mikroPascal PRO for PIC32 Beta Testing”