Bad allignment

General discussion on mikroPascal PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
karl567
Posts: 64
Joined: 19 Apr 2012 17:25
Location: Konstanz

Bad allignment

#1 Post by karl567 » 07 May 2018 13:32

Hi,

Code: Select all

var
  buffer1: array [20] of byte;
  buffer2: array [10] of word at buffer1;

  buffer2[0]:=0;   // Bad Allignment error


with code above I get a bad allignment error.
When I change order of declarations, compiling is successfully.
Is this a compiler problem?

Code: Select all

var
  buffer2: array [10] of word;
  buffer1: array [20] of byte at buffer2;

  buffer2[0]:=0;   // OK


Regards,
Karl

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Bad allignment

#2 Post by filip » 08 May 2018 14:00

Hi,

Which MCU and compiler version are you using ?

Regards,
Filip.

karl567
Posts: 64
Joined: 19 Apr 2012 17:25
Location: Konstanz

Re: Bad allignment

#3 Post by karl567 » 09 May 2018 05:24

Hi Filip,

MicroPascal PRO for dsPIC v7.0.1
MCU: P33P512MU810
140MHz

Best regards,
Karl

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Bad allignment

#4 Post by filip » 11 May 2018 14:55

Hi,

I was not able to reproduce this issue, can you please attach the project, maybe I am missing something ?

Regards,
Filip.

karl567
Posts: 64
Joined: 19 Apr 2012 17:25
Location: Konstanz

Re: Bad allignment

#5 Post by karl567 » 26 May 2018 06:38

the problem seems to be solved with compiler V7.10.

Regards,
Karl

Post Reply

Return to “mikroPascal PRO for dsPIC30/33 and PIC24 General”