ds30 Loader free edition forums
unknown port [solved] - Printable Version

+- ds30 Loader free edition forums (https://picbootloader.com/forum)
+-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3)
+--- Forum: Console (https://picbootloader.com/forum/forumdisplay.php?fid=5)
+--- Thread: unknown port [solved] (/showthread.php?tid=29)



unknown port [solved] - dlutolf - 2010-12-17

when I try to program my device (WebPlatform from dangerousprototypes.com), I get the error "unknown port"

OS: gentoo
kernel: 2.6.37-rc1-00027-gff8b16d
mono-version: mono-2.8.1-r1

command I run: (in a little script to make it easier)
Code:
#!/bin/bash
FILE=/home/dave/dt/locmon/hals/web_platform/uIPStack/output/uIPStack.hex
cd "/home/dave/PIC2/PIC/ds30 Loader/bin"
mono ds30LoaderConsole.exe --port=/dev/web_platform --baudrate=115200 --file=${FILE} --device=dsPIC33FJ128GP204 --write-program "-q=a;b"

notes on the above:
- I tried with and without the -q flag
- the documentation says I can execute ./ds30LoaderConsole.exe directly,
however this fails (invalid executable format). need to run through mono
explicitly
- /dev/web_platform is a symlink (made dynamically with udev) to /dev/ttyUSB0.
same behaviour if I specify /dev/ttyUSB0

general notes:
- I find it irritating to have the "clear screen" command sent to the console
- GUI does not work at all on my system. last time I tried display was messed
up, now I just get an empty window

now, the full output of the run:
Code:
Loading external device database...file not found: /usr/bin/devices.xml
Falling back on internal device database...353 devices found
Parsing hex-file...
    File timestamp: 17.12.2010 15:54:26
    Validating hex-file...ok
    Hex-file successfully parsed

    15308 program words found in 241 rows
    0 Eeprom words found
    4 config words found

File:      /home/dave/dt/locmon/hals/web_platform/uIPStack/output/uIPStack.hex
Device:    dsPIC33FJ128GP204
Port:      /dev/web_platform
Baudrate:  115200  


Press any key to begin download



Initiating download...Port class instantiation failed: Argument cannot be
null.
Parameter name: type
    Unknown port: /dev/web_platform
Press any key to continue

any ideas?


RE: unknown port - Mikael Gustavsson - 2010-12-18

Thanks for your post!

I'll correct the Linux example in the manual and remove clear screen
GUI not working is out of my hand, except if I reworked it using gtk# instead of winforms. Something I wont do.

What output do you get from mono ds30LoaderConsole.exe --list-ports?

Do you really want to use "-q=a;b"? I think not.


RE: unknown port - dlutolf - 2010-12-18

Quote:Thanks for your post!
my pleasure! we've found your BL to be a great thing (at least under M$WIN). it's going to be a great help to distribute hardware and custom firmwares to people who don't have a programmer. means we can tolerate more hard-coded stuff :-)

Quote:GUI not working is out of my hand, except if I reworked it using gtk# instead of winforms. Something I wont do.
don't worry about it. as long as I get a console app I'm happy :-)

Quote:I'll correct the Linux example in the manual and remove clear screen
sweet

now, some more output:
Code:
$ mono ds30LoaderConsole.exe --list-ports
Loading external device database...file not found: /usr/bin/devices.xml
Falling back on internal device database...353 devices found

Available ports

End of available ports, exiting
Press any key to continue

same thing if I run as root.

FYI:
Code:
# dmesg|tail -8
usb 4-1: new full speed USB device using uhci_hcd and address 4
ftdi_sio 4-1:1.0: FTDI USB Serial Device converter detected
usb 4-1: Detected FT232RL
usb 4-1: Number of endpoints 2
usb 4-1: Endpoint 1 MaxPacketSize 64
usb 4-1: Endpoint 2 MaxPacketSize 64
usb 4-1: Setting MaxPacketSize 64
usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0
# lsusb
[snip]
Bus 004 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

just out of curiosity, I removed the udev rule that creates the symlink - the problem is not there

