Page 1 of 1

DTR-less download from the IDE's menu

Posted: 29 January 2007, 21:17 PM
by stevech
The following text, placed in the user options file (use the editor menu to open the user options file) - invokes the version 2 zload program and downloads without using the DTR. Useful for downloading via ethernet or WiFi to serial converters.

Code: Select all

command.name.0.*=ZLoad COM4 Go
command.mode.0.*=subsystem:console,savebefore:no
command.shortcut.0.*=F12
command.0.*=$(SciteDefaultHome)\..\zload -c4 -a4 -v  "$(project.dir)\$(project.name).zxb"
the -a4 tells it to use ASCII 4 for the download trigger command. My application has this code in its startup, to setup this:

Code: Select all

	Dim ATNChar as Persistent Byte Based &H0013 

   if ATNchar <> &h04 then  ' enable DTR-less download
		ATNChar = &H04   ' set the ZBasic DTR-less download ATN character = ctrl-d
	end if
Since the ATNchar is in EEPROM, this is an if/endif to reduce EPROM writing. You must store all-ones into that location to disable DTR-less downloading - e.g., if ASCII 4 will appear in your application's data stream.

the -c4 is the COM port number (a virtual com port in my case).

NOTE: The IDE's debugger cannot also have COM4 open when you start this download. Close it using the options menu before doing the download. We need a way for this menu choice to run ZLoad to force the IDE to close the serial port it's using. I guess that will come when there's a more fully integrated DTR-less download built-in.