C251 User's Guide

Tips for Program Execution

There are a couple of common user problems which arise due to the complexity of the 251 hardware. Check the following if your program hangs or behaves strangely.

  • If your program runs on the dScope Simulator but not on the 251 hardware you may have problems with the initialization of the CONFIG registers in the START251 file. Check carefully that all parameters of the START251 file match your target hardware. In most cases, the hardware is not correctly configured. Run a simple program on your target hardware before you try a complex application. It is a good choice to start with is the HELLO program example provided in \C251\EXAMPLES\HELLO.
  • Another common problem is incorrectly setting the memory classes in L251 for your RAM and EPROM. Check the areas listed under MEMORY MAP in the linker/locator MAP file (*.MAP) and verify that they match the memory allocation of your target hardware. Segments with the memory class name xCONST or xCODE must be located in a EPROM device and segments of the class xDATA must be located in a RAM area.