do I need to say the same hardware was flashed successfully under windows? since my leds are blinking the way they should (and previous output), I have no reason to believe it's hardware related.

oh yeah.. another remark: I find it strange to look for the xml device list in /usr/bin - shouldn't this dir hold only executables?
and yet another (trivial) one: the loader cannot load /usr/bin/devices.xml when it is a symlink

from the kernel version I suppose you've guessed I have a custom config and not a pre-compiled kernel. let me know if there's any more info I can give you.


RE: unknown port - Mikael Gustavsson - 2010-12-18

D you use gnome or kde? I works great with gnome in openSuse and Ubuntu.

You probably need to run as root unless you have changed permissions on /dev/ttyUSB0.

Try first to run from the bin directory from the zip-package with all files present in the same directory.


RE: unknown port - dlutolf - 2010-12-19

I did run as root, and from the bin dir (I cd to it the script, the only file not in the dir is the hex I want to flash). my first tries where done as root in the dir anyway, without the script.

I haver neither gnome nor kde, but fvwm (because it rules). console apps should run without X anyway Undecided


RE: unknown port - Mikael Gustavsson - 2010-12-19

Sry, about window manager, I was of course referring to the GUI. The console application shouldn't require X.

Are the ds30LoaderPort*.dll files located together with ds30LoaderConsole.exe?


RE: unknown port - dlutolf - 2010-12-19

yes

Code:
$ls -l
total 1628
-rw-r--r-- 1 dave dave  69632 28 aoû 13:10 canlibCLSNET.dll
-rw-r--r-- 1 dave dave 129452  2 nov 21:15 devices.xml
-rw-r--r-- 1 dave dave  18944  5 nov 21:45 ds30LoaderConsole.exe
-rw-r--r-- 1 dave dave  84992 29 oct 18:44 ds30 Loader.dll
-rw-r--r-- 1 dave dave 141312  5 nov 21:46 ds30 Loader GUI.exe
-rw-r--r-- 1 dave dave  20480 30 oct 16:03 ds30LoaderPortIxxat.dll
-rw-r--r-- 1 dave dave  18944 30 oct 16:03 ds30LoaderPortKvaser.dll
-rw-r--r-- 1 dave dave  23552  5 nov 21:45 ds30LoaderPortPCAN.dll
-rw-r--r-- 1 dave dave  19456 29 oct 18:44 ds30LoaderPortSerial.dll
-rw-r--r-- 1 dave dave  24064 30 oct 16:03 ds30LoaderPortVector.dll
-rw-r--r-- 1 dave dave  16896 10 oct 16:29 GHelper.dll
-rw-r--r-- 1 dave dave   1225 21 avr  2010 ixxatBitRates.xml
-rw-r--r-- 1 dave dave 299520 15 oct 08:36 PCANBasic.dll
-rw-r--r-- 1 dave dave 380416 15 oct 08:36 PCANBasic_x64.dll
-rw-r--r-- 1 dave dave   2731  8 nov 11:18 settings.xml
-rw-r--r-- 1 dave dave  90232 29 jui 17:01 vcinet2.dll
-rw-r--r-- 1 dave dave    953 23 jun 21:56 vectorBitRates.xml
-rw-r--r-- 1 dave dave 178688 31 aoû 14:48 vxlapi.dll
-rw-r--r-- 1 dave dave 109128  8 sep 10:12 vxlapi_NET20.dll



RE: unknown port - Mikael Gustavsson - 2010-12-19

There seems to be a problem with the path. If you execute from home/dave/PIC2/PIC/ds30 Loader/bin, you shouldn't get "..file not found:/usr/bin/devices.xml"

Try
Code:
cd "/home/dave/PIC2/PIC/ds30 Loader/bin"
mono ./ds30LoaderConsole.exe --list-ports

You should get something like this:
Quote:linux-jetf:/home/mikael/Download/ds30 Loader/bin # mono ds30LoaderConsole.exe --list-ports
KDE colorscheme read failure, using built-in colorscheme

