Smallest Blinky, only 36 Bytes!¶
This standalone turnkey binary is only 36 bytes! The mecrisp-Across cross compiler didn’t optimize away the delay word, and the blink cycle is about one second.
No specialised MSP430 hardware insight was required for this.
\ Program Name: minblinky.fs
\ Date: 12 Nov 2018
\ Copyright 2018 t.porter <terry@tjporter.com.au>, licensed under the GPL
\ For Mecrisp-Across by Matthias Koch
\ http://mecrisp.sourceforge.net/
\ chip: MSP430G2452, 8 KB Flash, 256 B Information memory, 256 B Ram
\ blink rate is about 1 seconf for a on/off cycle
\ turnkey binary is only 36 bytes!
\ hexdump
\ :10F80000B240805A20013140800234406002D2432D
\ :10F810002200D2E321000743384317530798FD2302
\ :10F82000F83FFF3FFFFFFFFFFFFFFFFFFFFFFFFF6F
\ :10FFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFF00F817
\ :00000001FF
\ new \ New Forth source code to be cross compiled
\ +jtag \ Activate JTAG mode
\ target \ Emulate the target ( We never leave the Host )
\
emu
: delay ( -- )
65535 0 do loop
;
: minblink ( -- )
1 p1dir c!
begin
1 p1out cxor!
delay
again
;
host
$FFFE vector minblink crosscompile flashtarget -jtag run