[work in progress. this should be simplified a lot. for now i have to assume you know the chip/assembler.] * Getting Started # apt-get install mzscheme emacs untar the package in ~ # cd ~/brood # make bootstrap now edit ~/brood/src/monitor.state, most importantly the serial port device if it's not /dev/ttyUSB0 # ~/brood/src/stty -F /dev/ttyUSB0 then run emacs. run the command # M-x run-cat if this command is not defined, you need to load the file ~/brood/emacs/cat.el using the command # M-x load-file in *cat* buffer, you need to compile the monitor code using the command 'scratch'. this will create a file 'monitor.hex' which you need to flash in the pic18f1220 chip. (i.e. using piklab-prog) once that's done, you should be able to 'ping' the device. it will give you back a string indication what kind of monitor is running, probably "purr/18". * Interaction depending on the configuration, there are several interaction modes. the most important ones are "live" and "compile". what we do is to switch to "compile" mode using C-d, then type something like: >> : inc 1 + ; this will create a word that will add 1 to a number on the stack. to see the resulting assembler code type "pa". when done entering code, switch to "live" mode using C-d (you might need to press multiple times). then type "commit". this will convert the assembly code to binary and upload it to the target. to test the code, compare the results of "1 p" and "1 inc p". the first one loads "1" on the stack, and "p" prints the top element. the second one loads "1", then executes the code we just compiled which increments the number to "2", and "p" will just execute this number. the rest is just variants of this simple scheme. instead of typing code on the console, you can load it with "load ", then do commit just as if you typed it by hand. you can still do "pa" after loading a file to inspect the assembler code. * commands clear clear assembler buffer pa print assembler buffer * TO FIX ** find a way to format tutorial code to something fancy, maybe trac like? ** figure out a way to install it as root + state/cache dir for user ** add support for multiple projects ** perform serial port config from within program