Loading port plugin ds30LoaderPortIxxat.dll: no supported on this OS
Loading port plugin ds30LoaderPortKvaser.dll: no supported on this OS
Loading port plugin ds30LoaderPortPCAN.dll: no supported on this OS
Loading port plugin ds30LoaderPortSerial.dll: found 9 ports
Loading port plugin ds30LoaderPortVector.dll: no supported on this OS
Loading external device database...408 devices found

Available ports
/dev/ttyS0, no restrictions on baud/bitrate by ds30 Loader
/dev/ttyS1, no restrictions on baud/bitrate by ds30 Loader
/dev/ttyS2, no restrictions on baud/bitrate by ds30 Loader
/dev/ttyS3, no restrictions on baud/bitrate by ds30 Loader
/dev/ttyS4, no restrictions on baud/bitrate by ds30 Loader
/dev/ttyS5, no restrictions on baud/bitrate by ds30 Loader
/dev/ttyS6, no restrictions on baud/bitrate by ds30 Loader
/dev/ttyS7, no restrictions on baud/bitrate by ds30 Loader
/dev/ttyUSB0, no restrictions on baud/bitrate by ds30 Loader

End of available ports, exiting
Press any key to continue



RE: unknown port - dlutolf - 2010-12-20

I confirm, I get the same (wrong) output when running ds30LoaderConsole.exe as root from the bin directory.


RE: unknown port - Mikael Gustavsson - 2010-12-20

Do you still get "Loading external device database...file not found: /usr/bin/devices.xml", or is it another path?


RE: unknown port - dlutolf - 2010-12-20

exact same thing


RE: unknown port - Mikael Gustavsson - 2010-12-20

Here are three different versions, please test all three and let me know which ones work.

bin3 is hard coded and should be put in /home/dave/PIC2/PIC/ds30 Loader/bin.


RE: unknown port - dlutolf - 2010-12-24

hey Mikael, thanks for the archive

not really sure where you want me to put the files, so here's what I did:

copied all bin? dirs to /home/dave/PIC2/PIC/ds30 Loader/

I end up with
Code:
$ls -1R /home/dave/PIC2/PIC/ds30 Loader/
/home/dave/PIC2/PIC/ds30 Loader/:
API sample projects
bin
bin1
bin2
bin3
COPYING.txt
documentation
firmware dsPIC30F
firmware dsPIC33F
firmware PIC16F
firmware PIC18F
firmware PIC18FJ
firmware PIC24F
firmware PIC24FJ
firmware PIC24H
links
source
tools

[snip]

/home/dave/PIC2/PIC/ds30 Loader/bin:
canlibCLSNET.dll
devices.xml
ds30LoaderConsole.exe
ds30 Loader.dll
ds30 Loader GUI.exe
ds30LoaderPortIxxat.dll
ds30LoaderPortKvaser.dll
ds30LoaderPortPCAN.dll
ds30LoaderPortSerial.dll
ds30LoaderPortVector.dll
GHelper.dll
ixxatBitRates.xml
PCANBasic.dll
PCANBasic_x64.dll
settings.xml
vcinet2.dll
vectorBitRates.xml
vxlapi.dll
vxlapi_NET20.dll

/home/dave/PIC2/PIC/ds30 Loader/bin1:
devices.xml
ds30LoaderConsole.exe
ds30 Loader.dll
ds30LoaderPortSerial.dll
GHelper.dll

/home/dave/PIC2/PIC/ds30 Loader/bin2:
devices.xml
ds30LoaderConsole.exe
ds30 Loader.dll
ds30LoaderPortSerial.dll
GHelper.dll

/home/dave/PIC2/PIC/ds30 Loader/bin3:
devices.xml
ds30LoaderConsole.exe
ds30 Loader.dll
ds30LoaderPortSerial.dll
GHelper.dll

[snip]

I then cd'ed to each of the bin? dir, then executed
Code:
$ mono ds30LoaderConsole.exe --list-ports
it seemed to work in all three cases, with a few slight differences.

output is attached

ps: *.tgz files not allowed on the forum? what a shame..

pps: oh, I forgot to mention I don't have my web platform here, forgot it at a friend's place... so I couldn't actually try to upload a new hex file