|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Make PIC C use all available memory banksI have some C code that nearly uses all of the first memory bank. When I compile it, I get the following: Data space: BANK0 used 5Ch ( 92) of 60h bytes ( 95.8%) BANK1 used 0h ( 0) of 50h bytes ( 0.0%) BANK2 used 0h ( 0) of 60h bytes ( 0.0%) BANK3 used 0h ( 0) of 60h bytes ( 0.0%) COMBANK used 0h ( 0) of 10h bytes ( 0.0%) If I add a few more global variables, I get the following compiler error: Error [491] ; . can't find 0x5B words for psect "rbss_0" in segment "BANK0" Error [491] ; . can't find 0x3 words for psect "rdata_0" in segment "BANK0" Error [593] ; . can't find 0x2 words (0x2 withtotal) for psect "code_ptr" in segment "BANK0" Does anyone know how I tell PIC C to use all available memory banks? My microcontroller is 16F887. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Make PIC C use all available memory banksOn Sun, 13 Jul 2008, Tomás Ó hÉilidhe wrote:
> Does anyone know how I tell PIC C to use all available memory banks? My > microcontroller is 16F887. The manual and the FAQ discuss this. http://www.htsoft.com/support/faqs.php#faq42 -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Make PIC C use all available memory banksTomás Ó hÉilidhe wrote:
> Error [491] ; . can't find 0x5B words for psect "rbss_0" in segment > "BANK0" > Error [491] ; . can't find 0x3 words for psect "rdata_0" in segment > "BANK0" > Error [593] ; . can't find 0x2 words (0x2 withtotal) for psect > "code_ptr" in segment "BANK0" > > Does anyone know how I tell PIC C to use all available memory banks? > My microcontroller is 16F887. Split up your variables into multiple sections so the linker can place them independently. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
RE: Make PIC C use all available memory banks> -----Original Message----- > From: piclist-bounces@... [mailto:piclist-bounces@...] On Behalf > Of Tomás Ó hÉilidhe > Sent: 13 July 2008 02:25 > To: Microcontroller discussion list - Public. > Subject: [PIC] Make PIC C use all available memory banks > > > I have some C code that nearly uses all of the first memory bank. When I > compile it, I get the following: > > Data space: > BANK0 used 5Ch ( 92) of 60h bytes ( 95.8%) > BANK1 used 0h ( 0) of 50h bytes ( 0.0%) > BANK2 used 0h ( 0) of 60h bytes ( 0.0%) > BANK3 used 0h ( 0) of 60h bytes ( 0.0%) > COMBANK used 0h ( 0) of 10h bytes ( 0.0%) > > If I add a few more global variables, I get the following compiler error: > > Error [491] ; . can't find 0x5B words for psect "rbss_0" in segment > "BANK0" > Error [491] ; . can't find 0x3 words for psect "rdata_0" in segment > "BANK0" > Error [593] ; . can't find 0x2 words (0x2 withtotal) for psect > "code_ptr" in segment "BANK0" > > Does anyone know how I tell PIC C to use all available memory banks? My > microcontroller is 16F887. Which version of the compiler are you using, i.e. full commercial version or the free 'lite' version? The later is limited to the first two banks. Irrespective, the bank# modifier used to locate objects within a specific bank is clearly described in the compiler manual. Being such an advocate of correctly written C I'm somewhat surprised you haven't read the manual to check for compiler/target specific features and deviations from ANSI compliance. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
| Free Forum Powered by Nabble | Forum Help |