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
array problem 18F45K20
Moderator: Benj
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact:
- 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
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
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
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact:
Re: array problem 18F45K20
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
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
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact:
Re: array problem 18F45K20
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
""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
- 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
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
This does not look like a bug, it is a limitation of the HW.
Cheers,
Jonny