SOURCE: Richard and Rosemary, EECS 192 Students, Spring 2001 This is a supplement to the Calbot manual. 1. Keil compiler settings for using Flash ------------------------------------------ A. Environment Settings Options->Target ROM 0x0 0x10000 RAM 0x40000 0xFFFF All other options 'default' Options->Output Create Executable Check Debug Information Check Create Hex File HEX Format HEX-86 Browse Information FLASH Fill Byte: 0x00 All other options 'default' Options->Listing Optional: Linker Listing: check all except Cross Reference, Generated Symobols All other options 'default' B. Start166.a66 file The file that Keil supplies by default is INCORRECT. It is NOT configured for your board. So please download the STARTF.a66 file from my homepage. Remove the old file under Source Group 1: Right click on the file and choose Remove Add the new file: Right click on source group 1, choose Add file and select Startf.a66 2. Keil compiler settings for using the debugger. ------------------------------------------ You should set the correct memory model if u want to download from Keil. Although ur code will work MOST OF THE TIME without it, not using the right settings might lead to WEIRD behaviour when using arrays or lists, that is, data structures that work with memory. 1) For the target, go to Options->Target and change the RAM start address from 0x40000 to 0x10001. 2) For the Startf.a66 file, go choose Options. Uncheck the box "Include in Target Build". 3. Flashing the code ------------------------------------------ In Keil, press F7 to compile the code into the HEX file. This binary file will be named the same as your project file (*.uv2) and is saved in the project directory. Open Phytec Flashtools, select Kitcon 167 and connect. Select all the sectors and erase. Go to File Download and find your hex file (*.H86). Download the file. You are done. To run the Flash ROM code, set DIP switch 1 to OFF. Reset board to run. Set DIP switch 1 back to ON to run from RAM.