/MSP-EXP430FR6989/MSP-EXP430FR6989_8MHz_SD_Card/SD_TESTS.4TH
Forth | 90 lines | 77 code | 13 blank | 0 comment | 1 complexity | f79acc4b5b6c186a2a26ee4022c8b4ee MD5 | raw file
Possible License(s): GPL-3.0
- ; -----------------------------
- ; MSP-EXP430FR5969_SD_TESTS.4TH
- ; -----------------------------
- ; compile SD_TEST which display a choice to test the embedded driver for FAT16 SD_CARD
- STOP ; to stop any interrupt in progress
- WIPE ;
- NOECHO ; comment to debug
- ; TODO
- ; ====
- ; your launchpad is running the right Fast Forth For MSP430FRxxxx, 8MHz version,
- ; -connect your USBtoUART bridge on to the eZ-FET_UART
- ; -format a SD Card memory (no more 2 Gb, to ensure FAT16 format)
- ; -copy the content of the MSP-EXP430FRxxxx_SD_CARD folder in root directory of SD_CARD (a:\)
- ; -wire SD_CARD adapter on MSP-EXP430FR5969 launchpad
- ; -put SD_CARD memory in its adapter (may be VCC will fall below the brownout threshold, that causes a RESET)
- ; -press <RESET> to initialize correctly the SD CARD memory
- ; then, from teraterm terminal, type : LOAD" a:\SD_TEST.4TH"
- ; all wiring is described in MSP-EXP430FR5969.inc file
- ; serial configuration is described in the start of DTCforthMSP430FR5xxx.asm file
- ; so you can load any source file, as RC5toLCD.4th, from your memory card
- ; with the command : LOAD" [drive:]\path\file.ext"
- ; -----------------------------------------------------------------------
- ; SD_CARD TESTS
- ; -----------------------------------------------------------------------
- : SD_TEST
- CR
- ." 1 Load ANS core tests" CR
- ." 2 Load, compile and run a 10k program "
- ." from its 223k source file (quiet mode)" CR
- ." 3 Read only this source file (quiet mode)" CR
- ." 4 Write a dump of the FORTH kernel to yourfile.txt" CR
- ." 5 append a dump of the FORTH kernel to yourfile.txt" CR
- ." 6 Load truc (test error)" CR
- ." your choice : "
- KEY
- 48 -
- DUP 1 =
- IF . \ display choice
- LOAD" a:\CORETEST.4TH" \ open pathname and interpret it
- ELSE DUP 2 =
- IF . \ display choice
- LOAD" b:\Prog10k.4th" \ compile about 180k of source code ==> 10.4k program (11 slices of RC5toLCD.4th)
- ELSE DUP 3 =
- IF . \ display choice
- READ" c:\Prog10k.4th" \ open pathname as read file and load first sector in buffer
- BEGIN
- READ \ sequentially load one sector in buffer
- UNTIL \ until CurrentHdl is closed and previous handle restored
- ELSE DUP 4 =
- IF . \ display choice
- DEL" d:\yourfile.txt" \ DEL then WRITE operations
- WRITE" d:\yourfile.txt"
- 0x4400 HERE OVER - DUMP
- CLOSE
- ELSE DUP 5 =
- IF . \ display choice
- WRITE" d:\yourfile.txt" \ only WRITE operation
- 0x4400 HERE OVER - DUMP
- CLOSE
- ELSE DUP 6 =
- IF . \ display choice
- LOAD" e:\truc"
- ELSE
- DROP ." ?" \ all other choices
- CR ." loading TSTWORDS.4th..."
- LOAD" TSTWORDS.4TH"
- THEN
- THEN
- THEN
- THEN
- THEN
- THEN
- CR
- ;
- ECHO
- PWR_HERE ;
- SD_TEST ; type CR