Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with Hi-Tech linker as it puts variables to Bank0

Status
Not open for further replies.

btbass

Advanced Member level 5
Joined
Jul 20, 2001
Messages
1,896
Helped
438
Reputation
880
Reaction score
288
Trophy points
1,363
Location
Oberon
Activity points
12,887
Hi-Tech linker problem?

I have some problems with the Hi-Tech linker. I am using Version 8.02 and Mplab. The chip is a PIC16F877 and the program is split into 4 files. The program has one interrupt routine. The linker puts all variables into bank 0? If I add a line like 'unsigned char test[50];' The build fails because it can't find room. It tries to fit everything in Bank 0? I remove that line and the build suceeds reporting 25% ram used. Any ideas?
 

Re: Hi-Tech linker problem?

You must split your declarations into different banks.

As the 16F877 has 4 ram banks you can use bank1 to bank3 (auto variables goto bank0).

For example:
bank1 unsigned char buffer[50];
bank3 int counter;

The compiler does not split your variables as CCS does, this task is up to you ...

hope this helps
 

Hi-Tech linker problem?

Well that has fixed the problem. I did read the manual but did not find that info.
Just thought the linker would be smart enough to do that for me.
CCS does not have a linker so it the problem does not arise.
Got me out of a pickle there with your speedy solution!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top