beta 1002D and array sizes

Please note that this toolsuite is not part of the official Firewing release but we will try and help where we can...

beta 1002D and array sizes

Postby Jerry Messina » Sun Aug 25, 2013 1:33 pm

Interestingly, it also looks like to can't declare an array in XC16 > 32K even when using eds - let me know if you get this also. Anyway, I've put together a new Firewing BETA build ...

I decided to read over all those sections I skipped in the XC16 users guide and noticed that restriction, too. I'll have to take a look, but I thought the instruction encoding allowed for 64K of data space... perhaps not.

In any case, the newest beta is allowing me to compile pretty much up to the full limits of ram, but when I build in MPLAB it seems that the debugging info in MPSIM isn't happy with any arrays >= 8192 in length. The debug symbol disappears (it isn't available in the Watch window anymore). It's not the total ram that's an issue... I can have multiple arrays of 8190 and all seems well.

I can't try this with the FW toolsuite since it maxes out at 8192-64.
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am

Re: beta 1002D and array sizes

Postby David John Barker » Sun Aug 25, 2013 2:13 pm

> but when I build in MPLAB it seems that the debugging info in MPSIM isn't happy
> with any arrays >= 8192 in length

I'm using MPLAB 8.91 and I'm not seeing that here, unless I have misunderstood what you are saying. I can see arrays of 32K in the watch window.

> I can't try this with the FW toolsuite since it maxes out at 8192-64.

Sorry, not sure what you mean - what are you trying to do with the FW toolsuite?
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: beta 1002D and array sizes

Postby David John Barker » Sun Aug 25, 2013 3:12 pm

> but when I build in MPLAB it seems that the debugging info in MPSIM isn't happy

Just to be clear, are you referring to the underlying map[] data value or the actual Firewing array, as seen in the watch window?
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: beta 1002D and array sizes

Postby Jerry Messina » Sun Aug 25, 2013 3:55 pm

The actual Firewing array. I was using the XC16 toolsuite and
Code: Select all
dim b(8192) as byte
dim b2(8192) as byte

When I went to open a Watch window, neither 'b' or 'b2' was available in the dropdown list.
As soon as I changed either (or both) of the array sizes to 8190, then I could see it on the watch list

I'm using MPLAB 8.92
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am

Re: beta 1002D and array sizes

Postby David John Barker » Sun Aug 25, 2013 5:09 pm

> The actual Firewing array.

OK, you are using COFF. There was an error in which the COFF file was storing arrays greater than 8KB. This has now been fixed. Download a new BETA from the bottom of this page:

http://www.firewing.info/pmwiki.php?n=Firewing.Download

However, MPLAB seems to struggle in the watch window. There is a maximum of 16,383 watch lines allowed, but is doesn't always tell you that. Each array element (expanded or not) counts as a line. Normally this is not a problem, certainly not a problem when using simple types such as integers and the like (it's pretty difficult to exceed 16K items!). It's more of a problem if you are trying to display one or more large arrays, which can give you a watch line count > 16,383. If this happens, you may see "out of scope" messages and upper array values will not be correctly displayed. For example, you can set an array value but the watch window will not update. However, if you watch an actual element address, you will see that the array element has been correctly updated - it's just MPLAB will not display it. Right clicking the watch window and selecting refresh usually tells you when the line count has been exceeded.

To summarise, anomalous "out of scope" messages and incorrect array output in the watch window usually means the watch window line count has been exceeded. This is an MPLAB issue (as far as I can tell) and not caused by an error in the Firewing COFF file.
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: beta 1002D and array sizes

Postby Jerry Messina » Sun Aug 25, 2013 7:59 pm

Thanks for the info (and the update). I saw MPLAB flash a message about the number of Watch elements, but didn't realize that's what it was trying to tell me.
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am


Return to Microchip 16

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x