Browse Source

Update scripts, readmes.

master
flabbergast 1 year ago
parent
commit
39025cc226
  1. 3
      .gitignore
  2. 2
      01-button-led/README.md
  3. 14
      01-button-led/ass
  4. 0
      01-button-led/main.asm
  5. 2
      02-lpm3wait/README.md
  6. 12
      02-lpm3wait/ass
  7. 0
      02-lpm3wait/main.asm
  8. 2
      03-uart/README.md
  9. 10
      03-uart/ass
  10. 2
      04-uartstring/README.md
  11. 2
      04-uartstring/ass
  12. 0
      04-uartstring/main.asm
  13. 5
      05-morestring/README.md
  14. 2
      05-morestring/ass
  15. 0
      05-morestring/main.asm
  16. 6
      06-i2c-bitbang/README.md
  17. 2
      06-i2c-bitbang/ass
  18. 0
      06-i2c-bitbang/main.asm

3
.gitignore vendored

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
main.hex
main.p
main.lst

2
01-button-led/README.md

@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
# button-led
# 01-button-led
Just initialise, switch to 8MHz clock, and light up one of the two LEDs that are on MSP430G2 launchpad. While the button is pressed, switch the light to the other LED.

14
01-button-led/ass

@ -1,13 +1,19 @@ @@ -1,13 +1,19 @@
#!/bin/bash
set -euo pipefail
ARG1=${1:-}
TARGET=button-led
TARGET=main
function clean { rm -f $TARGET.hex $TARGET.p ; }
function clean { rm -f $TARGET.hex $TARGET.p $TARGET.lst ; }
clean
if test "$1" = "clean" ; then
if test "$ARG1" = "clean" ; then
exit 0
fi
asl $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff
asl -r 2 -L $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff
if test $? -eq 0 -a "$ARG1" == "flash" ; then
mspdebug rf2500 "prog $TARGET.hex"
fi

0
01-button-led/button-led.asm → 01-button-led/main.asm

2
02-lpm3wait/README.md

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
# lpm3wait
# 02-lpm3wait
This requires a 32768 Hz crystal (quartz) between XTAL1/2 pins.

12
02-lpm3wait/ass

@ -1,13 +1,19 @@ @@ -1,13 +1,19 @@
#!/bin/bash
set -euo pipefail
ARG1=${1:-}
TARGET=lpm3wait
TARGET=main
function clean { rm -f $TARGET.hex $TARGET.p $TARGET.lst ; }
clean
if test "$1" = "clean" ; then
if test "$ARG1" = "clean" ; then
exit 0
fi
asl -L $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff
asl -r 2 -L $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff
if test $? -eq 0 -a "$ARG1" == "flash" ; then
mspdebug rf2500 "prog $TARGET.hex"
fi

0
02-lpm3wait/lpm3wait.asm → 02-lpm3wait/main.asm

2
03-uart/README.md

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
# uart_lp
# 03-uart
Implements basic "get byte" and "put byte" over UART (on P1.1 P1.2 pins; hardware).

10
03-uart/ass

@ -1,4 +1,6 @@ @@ -1,4 +1,6 @@
#!/bin/bash
set -euo pipefail
ARG1=${1:-}
TARGET=main
@ -6,8 +8,12 @@ function clean { rm -f $TARGET.hex $TARGET.p $TARGET.lst ; } @@ -6,8 +8,12 @@ function clean { rm -f $TARGET.hex $TARGET.p $TARGET.lst ; }
clean
if test "$1" = "clean" ; then
if test "$ARG1" = "clean" ; then
exit 0
fi
asl -L $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff
asl -r 2 -L $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff
if test $? -eq 0 -a "$ARG1" == "flash" ; then
mspdebug rf2500 "prog $TARGET.hex"
fi

2
04-uartstring/README.md

@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
# uartstring
# 04-uartstring
The only addition over `03-uart` is printing static strings over uart.

2
04-uartstring/ass

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
set -euo pipefail
ARG1=${1:-}
TARGET=uartstring
TARGET=main
function clean { rm -f $TARGET.hex $TARGET.p $TARGET.lst ; }

0
04-uartstring/uartstring.asm → 04-uartstring/main.asm

5
05-morestring/README.md

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
# 05-morestring
Still just messing with UART.
`write.asm` has some more routines for printing strings and some numbers.

2
05-morestring/ass

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
set -euo pipefail
ARG1=${1:-}
TARGET=morestring
TARGET=main
function clean { rm -f $TARGET.hex $TARGET.p $TARGET.lst ; }

0
05-morestring/morestring.asm → 05-morestring/main.asm

6
06-i2c-bitbang/README.md

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
# 06-i2c-bitbang
New: `i2c.asm` - a bitbanged (software) I2C driver.
(Since USCI_A is used for UART, and USCI_B will be used for SPI.)
A little testing code, assuming an EEPROM.

2
06-i2c-bitbang/ass

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
set -euo pipefail
ARG1=${1:-}
TARGET=bitbang
TARGET=main
function clean { rm -f $TARGET.hex $TARGET.p $TARGET.lst ; }

0
06-i2c-bitbang/bitbang.asm → 06-i2c-bitbang/main.asm

Loading…
Cancel
Save