array problem 18F45K20

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

array problem 18F45K20

Post by saschech@gmx.de »

Hello

If the array greater as programm_01[120] I have a compiler error.
I show I have enough ram where is the problem? I must use programm_01[250]

the problem is also with boostc v7.10
(no problem with microc......)
Regards wolfgang
Attachments
array problem.gif
(97.26 KiB) Downloaded 593 times

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: array problem 18F45K20

Post by JonnyW »

Hi Wolfgang. I don't see the error from your screenshot?

Either way, the array is of 16-bit integers, which gives an array of 240 bytes. It should be that the PIC chips support up to 256 bytes per-array, but it may be that on these chips some overhead is required or just that there is a subtle bug in the BoostC compiler.

If you can post your program and the compiler output showing an error that would be good, but I think this is something we can't do much about if it is a BoostC issue. It may be related to the post below.
http://www.matrixmultimedia.com/mmforum ... 46&t=11402

Cheers,

Jonny

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: array problem 18F45K20

Post by saschech@gmx.de »

Hi Jonny

programm_01[120] give warning compile ok.

programm_01[140] give the same warning with compile error.

Hope you can help

Regards Wolfgang
Attachments
Programm_01.fcf
(41.22 KiB) Downloaded 235 times
warning with compile ok.gif
(84.29 KiB) Downloaded 578 times
array with 140 thame warning compile error.gif
(99.54 KiB) Downloaded 578 times

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: array problem 18F45K20

Post by saschech@gmx.de »

Hello Benj

""but I think this is something we can't do much about if it is a BoostC issue. It may be related to the post below""

To day I test with boost-c IDE and found in the help file:

Arrays
Arrays can have any number of dimensions. The only constraint is that an array
must fit into a single RAM bank.

Think so it is not a issue..........

Regards Wolfgang

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: array problem 18F45K20

Post by JonnyW »

Hi. Yes - trying to allocate 140 16-bit elements gives a 280 byte array, which is not possible on 8-bit PICs.

This does not look like a bug, it is a limitation of the HW.

Cheers,

Jonny

Post Reply