Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zwizwa committed Aug 3, 2014
1 parent 82e1e32 commit 98a7ae7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 2 additions & 0 deletions app/Makefile
Expand Up @@ -106,6 +106,8 @@ test: $(DIFF)
%.dasm: %.hex
gpdasm -p 18F1220 $< >$@

# Currently being worked on. Others might be broken due to compiler or library changes.
current: dtc.app synth.app synth-1220-8.app dip40kit.app

# We diff the hex instead of the dasm as gpdasm produces output
# dependent on 32bit or 64bit host.
Expand Down
1 change: 1 addition & 0 deletions app/dip40kit.fm
Expand Up @@ -35,6 +35,7 @@ staapl pic18/vector
load debug.f

macro
: live-module ` staapl/pic18/live ;
: fosc 48000000 ;
: monitor-EP 1 ;
: total-EP 4 ; \ control:0, ACM data:1, ACM control:2, MIDI:3
Expand Down
2 changes: 1 addition & 1 deletion app/dtc.fm
Expand Up @@ -68,7 +68,7 @@ staapl pic18/compose-macro

\ config macros
macro
: dtc-enable 1 ; \ used by compiler to enable staapl/live-pic18-dtc
: live-module ` staapl/pic18/live-dtc ;
: fosc 48000000 ;
: monitor-EP 1 ; \ ttyACM0 staapl monitor (binary)
: console-EP 3 ; \ ttyACM1 serial command interface
Expand Down
2 changes: 1 addition & 1 deletion pic18/serial.rkt
@@ -1,5 +1,5 @@
#lang racket/base
(require "../pic18.rkt")
(require "pic18.rkt")
(provide (all-defined-out))

;; FIXME: experimental s-expression based word/variable defs.
Expand Down
24 changes: 14 additions & 10 deletions staaplc.rkt
Expand Up @@ -124,17 +124,21 @@
base))

(define (requirements-compile kernel-path)
`((file ,(path->string kernel-path))
staapl/live))
(let ((forms
`((file ,(path->string kernel-path))
staapl/live)))
forms))

(define (requirements-live kernel-path)
(append
(requirements-compile kernel-path)
`(;; FIXME: if kernel doesn't include dtc.rkt live-pic18-dtc doesn't
;; seem to pull in code properly.
,(live-module)
readline/rep
)))
(let ((forms
(append
(requirements-compile kernel-path)
`(;; FIXME: if kernel doesn't include dtc.rkt live-pic18-dtc doesn't
;; seem to pull in code properly.
,(live-module)
readline/rep
))))
forms))

(define (library)
(case (live-module)
Expand Down Expand Up @@ -165,8 +169,8 @@
(define (spec-from-source param id)
(unless (param)
(let ((v (eval `(macro-constant ',id))))
(printf "~a = ~a\n" id v)
(when v
(printf "~a = ~a\n" id v)
(param v)))))


Expand Down

0 comments on commit 98a7ae7

Please sign in to comment.