| |||||
Technical Support Support Resources
Product Information | C166: LOCATING PROGRAM SECTIONS TO SPECIAL MEMORY AREASInformation in this article applies to:
QUESTIONI want to locate several sections from different modules to a special ROM area. What is the best way to do that? ANSWERThe Keil C166 toolchain offers several ways to locate sections. One way is to add the sections you want to locate at specific addresses in µVision under Options for Target - L166 Locate - User Sections. When you enter: ?PR?FLASH%FCODE(0x6000),?HC?FLASH%HCONST the linker locates ?PR?FLASH%FCODE at address 0x6000 and ?HC?FLASH%HCONST follows at subsequent addresses. Another way is to use the RENAMECLASS directive at the C166 Compiler level. To do that, you must include the following pragmas into the C source files that require special placement: #pragma RENAMECLASS (FCODE=FCODE1) #pragma RENAMECLASS (HCONST=HCONST1) Then the C166 compiler will use the class names FCODE1 and HCONST1 for the code and constants stored in this module. And, you can enter these class names under Options for Target - L166 Locate - User Classes: FCODE1 (0x6000-0x7FFF), HCONST1 (0x6000-0x7FFF). This locates the classes FCODE1 and HCONST1 into the address range 0x6000-0x7FFF. MORE INFORMATION
SEE ALSO
FORUM THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Monday, May 05, 2008 | ||||
| |||||