Hello Alan #pragma rambank locates VARIABLES ONLY in the required rambank. To assign functions to a given page use #pragma codepage (see page 43 of manual). I prefer to use the following syntax for placing functions and variables: variables -- bank0 uns8 var_name; functions -- page0 void function_name (void); I can see straight away where they are located, and to build a header file to include in other modules I just copy and paste the prototypes putting 'extern' in front of them all. Hope this helps. Steve Alan Gorham wrote: > Hello again CC5x users. > How do I correctly use the #pragma rambank statement to locate my functions and variables? > > My code has the following structure: > > #includes > > macro defs > > ISR > > function prototypes > function prototypes > more function prototypes > > main > { > call functions > } > > As I added yet another function prototype I obviously filled up the RAM in bank 0. > I get this message from the compiler: > > Missing 4 byte(s) for local variables, rambank 1 > (It is recommended to let all local variables reside in one block > if possible. Note that #pragma rambank will locate local and > global variables) > > I've tried to put the #pragma rambank 1 statement just before the last function prototype that caused the compiler to squawk, > but without any joy. I suspect it is a bit more fiendish than my simple approach. > > What am I doing wrong? > > Thanks > > Alan > Embedded Systems Engineer > Microtima Ltd > Ouseburn Mews > 3-7 Stepney Bank > Newcastle upon Tyne > NE1 2PW > > Tel: 0191 2304411 > Fax: 0191 2304422 > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.