Re: [Flashforth-devel] TeraTerm Macro for Upload to FF - v.0.3 patch
Brought to you by:
oh2aun
From: om1zz <om...@vo...> - 2015-05-20 09:44:32
|
This is v.0.3 update patch: 1. save your TT settings with your transmit delays into 'teraterm.ini' 2. save your TT settings with zero transmit delays into 'teraterm_ztrd.ini' 3. when working in TT window directly it uses your delays so you can copy/paste your source code 4. when using below macro it sets delays to zero, after the upload it restores the ini back to the one with your delays 5. if you may know how to set transmit delays in the macro it could be used instead of rather heavier 'restoresetup' Still beta, no warranties of any kind :) Igor ; TeraTerm Macro Script for FlashForth ; Serial set within TT session ; Opens a file, reads each line, and sends the line to FF ; while waiting on "\n" or "??" from FF to handshake ; IgorM c 5/2015, No warranties of any kind ; v.0.3 :Main Yes = 1 ; for YesNoBox result No = 0 ; for YesNoBox result BlankLine = 0 restoresetup 'teraterm_ztrd.ini' call OpenFile call ReadFile call CloseFile restoresetup 'teraterm.ini' END >This is v0.2 of the script, it removes blank lines and comments if required, stops and asks on ?? error. >You have to mod the ? to ?? in the asm. >Uploads the 665 lines long float.txt in 8 seconds (921k, pic33, Fcy 40MHz) fine ;) >Still beta, no warranties of any kind :) > > ; TeraTerm Macro Script fro FlashForth > ; Serial set within TT session > ; Opens a file, reads each line, and sends the line to FF > ; while waiting on "OK" or "??" after the \r\n sent > ; IgorM c 5/2015 > ; v.0.2 > > :Main > Yes = 1 ; for YesNoBox result > No = 0 ; for YesNoBox result > BlankLine = 0 > call OpenFile > call ReadFile > call CloseFile > END > > :OpenFile > FileNameBox 'Choose a file to upload' > FileChosen = result > if FileChosen = Yes then > FileOpen fhandle inputstr 0 > else > end > endif > RETURN > > :ReadFile > YesNoBox 'Do you want to skip blank lines and comments?' 'Skip?' > SkipBlanks = result > > while 1 > > ; Read a line from the file.. > > filereadln fhandle line > EndOfFile = result > > if EndOfFile = Yes break > > StrLen line > LineLen = result > > if SkipBlanks = Yes then > if LineLen = BlankLine continue > strscan line '\' > if result = 1 continue > if result > 1 then > strremove line result LineLen-result+1 > endif > endif > > sendln line > > timeout = 1 ; 1 sec > wait #13 "??" ; wait on OK(\n) or an Error ?? > > if result = 0 break ; timeout > > ;if result = 1 goto _ok ; OK detected > > if result = 2 then ; exit if ?? Error from FF > YesNoBox 'Error - Do you want proceed w/ Upload?' 'Continue?' > if result = No break > endif > > ; Repeat until the end of the file.. > > endwhile > RETURN > > :CloseFile > FileClose fhandle > RETURN > ;----------------------------------------------------------- > > |