How do I use linker response files with the µVision IDE?
ANSWERThe linker command (or response) file contains only linker directives. The .OBJ files and .LIB files that are to be linked are not listed in the command file. These are obtained by µVision automatically from your project file.
The best way to start using a linker command file is to have µVision create one for you automatically and then begin making the necessary changes.
To generate a Command File from µVision...
- Go to the Project menu and select the Options for Target item.
- Click on the L166 Misc or L51 Misc tab to open the miscellaneous linker options.
- Check the use linker control file checkbox.
- Click on the Create... button. This creates a linker control file.
- Click on the Edit... button. This opens the linker control file for editing.
- Edit the command file to include the directives you need.
When you create a linker command file, the file created includes the directives you currently have selected. For example, the following command file lists the directives necessary for the MEASURE example:
TO "Measure"CLASSES (ICODE (0x0-0x7FFF), NCODE (0x0-0x7FFF),FCONST (0x0-0x7FFF), HCONST (0x0-0x7FFF),XCONST (0x0-0x7FFF), NCONST (0x4000-0x7FFF),NDATA (0x8000-0xBFFF), NDATA0 (0x8000-0xBFFF),SDATA (0xC000-0xEFFF, 0xF600-0xFDFF), SDATA0 (0xC000-0xEFFF, 0xF600-0xFDFF),IDATA (0xF600-0xFDFF), IDATA0 (0xF600-0xFDFF),FDATA (0x8000-0xEFFF), FDATA0 (0x8000-0xEFFF),HDATA (0x8000-0xEFFF), HDATA0 (0x8000-0xEFFF),XDATA (0x8000-0xEFFF), XDATA0 (0x8000-0xEFFF))CINITTAB (0x0-0x7FFF)Note that the files included in the link are not listed. These are obtained from the list of files included in the project.
举例:
MStar的MST720的cartv.lin如下:
BankArea(0x4000,0xFFFF)
PRINT("..\..\1out\CarTV_128.m51") RAMSIZE(256)
CODE(?PR?*?ISR(0x002E),?PR?*?DSP_MARIA,?PR?VD_AGC_MONITORSTATUS?M2_VD_AGC_LIB)
BANK0(?CO?DevVD(0x4000),?CO?Mode,?CO?mStar)
BANK1(?CO?msOSD(0x4000),?CO?Menu,?CO?MenuStr)
XDATA(0X0400-0X07FF)