2011-07-21, 20:45:16
(This post was last modified: 2012-12-22, 00:37:27 by Mikael Gustavsson.)
I've successfully implemented the bootloader into a design that uses an FTDI FT232RQ for USB to RS-232 communication from PC to the device. I am able to load new firmware via the GUI using a software reset command. I am trying to get the console to load new firmware and am running into problems with the software reset. Basically, the device never receives the command from the console app and as such, never resets to the bootloader.
Here is a console log...
-----------------------------------------------------------------------
C:\ds30 Loader\bin>ds30loaderconsole -z
Loading device database...492 devices found
Loading port plugin ds30LoaderPortSerial.dll: found 3 ports
Available ports:
Communications Port (COM1)
, no restrictions on baud/bitrate by ds30 Loader
Communications Port (COM2)
, no restrictions on baud/bitrate by ds30 Loader
USB Serial Port (COM9) M2)
, no restrictions on baud/bitrate by ds30 Loader
End of available ports, exiting
Press any key to continue
C:\ds30 Loader\bin>ds30loaderconsole -o -f=D:\firmware.hex -d=pic18f4620 -k=com9 -r=115200 -p -a=20 -q=7e;d
Loading device database...492 devices found
Loading port plugin ds30LoaderPortSerial.dll: found 3 ports
Parsing hex-file...
File timestamp: 7/20/2011 4:03:10 PM
Validating hex-file...ok
Hex-file successfully parsed
29979 program words found in 938 rows
0 Eeprom words found
14 config words found
File: D:\firmware.hex
Device: PIC18F4620
Port: com9
Baudrate: 115200
Initiating write...
Sending reset command...ok
Searching for bl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . timed out
Tx 163 bytes / Rx 0 bytes / 5.4s
C:\ds30 Loader\bin>
-----------------------------------------------------------------------
One thing that I noticed is that the port listing for the FTDI port (COM9) looks a little different than the standard serial ports. Not sure if this could be related or not.
In an attempt to get a better view of what is actually going on, I connected two USB-RS232 cables together via a null modem cable. I set both the GUI and console to use one of the ports and opened a serial terminal on the other. Here are the terminal captures...
GUI:
(ASCII)
~
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
(HEX)
7E0DC1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1
Console:
(ASCII)
<0>€<0><0><0>ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
(HEX)
0080000000C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1
It appears to me as though the console application is not properly sending the specified reset command. I used the same syntax in the console as I did in the GUI. I'm out of ideas and thought I'd list my findings here to see if this is an actual bug. Thoughts? Thanks in advance.
Brandon
Here is a console log...
-----------------------------------------------------------------------
C:\ds30 Loader\bin>ds30loaderconsole -z
Loading device database...492 devices found
Loading port plugin ds30LoaderPortSerial.dll: found 3 ports
Available ports:
Communications Port (COM1)
, no restrictions on baud/bitrate by ds30 Loader
Communications Port (COM2)
, no restrictions on baud/bitrate by ds30 Loader
USB Serial Port (COM9) M2)
, no restrictions on baud/bitrate by ds30 Loader
End of available ports, exiting
Press any key to continue
C:\ds30 Loader\bin>ds30loaderconsole -o -f=D:\firmware.hex -d=pic18f4620 -k=com9 -r=115200 -p -a=20 -q=7e;d
Loading device database...492 devices found
Loading port plugin ds30LoaderPortSerial.dll: found 3 ports
Parsing hex-file...
File timestamp: 7/20/2011 4:03:10 PM
Validating hex-file...ok
Hex-file successfully parsed
29979 program words found in 938 rows
0 Eeprom words found
14 config words found
File: D:\firmware.hex
Device: PIC18F4620
Port: com9
Baudrate: 115200
Initiating write...
Sending reset command...ok
Searching for bl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . timed out
Tx 163 bytes / Rx 0 bytes / 5.4s
C:\ds30 Loader\bin>
-----------------------------------------------------------------------
One thing that I noticed is that the port listing for the FTDI port (COM9) looks a little different than the standard serial ports. Not sure if this could be related or not.
In an attempt to get a better view of what is actually going on, I connected two USB-RS232 cables together via a null modem cable. I set both the GUI and console to use one of the ports and opened a serial terminal on the other. Here are the terminal captures...
GUI:
(ASCII)
~
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
(HEX)
7E0DC1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1
Console:
(ASCII)
<0>€<0><0><0>ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
(HEX)
0080000000C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1
It appears to me as though the console application is not properly sending the specified reset command. I used the same syntax in the console as I did in the GUI. I'm out of ideas and thought I'd list my findings here to see if this is an actual bug. Thoughts? Thanks in advance.
Brandon