Re: [Flashforth-devel] TeraTerm Macro for Upload to FF
Brought to you by:
oh2aun
From: om1zz <om...@vo...> - 2015-05-19 08:23:23
|
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 ;----------------------------------------------------------- ______________________________________________________________ > Od: om1zz <om...@vo...> > Komu: Mikael Nordman <mik...@fl...>, <fla...@li...> > Datum: 19.05.2015 08:08 > Předmět: Re: [Flashforth-devel] TeraTerm Macro for Upload to FF > >Great!!! > >With > >wait #13 ?? > >it waits on a newline coming from FF after each line of code FF has processed as well as an error message, if any (I modded ? to ??). > >The float.txt uploads in 14 seconds with no error (921k6, dspic33, 40MHz Fcy, serial usb CA-42 clone). >:) > >The script needs some finetunig, as the upload now stops at each error which may not be an error.. :) > >IM. > >______________________________________________________________ >> Od: Mikael Nordman <mik...@fl...> >> Komu: <fla...@li...> >> Datum: 19.05.2015 05:59 >> Předmět: Re: [Flashforth-devel] TeraTerm Macro for Upload to FF >> >>Yes. >> >>On 18.05.2015 23:57, om1zz wrote: >>> Does the FF send a new line when ready to receive an another line? >> >> >>------------------------------------------------------------------------------ >>One dashboard for servers and applications across Physical-Virtual-Cloud >>Widest out-of-the-box monitoring support with 50+ applications >>Performance metrics, stats and reports that give you Actionable Insights >>Deep dive visibility with transaction tracing using APM Insight. >>http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >>_______________________________________________ >>Flashforth-devel mailing list >>Fla...@li... >>https://lists.sourceforge.net/lists/listinfo/flashforth-devel >> > >------------------------------------------------------------------------------ >One dashboard for servers and applications across Physical-Virtual-Cloud >Widest out-of-the-box monitoring support with 50+ applications >Performance metrics, stats and reports that give you Actionable Insights >Deep dive visibility with transaction tracing using APM Insight. >http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >_______________________________________________ >Flashforth-devel mailing list >Fla...@li... >https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |