View Single Post
  #11   Spotlight this post!  
Unread 26-01-2005, 21:46
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Error - section 'UTIL_LIB' can not fit the section. Section 'UTIL_LIB' length=0x0

Quote:
Originally Posted by Fat Alex
does it have something to do with addresses?...
Alex,

Look at the code that Brian posted in this thread: http://www.chiefdelphi.com/forums/sh...ad.php?t=33466

See how the address needed to be split into an 8 bit part and a "high" part?

All memory must be accessible via registers. In most processors, these are 8 bit, 16 pit or 32 bit. To access more memory, you have to "page" (the high part).

It really does not matter if the memory/IO space in inside of the chip or outside, the principle is the same. To get the most out of your hardware, you have to understand your hardware.

The PICmicro® 18C MCU Family Reference Manual is 976 pages long. The MPLAB® C18 C COMPILER USER’S GUIDE is almost 200 pages long. You have to start reading!

The answer depends on the type of memory you are trying to access. For example, try reading section 3.2.4 on page 41 of the latter reference. This pertains only to stack size (dynamic and non-static variables) and explains how to cross the 256 byte barrier for stack allocation...

<arms flailing> DANGER WILL ROBINSON!!! Increasing stack allocation will decrease other allocations and cause your code to really slow down as every reference to (in this case stack) memory must be inspected at run time as to which "page" it is in.

Now the same condescending note I gave in another thread... If you are exceeding memory allocations, you are doing something wrong! I most strongly urge you to look closely at what you are doing.

The 2004 Bobcat user routines spans about 1000 lines of code and required about 500 man-hours to develop. That's 1/2 hour per line. Why? Because you have to understand what each and every line does!

Embedded programming requires thought, planning and hard work. That's why it's called software engineering.

Hope this helps...
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...