Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Discussion Groups

Discussion Groups | Piclist | simple HiTech C programming question...

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

simple HiTech C programming question... - Stewart Teaze - Jun 12 22:49:00 2001


The following code excerpt shows the declaration of an 80 byte array
which causes a compiler error:

Can't find 0x58 words for psect rbss_0 in segment BANK0 (error)

Any array larger than 72 causes the error(it compiles fine with small
arrays). This is a pretty simple thing that I'm trying to do - what
the heck is up? Do I need to be doing something to handle the PIC
memory banks? I thought that was all handled by the compiler. #include <pic.h>
#include <conio.h>
#include <stdio.h>

void writebuf(char*);
void outc(char);

char outputBuffer[80];

main()
{
unsigned int i;
unsigned char state;

outputBuffer[0] = 'a';
outputBuffer[1] = 'b';
outputBuffer[2] = '\0';

********************************

Building PUBLINK.HEX...

Compiling PUBLINK.C:
Command line: "C:\HT-PIC\BIN\PICC.EXE -W0 -G -O -Zg -D24 -E -ASMLIST -
FAKELOCAL -16F876 -C C:\PUBLINK\PICPROJ\PUBLINK.C"
Enter PICC -HELP for help

Linking:
Command line: "C:\HT-PIC\BIN\PICC.EXE -INTEL -ICD -16F876 -
oPUBLINK.HEX -fakelocal PUBLINK.OBJ "
Enter PICC -HELP for help
::Can't find 0x58 words for psect rbss_0 in segment BANK0 (error)
Exit status = 1

MPLAB is unable to find output file "PUBLINK.HEX".

Build failed.





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: simple HiTech C programming question... - Geoff Sullivan - Jun 14 3:01:00 2001

--- In piclist@e..., "Stewart Teaze" <stewart.teaze@g...> wrote:
> The following code excerpt shows the declaration of an 80 byte
array
> which causes a compiler error:
>
> Can't find 0x58 words for psect rbss_0 in segment BANK0 (error)
>
> Any array larger than 72 causes the error(it compiles fine with
small
> arrays). This is a pretty simple thing that I'm trying to do -
what
> the heck is up? Do I need to be doing something to handle the PIC
> memory banks? I thought that was all handled by the compiler. Unless you state otherwise, Hi-Tech C uses Bank 0
The processor has 128 bytes in Bank 0 and quite a few are reserved
for SFR use, so about 90 bytes or so are available.
I think you will have to move something into other banks using the
Bank qualifier.

cheers,




(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )