Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
On UBUNTU 10.10 ds30LoaderConsole needs libmono-winforms2.0-cil [solved]
#1
I tried to invoke ds30LoaderConsole on a fairly stock Ubuntu 10.10 server system and it complained:
Code:
$ mono ds30LoaderConsole.exe --port=/dev/web_platform --baudrate=115200 --file=${FILE} --device=dsPIC33FJ128GP204 --write-program

** (ds30LoaderConsole.exe:18243): WARNING **: The following assembly referenced from /home/ozybushwalker/Downloads/ds30 Loader/bin/GHelper.dll could not be loaded:
     Assembly:   System.Windows.Forms    (assemblyref_index=1)
     Version:    2.0.0.0
     Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/ozybushwalker/Downloads/ds30 Loader/bin/).



** (ds30LoaderConsole.exe:18243): WARNING **: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

Unhandled Exception: System.MissingFieldException: Field 'GHelper.clsDebugTextbox.bConsole' not found.

After installing package libmono-winforms2.0-cil things moved along a bit further:
Code:
$ sudo bash
[sudo] password for ozybushwalker:
root@vbox:~/Downloads/ds30 Loader/bin# mono ds30LoaderConsole.exe -l --port=/dev/ttyUSB0 --baudrate=115200 --file=~/test.hex --device=dsPIC33FJ128GP204 --write-program


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 5 ports
Loading port plugin ds30LoaderPortVector.dll: no supported on this OS
Loading external device database...408 devices foundNon-existing file specified.
$

What file is "non-existing"? ~/test.hex exists, root has access to /dev/ttyUSB0.
Reply
#2
Thanks for the report! GHelper contains some other things not used by ds30 Loader, that's why WinForms
is required. I might extract whats being used by ds30 Loader in ghelper to a separate dll.

Please try to use the full path: --file=/home/root/test.hex. I that works, I'll fix ~ to the next version.
Reply
#3
Thanks for the suggestion on the full path; that did the trick. If I recall correctly I had earlier been specifying the full path (which was quite long since the binary was built by MPLAB X) and a non-existing file was reported but I've been unable to reproduce that problem.

Unfortunately I'm still unable to program my device (Web Platform from dangerous prototypes). As best I can recall, I'm using the same procedure as when I successfully used the Windows loader a few months ago but maybe something on the board broke in the meantime. Here's what happens:
Code:
Device:    dsPIC33FJ128GP204
Port:      /dev/ttyUSB0
Baudrate:  115200  


Press any key to begin download



Initiating download...
    Opening port /dev/ttyUSB0@115200
    Searching for bl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . timed out
    Closing port
    Tx 50 bytes / Rx 0 bytes / 5.1s
Press any key to continue
Reply
#4
If possible, please try in Windows and GUI in Linux.
Do you have a real pic programmer? If so, verify that the bootloader is still there.

Is the uart working from the web platform application?
Reply
#5
(2010-12-21, 22:34:00)Mikael Gustafsson Wrote: If possible, please try in Windows and GUI in Linux.
No success with the GUI in Linux (same problem: timeout). I've been moving my Windows systems from desktop boxes to Virtual Machines under Virtual Box on Linux (Ubuntu) and I've had mixed experiences with accessing USB devices from the virtual machines. I was able to use my PICkit 3 from MPLAB on Windows in the virtualised environment but ds30 Loader in the same environment still reported timeout.

I still have one "bare metal" Windows machine I can try this on but will have to do some work to free up enough space to install the .NET framework ds30 Loader needs.

(2010-12-21, 22:34:00)Mikael Gustafsson Wrote: Do you have a real pic programmer? If so, verify that the bootloader is still there.
Yes, PICKit 3 but I can't access it from MPLABX 4 (known problem in this revision of MPLABX)
Reply
#6
If you have an oscilloscope I suggest you use that to see what's going on.
Reply
#7
(2010-12-27, 00:25:33)Mikael Gustafsson Wrote: If you have an oscilloscope I suggest you use that to see what's going on.

Thanks for the suggestion. I don't have an oscilloscope. However I've been able to do some other debugging that strongly suggests that at least part of my problem is that the bootloader in the PIC seems to broken.

In the virtualised windows I am able to to use the PICKit 3 to reprogram the PIC with an application that flashes a couple of LEDs on the Web Platform in response to 'keyboard' commands sent over the 'USB serial port' on the web platform. Using Tera Terminal on the virtualised Windows platform I can control the LEDs on the Web Platform and get echo back from the PIC. But ds30Loader on this virtualised Windows system reports timeout using the same COM port. Since Tera Term can talk over COM6 to the Web Platform I would expect ds30Loader to be able to talk to the bootloader in the Web Platform.

If I shutdown the windows virtual machine and then reconnect my Web Platform to the Ubuntu 10.10 system over its USB port (no PICKit3) then I can use minicom to talk to /dev/ttyUSB0 and so control the WebPlatform LEDs.

Based on http://dangerousprototypes.com/2010/02/1...r-hacking/ I should just use the PICKit3 to program bootloader max frc 40MIPS abaud.hex into the WebPlatform and then ds30Loader (at least on Windows, and hopefully Ubuntu) should work. Correct?


Reply
#8
I suggest you use the official WebPlatform bootloader.
That one is a tweaked one that should generally not be used.
Reply
#9
(2010-12-27, 23:13:30)Mikael Gustafsson Wrote: I suggest you use the official WebPlatform bootloader.
OK, once I reprogrammed the boot loader into the web platform I was able to use ds30 Loader on both Ubuntu 10.10 (amd64) and the windows virtual machine.

Thanks for your help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)