Project settings

Script files can be used to configure project settings. See Using Console Commands & Scripts for a description of the special script files.

The tutorial.cof-pre.scm and tutorial.cof-post.scm script files from the NiceMon distribution are examples of how project settings can be initialized.

Typically the <object file name>-pre.scm will have commands to initialize NiceMon with the required settings.

   ;; configure PC host settings
   (set-parallel-port-address "378") ; LPT1
   (set-pin-state-delay 0) ; no delay required for my PC
   
   ;; configure settings for COP8-EVAL-FSK1
   (set-operating-frequency 10000000) ; 10Mhz
   (set-flash-size "8000") ; 8k bytes of flash
   (set-flash-page-size "80") ; 0x80 bytes per page
   (set-ram-pages 8) ; S register can be 0 to 7

Typically the <object file name>-post.scm will add watches and define functions that will be usefull when debugging this object file.

   ;; add some watches
   (add-watch "COUNT1" "f0" 1)
   (add-watch "COUNT2" "f1" 1)
   (add-watch "COUNT3" "f2" 1)
   (add-watch "timer low" "ea" 1)
   (add-watch "timer high" "eb" 1)
   (add-watch "PORTD" "dc" 1)
   
   ;; display a note to self
   (display "this is a nice place to display a message")
   (newline)
   
   ;; a little function that sets COUNT1 and COUNT2
   ;; to 1 so you can step out of the delay function
   (define (step-out)
     (write-ram "f0" 1)
     (write-ram "f1" 1)
     (refresh))