CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Howto place large function over two banks???

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Honken



Joined: 03 Mar 2004
Posts: 15

View user's profile Send private message

Howto place large function over two banks???
PostPosted: Wed Mar 03, 2004 3:25 am     Reply with quote

Hi,

I have searched the forum about this problem but didn't find any answere.

My problem is that I have a function that need 0x0D5A of ROM.
So it must use two segments of ROM for this but it will not do that even if I put #seperate before the function.

Does anyone have some Id�?? Question

Calibrate
Seg 0004-07FF, 06C5 left, need 0D5A
Seg 0800-0FFF, 0800 left, need 0D5A
Seg 1000-17FF, 0800 left, need 0D5A
Seg 1800-1FFF, 0800 left, need 0D5A
Seg 0000-0003, 0000 left, need 0D5A

main

Error[71] C:\Xcalibur\xcalibur.c 213 : Out of ROM, A segment or the program is too large
Ttelmah
Guest







Re: Howto place large function over two banks???
PostPosted: Wed Mar 03, 2004 5:56 am     Reply with quote

Honken wrote:
Hi,

I have searched the forum about this problem but didn't find any answere.

My problem is that I have a function that need 0x0D5A of ROM.
So it must use two segments of ROM for this but it will not do that even if I put #seperate before the function.

Does anyone have some Id�?? Question

Calibrate
Seg 0004-07FF, 06C5 left, need 0D5A
Seg 0800-0FFF, 0800 left, need 0D5A
Seg 1000-17FF, 0800 left, need 0D5A
Seg 1800-1FFF, 0800 left, need 0D5A
Seg 0000-0003, 0000 left, need 0D5A

main

Error[71] C:\Xcalibur\xcalibur.c 213 : Out of ROM, A segment or the program is too large

Look at what code is use inside the function. If (for instance), you are calling a subroutine, and this is not used anywhere else, this will be made 'inline', and result in the function itself growing. It is these subroutines, that will need to be 'seperated', to reduce the total function size so that the largest 'part', can fit in the available space.
You need to reduce the function to a number of parts. If there are no subroutines that can be 'sperated', then you are going to have to split the function into such routines.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group