Index Out Of Bounds When Creating HEX file

General discussion on mikroPascal for dsPIC30/33 and PIC24.
Post Reply
Author
Message
azengineer
Posts: 11
Joined: 25 Aug 2006 18:16
Location: Tucson, AZ USA
Contact:

Index Out Of Bounds When Creating HEX file

#1 Post by azengineer » 14 Oct 2009 03:29

javascript:emoticon(':roll:')

Yes, I'm a newbie... Not to Pascal, just to DsPICs and the new compiler.

Since Sunday (when I bought the compiler) all I get after every compile is
"Index Out Of Bounds" when generating the Hex file. Which means I am dead in the water.

I'm certain I have not set something up correctly. Anybody have any ideas?
No, I am an ASM programmer that has a deadline, and I had to switch out of C30 to Pascal because C data typing drives me mad.
PIC Product Development
from Tucson, Arizona,
USA; coding PICs since
1995 in MPASM & Pascal...

azengineer
Posts: 11
Joined: 25 Aug 2006 18:16
Location: Tucson, AZ USA
Contact:

Re" Index Out Of Bounds

#2 Post by azengineer » 14 Oct 2009 15:11

It turns out to be caused by a library procedure:

i2c1_init(100000);

I have no idea why. I guess I'll just have to roll my own initialization routine.

AZ Engineer
PIC Product Development
from Tucson, Arizona,
USA; coding PICs since
1995 in MPASM & Pascal...

User avatar
nikola.kostic
mikroElektronika team
Posts: 433
Joined: 11 Aug 2009 12:12

#3 Post by nikola.kostic » 15 Oct 2009 13:13

Can you provide some short code demonstrating your problem?

azengineer
Posts: 11
Joined: 25 Aug 2006 18:16
Location: Tucson, AZ USA
Contact:

Re: Index Out Of Bounds

#4 Post by azengineer » 15 Oct 2009 20:21

All you have to do is type

i2c1_init(100000);
or
i2c2_init(100000); //spelled wrong?

in the main procedure. It will cause the error.


But I wrote my own initializer, and it seems to be working, so I don't have any problems any more.

Thanks for replying.
PIC Product Development
from Tucson, Arizona,
USA; coding PICs since
1995 in MPASM & Pascal...

User avatar
nikola.kostic
mikroElektronika team
Posts: 433
Joined: 11 Aug 2009 12:12

#5 Post by nikola.kostic » 16 Oct 2009 08:28

There is actually a known compiler bug in mikroPascal for dsPIC30/33 and PIC24. The bug is manifested when trying to use I2C1_Init or I2C_Init by error " Identifier 'SSP1ADD' was not declared" and you have probably declared SSP1ADD in your program which caused "Index Out Of Bounds" error.

We are aware of this problem and apologize for inconveniences. We are currently working on the new (PRO version) of all of our dsPIC30/33 and PIC24 compilers and as you got license for the older version of mikroPascal, you'll be able to get new mikroPascal PRO license free when we release it.

azengineer
Posts: 11
Joined: 25 Aug 2006 18:16
Location: Tucson, AZ USA
Contact:

Index Out Of Bounds, etc

#6 Post by azengineer » 16 Oct 2009 14:37

Thanks for the reply. Yes, I declared it in the main program, and that was the error.

Do you have a place I csan go to to look for other minor errors when thay pop up?

--AZ Engineer
PIC Product Development
from Tucson, Arizona,
USA; coding PICs since
1995 in MPASM & Pascal...

User avatar
nikola.kostic
mikroElektronika team
Posts: 433
Joined: 11 Aug 2009 12:12

#7 Post by nikola.kostic » 19 Oct 2009 08:44

You can contact us when you come to some problem that looks like a bug and we will check it:
http://www.mikroe.com/en/support/

Post Reply

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