Pumpkin, Inc.

Pumpkin User Forums

RAM problem

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

RAM problem

Postby marco » Wed Aug 09, 2006 1:19 am

Using Salvo PRO for pic C18
I have a lot of task and events and
linker report:
Error - section '.udata_mem.o' can not fit the section. Section '.udata_mem.o' length=0x00000101
There is a configuration option (or a workaround) to force objects to be allocated in more than a single bank ?
Thank you

Marco

marco
 
Posts: 9
Joined: Mon Mar 27, 2006 12:00 am
Location: Italia

Re: RAM problem

Postby marco » Thu Aug 10, 2006 2:30 am

Probably I found a solution:
in my linker script enlarge a DATABANK,
Is it safe ?

Marco

marco
 
Posts: 9
Joined: Mon Mar 27, 2006 12:00 am
Location: Italia

Re: RAM problem

Postby aek » Fri Aug 11, 2006 4:38 am

Hi Marco.

With Salvo and MPLAB-C18, the location of Salvo objects is controlled by the near/far attribute in Salvo (Pro build, or library) and the size of the various data objects.

There are some discussions in this Forum about how to get the Salvo objects into the appropriate memory spaces when certain Salvo objects (e.g. the tcbArea[] array) get large ...

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: RAM problem

Postby kamyip » Thu Aug 24, 2006 4:55 am

Hi Andrew,

I'm facing the same problem. The C18 compiler is complaining :-

Error - section 'OSVarsTcbArea' can not fit the section. Section 'OSVarsTcbArea' length=0x00000108
Errors : 1

I have all in 33 tasks.

Previously I added in :
/* for big memory model add this */
#pragma udata OSVarsTcbArea
OSgltypeTcb OStcbArea[OSTASKS];
/* */
#pragma udata OSVars

it works until I add in task #33.

Anyway I can put Salvo a bit further?

kamyip
 
Posts: 46
Joined: Mon Apr 15, 2002 11:00 pm

Re: RAM problem

Postby aek » Thu Aug 24, 2006 8:21 am

It's been a while since I visited this issue (and I should have documented it better).

basically, what the compiler is saying is that it can't handle an array that is larger than 256 byts in size, at least in the sense that the memory map for the chosen part does not have a section defined that is bigger than 256 bytes.

If you follow the discussions on Microchip's forums as to how to deal with large (i.e. > 256 bytes) arrays, then you can solve this problem with Salvo simply by editing the link file to create a section larger than 256 bytes, AND by placing Salvo's OStcbArea[] array in it -- the latter will likely require a mnor edit to your mem.c file. The best way to do that is to copy the mem.c file to your local project directory, use that local copy in your builds, and edit it to suit.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: RAM problem

Postby kamyip » Thu Aug 24, 2006 8:34 am

OK, I've got it. For those who is interested the answer is in this link:
http://forum.microchip.com/tm.aspx?m=39357
kamyip
 
Posts: 46
Joined: Mon Apr 15, 2002 11:00 pm


Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 2 guests

cron