PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/MSP-EXP430FR6989/MSP-EXP430FR6989_8MHz_SD_Card/SD_TESTS.4TH

https://gitlab.com/Jean-Michel/FastForthForMSP430fr5xxx
Forth | 90 lines | 77 code | 13 blank | 0 comment | 1 complexity | f79acc4b5b6c186a2a26ee4022c8b4ee MD5 | raw file
Possible License(s): GPL-3.0
  1. ; -----------------------------
  2. ; MSP-EXP430FR5969_SD_TESTS.4TH
  3. ; -----------------------------
  4. ; compile SD_TEST which display a choice to test the embedded driver for FAT16 SD_CARD
  5. STOP ; to stop any interrupt in progress
  6. WIPE ;
  7. NOECHO ; comment to debug
  8. ; TODO
  9. ; ====
  10. ; your launchpad is running the right Fast Forth For MSP430FRxxxx, 8MHz version,
  11. ; -connect your USBtoUART bridge on to the eZ-FET_UART
  12. ; -format a SD Card memory (no more 2 Gb, to ensure FAT16 format)
  13. ; -copy the content of the MSP-EXP430FRxxxx_SD_CARD folder in root directory of SD_CARD (a:\)
  14. ; -wire SD_CARD adapter on MSP-EXP430FR5969 launchpad
  15. ; -put SD_CARD memory in its adapter (may be VCC will fall below the brownout threshold, that causes a RESET)
  16. ; -press <RESET> to initialize correctly the SD CARD memory
  17. ; then, from teraterm terminal, type : LOAD" a:\SD_TEST.4TH"
  18. ; all wiring is described in MSP-EXP430FR5969.inc file
  19. ; serial configuration is described in the start of DTCforthMSP430FR5xxx.asm file
  20. ; so you can load any source file, as RC5toLCD.4th, from your memory card
  21. ; with the command : LOAD" [drive:]\path\file.ext"
  22. ; -----------------------------------------------------------------------
  23. ; SD_CARD TESTS
  24. ; -----------------------------------------------------------------------
  25. : SD_TEST
  26. CR
  27. ." 1 Load ANS core tests" CR
  28. ." 2 Load, compile and run a 10k program "
  29. ." from its 223k source file (quiet mode)" CR
  30. ." 3 Read only this source file (quiet mode)" CR
  31. ." 4 Write a dump of the FORTH kernel to yourfile.txt" CR
  32. ." 5 append a dump of the FORTH kernel to yourfile.txt" CR
  33. ." 6 Load truc (test error)" CR
  34. ." your choice : "
  35. KEY
  36. 48 -
  37. DUP 1 =
  38. IF . \ display choice
  39. LOAD" a:\CORETEST.4TH" \ open pathname and interpret it
  40. ELSE DUP 2 =
  41. IF . \ display choice
  42. LOAD" b:\Prog10k.4th" \ compile about 180k of source code ==> 10.4k program (11 slices of RC5toLCD.4th)
  43. ELSE DUP 3 =
  44. IF . \ display choice
  45. READ" c:\Prog10k.4th" \ open pathname as read file and load first sector in buffer
  46. BEGIN
  47. READ \ sequentially load one sector in buffer
  48. UNTIL \ until CurrentHdl is closed and previous handle restored
  49. ELSE DUP 4 =
  50. IF . \ display choice
  51. DEL" d:\yourfile.txt" \ DEL then WRITE operations
  52. WRITE" d:\yourfile.txt"
  53. 0x4400 HERE OVER - DUMP
  54. CLOSE
  55. ELSE DUP 5 =
  56. IF . \ display choice
  57. WRITE" d:\yourfile.txt" \ only WRITE operation
  58. 0x4400 HERE OVER - DUMP
  59. CLOSE
  60. ELSE DUP 6 =
  61. IF . \ display choice
  62. LOAD" e:\truc"
  63. ELSE
  64. DROP ." ?" \ all other choices
  65. CR ." loading TSTWORDS.4th..."
  66. LOAD" TSTWORDS.4TH"
  67. THEN
  68. THEN
  69. THEN
  70. THEN
  71. THEN
  72. THEN
  73. CR
  74. ;
  75. ECHO
  76. PWR_HERE ;
  77. SD_TEST ; type CR