echo off rem This file compiles APP2, the second example in the MPLINK Tutorial rem This file assumes that MCC17 and MPASM, and MPLINK can be found rem in your PATH statement, rem Also MCC_INCLUDE environment variable should be set to point to MCC\H rem You can set these in your AUTOEXEC.BAT file and check them by going to rem the MSDOS prompt and typing SET. rem MPLINK sets the library path to C:\MCC\LIB. If MPLAB-C17 is rem installed somewhere else, change the path in the MPLINK line below. rem This application consists of two separate object files, one that will be rem programmed into a 17C44, and another that will be downloadable firmware rem that can be loaded into external program memory. rem Compile the boot loader: echo on MCC17 boot.c /p=17c44 pause mplink boot.o loader.lkr /L c:\mcc\lib -m app2boot.map /o app2.hex pause rem Compile the firmware: MCC17 firmware.c /p=17c44 MCC17 fwtables.c /p=17c44 mpasm /q /o fwentry.asm mplink firmware.o fwtables.o fwentry.o firmware.lkr /L c:\mcc\lib /m app2.map /o firmware.hex echo off rem Notes for building this application in an MPLAB project rem two projects need to be created and built. rem Set up the first project to build the boot loader: rem 1, Name new project APP2BOOT rem APP2BOOT.HEX - Becomes the top node of project rem 2. Set MPLINK as the language tool for APP1.HEX rem 3. Add these nodes to the project and set the language tools. rem boot.c - set MPLAB-C17 as the langage tool rem eeprom.lkr rem C0S17.O - this is in mcc\lib rem 4. Edit the APP2BOOT MPLAB Project rem Library path = c:\mcc\lib rem 5. Build project, then save and close. rem rem Set up a second project to compile the firmware: rem 6, Name new project APP2 rem APP2.HEX - Becomes the top node of project rem 7. Set MPLINK as the language tool for APP1.HEX rem 8. Add these nodes to the project and set the language tools. rem fwentry.asm - set MPASMWIN as the language tool rem firmware.c - set MPLAB-C17 as the langage tool rem fwtables.c - set MPLAB-C17 as the langage tool rem firmware.lkr rem 9. Edit the APP1 MPLAB Project: rem Libraray path = c:\mcc\lib (or where your mcc\lib is located) rem 10. Build project, save and close.