#lang scheme/base

;; This is an example of a batch-mode script. To use, install PLT scheme and type:
;; mzscheme -p zwizwa/staapl/examples/build-synth

;; Create a project with an instantiated PIC18 Forth dialect.
 (planet zwizwa/staapl/prj/pic18)      ;; PIC18 compiler in a namespace

;; Load the interactive monitor target code + synth app.
(define-runtime-path mon   "../pic18/monitor-p18f1220.f")
(define-runtime-path synth "../pic18/synth.f")

(forth-load/compile mon)
(forth-load/compile synth)

;; Install the interrupt vectors.
(forth-compile "install")

;; Write object data + meta data to disk.
(save-ihex "synth.hex")
(save-dict "synth.dict")