ColdFire Server Helper Scripts

These are a collection of ideas and scripts to make working the ColdFire server and boards easier. You are going to need Expect, NcFTP or regular UNIX FTP and some other UNIX odds and ends that are all on the SunEE machines.

cfrm file
Will delete file from the CF Server using (Nc)FTP.

cfcp local remote
Will copy local file to the remote file specified using (Nc)FTP.

cfrun file
Will log into the CF Server and download file to the board and then allow you to interact with it. The SunEEs have Expect in a peculiar place, so run expect -f cfrun file instead. It will open the second serial port's traffic in a xterm. So you need X11 forwarding and all that jazz.

Makefile

For testing on the CF Server, these rules are useful:

install: myrtos.srec
	@echo Uploading...
	@cfcp myrtos.srec myrtos-$(USER)
									
run: install
	@expect -f cfrun myrtos-$(USER)
										
.PHONY: install run

If your Makefile already has rules to build myrtos.srec, then these rules allow you to make install which will copy your S-Record to the CF-Server and make run will upload and then execute it. This requires that the scripts are accessible. $(USER) is everywhere so your other group members can be working concurrently without squashing each other.

At the end of your clean target, you might want:

@cfrm myrtos-$(USER)

to erase the file from the server. You might want this in a separate target so you can call it directly if you are afraid people are going to copy your S-Record file, disassemble it and steal your work. :-P

For testing on the board, make the following rule:

%.txt: %.srec
	@echo Praetzelating $@...
	@printf "dl -p terminal\r\n" > $@
	@cat $< >> $@

This will produce a .txt files that includes the download command. So, in HyperTerminal, at the janusROM> prompt, just do Transfer | Send Text File... and select this file. No more accidentally uploading lines and lines of junk.

Thu, 7 May 2009 16:25:53 -0400 View History