CodeWarrior 10 Eclipse Linux : Getting USB P&E Multilink drivers to work (HCS08)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeWarrior 10 Eclipse Linux : Getting USB P&E Multilink drivers to work (HCS08)

11,600 Views
pgrondin
Contributor I

I am looking to find a way to get the USB P&E Multilink drivers working with CodeWarrior 10 for Linux

 

I looked for some procedures on the beta site but did not find anything. I saw that RedHat Enterprice 5.2 is supported somewhere in the CW10 documentation but I guess the real answer is that CW is not that limited regarding Linux distribution.

 

I tried with Ubuntu 9.10 x64 and Ubuntu 9.10 x86 without success. In both cases CW10 ran fine but when I tried to debug the code with the P&E Multilink for a HCS08, the Multilink is not found (GDI not found error)

 

Looking at the installation, there is a P&E folder is /usr/local so I tried to recompile et reinstall the driver but it did not work. On x64, it simply does not compile while on x86, it compiles but does not install complaining about a missing usbfs.

 

I am willing to switch Linux distribution if needed.

 

Thanks for the help.

 

Pierre

Labels (1)
0 Kudos
41 Replies

2,043 Views
jcottier
Contributor II

I used CW10.1 and 10.2 on Ubuntu 10.04, which worked well except for have to manually load the windriver module after each reboot. Plus the PE Micro driver had to reinstalled on every kernel update.

However when I updated to Ubuntu 12.04, the driver would not install at all and the PE Micro installer script generated errors indicating it could find various kernel related files.

I contacted PE Micro via their support, and they recommended to use the libusb driver which is now their recommended driver:- sudo "setup.sh" in ../Drivers/pemicro/libusb_64_32. The lastest PE micro driver is currently avaliable at http://www.pemicro.com/downloads/user_downloads_temp/201211020440131152306316306/PemicroLinuxDrivers...

But I dont know how long that link will be active.

This driver does not work terribly well. It usually fails on the first attempt by the CW IDE to invoke the "3rd party tools". But when you terminate the launch and relaunch debug then it seems to download and work fine. Maybe this is a CW fault and not PE Micro's. But on the plus side, it works from boot without having to install the driver module, and no lock ups yet. The old driver regularly used to lock up the cwde process. But again, maybe this is a Freescale CW issue.

0 Kudos

2,042 Views
inove
Contributor I

Has anyone successfully used the WinDriver 11.10 32-bit Ubuntu?
The CodeWarrior works, but the driver of thePEmicro Multilink does not work. I tried in various ways, but I could not install windrvr6. During installation the message "This kernel is too recent: not supported by this file."

0 Kudos

2,042 Views
zdenojanoska
Contributor I

Hi, 

I tried to install driver on Ubuntu 11.04 - 2.6.38 over week with no success :smileysad:

Olso sent a request to the PEMicro support for a driver without any response...

At the end I install older kernel 2.6.32-37 and CW10.1 with driver. In the begining I must chose right kernel for booting.

CW works well.

I think it's only way how to run CW without changing OS (install another partitions) . You may have problem with drivers when you switch from one to another kernel but other sw should work fine.

Does someone have another idea for newer kernels?

Nice day

Z

0 Kudos

2,042 Views
sachokFoX
Contributor I

Hello! I find some solution - freescale-club.ru but it does not work for me. I create *.diff file and then use patch utility. Maybe I do something wrong. If find solution, please, reply!

My OS - ubutnu 11.04 with 2.6.38-13

0 Kudos

2,042 Views
CamiloA_
Contributor III

I'm try install CW10.1 on Ubuntu 12.04 but I can't.

 

Then when freescale release CW10.2 I try again to install and works fine!.

0 Kudos

2,047 Views
goronyan
Contributor I

 

I think there is no hope for our P&E multilink in linux x64. 

 

I looked allover the windriver webpage (the programmers of our multilink drivers) but i could not find support for 64 bit.

but there is hope, the osbdm should work  on x64 but i have not tried yet.

 

I could install CW 10 without much problem  

 

To use MQX, i had to uncompress the files (run the installation .exe file with wine or windows) , copy the files to the workspace and manually link the libraries to my project.

I could compile successfully my project, but sadly, i cannot use the MQX wizzard. It would be necesary to modify some of the plugin files. 

 

THIS IS TRUE FOR ANY LINUX FLAVOR /  32-64 BITS

 

 

 

 

 

0 Kudos

2,048 Views
xtronics
Contributor I
The question is if multi-link at least works under i86? I'm setting up a box next week to find out.
0 Kudos

2,048 Views
xtronics
Contributor I

It appears that you need to setup a command in /etc/rc.local

I'm still getting :

Error initializing Debug Database.
Could not load debug database. This is indicative of an installation or configuration problem. Please contact customer support.


Can someone confirm if this is due to the failure of PEsrv ?

0 Kudos

2,048 Views
xtronics
Contributor I

 

It appears that PE multilink isn't working on Linux even on i386 ?

 

The PEmicro tab is dimmed - I've confirmed that the module is loaded

 

$ lsmod |grep wind
windrvr6              161735  0

 

Any other clues - or perhaps I've wasted enough time on this?

 

 

 

 

 

0 Kudos

2,048 Views
mdelac01
Contributor I

WORKAROUND THAT WORKS FOR ME!

 

Ok, as I posted earlier, I could not get Codewarrior 10 Eclipse to recognize the USB P&E Multilink before.

Now it is working for me after doing the following steps once every time I reboot my linux box.

 

/PATH/TO/CODEWARRIOR_MCU_10.0/Drivers/pemicro$ sudo sh setup.sh  (reinstall drivers)

/PATH/TO/CODEWARRIOR_MCU_10.0/eclipse sudo ./cwide  (execute CW10 with root privilages)

 

I know that this is not the final solution, but when I do this, I am able to flash, debug my HCS08 hardware using the P&E USB Multilink and CW10.   

 

I hope this works for everyone else.

Does this work for anyone else?

 

 

 

 

###########################################################################

MORE INFO:

MY SYSTEM:  Ubuntu 10.04, 32 bit machine, 32 bit OS.

 

I get the following output when I run the sh setup.sh command to re-install driver:

(I just pasted the last part of it)

...

 

Installing the WinDriver kernel module(s)
-----------------------------------------
WinDriver's kernel modules (windrvr6.ko and windrvr6_usb.ko)
can be reloaded upon every boot.
The kernel module will be loaded after running the wdreg script upon boot
in the following manner:
    <path to the wdreg script>/wdreg windrvr6 auto
Alternatively you can manually load the kernel module as explained
in WinDriver's User's Manual.
It is recommended to add this call in your rc.local file.
NOTE: Due to security reasons, by default, /dev/windrvr6 is created with
permissions only for the root user. To enable other user access,
change the permissions of /dev/windrvr6
mount: unknown filesystem type 'usbfs'
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
make[1]: Leaving directory `/usr/local/PEMicrocomputerSystems/windriver/redist'
setup.sh: 57: Bad substitution

 

Installing the WinDriver kernel module(s)-----------------------------------------WinDriver's kernel modules (windrvr6.ko and windrvr6_usb.ko)can be reloaded upon every boot.The kernel module will be loaded after running the wdreg script upon bootin the following manner:    <path to the wdreg script>/wdreg windrvr6 autoAlternatively you can manually load the kernel module as explainedin WinDriver's User's Manual.It is recommended to add this call in your rc.local file.

NOTE: Due to security reasons, by default, /dev/windrvr6 is created withpermissions only for the root user. To enable other user access,change the permissions of /dev/windrvr6
mount: unknown filesystem type 'usbfs'

WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.make[1]: Leaving directory `/usr/local/PEMicrocomputerSystems/windriver/redist'setup.sh: 57: Bad substitution

 

 

0 Kudos

2,043 Views
xulioc
Contributor I

Thanks for your tips!

 

I had to tweak some files in order to make it work.

 

configure:    echo “#include <generated/autoconf.h>” >> hello.c
configure.usb:            echo “#include <generated/utsrelease.h>” > hello.c
configure.wd:            echo “#include <generated/utsrelease.h>” > hello.c

 

http://xulioc.wordpress.com/2010/10/25/codewarrior-10-eclipse-usb-pe-multilink-and-ubuntu-10-10/

 

Regards.

0 Kudos

2,048 Views
xtronics
Contributor I

mdelac01 - do you have this line in /etc/rc.local ?

/usr/local/Freescale/CodeWarrior_MCU_10.0/Drivers/pemicro/windriver/redist/wdreg windrvr6 auto
chown user.user /dev/windrvr6
chmod 777 /dev/windrvr6

 

,.,.,.,.,.,.,.,.

 

sledge -

Which version are you running - the isn't that special version for Linux MCU I found is different than the evaluation version.

(Who knows why).

 

The problem you are having is different - I'm running Debian squeeze - i386 2.6.32-5-686

,.,.,.

 

The PE effect I now see is the menu is there at startup - but dims after a couple of seconds. 

 

Does the BDM device have to be powered up (yellow LED lit) for the menu item to stay un-dimmed ?

 

 

 

 

 

0 Kudos

2,048 Views
sledge
Contributor I

 


xtronics wrote:

,.,.,.,.,.,.,.,.

 

sledge -

Which version are you running - the isn't that special version for Linux MCU I found is different than the evaluation version.

(Who knows why).

 

The problem you are having is different - I'm running Debian squeeze - i386 2.6.32-5-686


 

xtronics, I am running a Special Edition. Eval version did not install, because of the corrupted install file. I might try to re-download and re-try the eval version.

But as far as I remember my first attempts with 8.10 EasyPeasy distro ended up with the same USB Debug error even whilst trying the Eval version (had a non-corrupted one).

 

Many thanks;

 

--&nbsp:

sledge

0 Kudos

2,048 Views
sledge
Contributor I

It works, having booted back to Ubuntu 10.04, mounted the Special Edition installation from the 10.10 partition, ran pemicro setup.sh, and the only difference was that the windrv6_usb driver was built, too, and insmodded correctly.

 

This resulted in a successful debug session, having the board flashed with the hello world binary.

 

Great success!

Now for the curious investigators it is time to find out, why windvr6_usb does is not insmodded and/or built (only windrv6.ko is)

 

-- 

sledge

0 Kudos

2,048 Views
namaquaguy
Contributor I

Hi sledge

 

I am somewhat confused. Having tried everything you and the other guys suggest, I still cannot get my P&E USB Multilink BDM to work on either 9.10 or 10.04 (two different computers). I eventually contacted the local Freescale distributor in South Africa, who took up the matter with P&E Microcomputer Systems. Someone from P&E contacted me and suggested that I download some drivers from their website. I tried, but it turned out that the file was a Windows executable. When I mentioned this to P&E, I received this reply:

 

"We don't currently support Ubuntu 10.04 (or 9.10 for that matter) as all of our tests were done with 9.04 and 8.10."

 

You said that you managed to get it working on 10.04? I wonder why I can't. The BDM works, because I frequently use it with CodeWarrior 6.3 on a Windows installation. This is the only thing standing in my way to move over totally to Ubuntu.

 

namaquaguy

0 Kudos

2,044 Views
sledge
Contributor I

namaquaguy,

 

What errors do you get? Is windrvr6 and windrvr6_usb both insmodded? (check with lsmod)

 

PS to all: I found out, that usbfs is not needed for this to function. I still get mount: usbfs filesystem type not supported; during ./setup.sh installation, but BDM works fine (10.04)

0 Kudos

2,043 Views
xtronics
Contributor I

namaquaguy -

 

Here is a big clue.. Out of frustration, I took my wifes netbook that had xp on it loaded up CW-4-up-windoze-special and the first thing it did was update the firmware in the P&E pod (not the target ) - not once -  but three times! (probably had to go from v1 => v2 => v3  This was on a brand new P&E multilink.

 

So reading inbetween the lines  - it appears that the driver in the Linux version lacks this ability - seems to be a software artifact from the bronze age  before 64 bit systems - and lacking the standard features of the windoze version.

 

I'm still testing, but I will note what happens on my wiki page on CW..  Hoping it will stop dropping crash logs etc..

 

I've also ordered a pod from http://www.flashgenie.net/USBDM.html - this has opensource drivers so one should be able to compile a 64bit version..  Not sure what if any differences in the feature set.

 

Sledge -

 

Did you ever have your multilink attached to a windoze box?

 

 

 

 

0 Kudos

2,043 Views
namaquaguy
Contributor I

Hi all, thanks for the advice, but I seem to be getting nowhere fast.

 

P&E Micro sent me another file with drivers, which I installed with sudo sh setup.sh. This seems to have solved the previously encountered errors, but it would appear that the BDM is not actually communicating with the target board.

 

I have programmed the target to flash a LED - I did this on Windows running CodeWarrior 6.3. On Linux, I followed the instructions in the documentation on how to import a program flash task for HCS08. When I start the task, all the commands and results are displayed in the console, and I get messages such as 'Erase Command Succeeded', 'Status Checking Succeeded. MC9S08QG8_FLASH  Blank' etc. Then it starts to 'program', but hangs up at 46% as shown in the status bar. In the meantime the LED on the target keeps flashing happily, telling me that the BDM didn't actually do the erasing, blank checking and programming.

 

Has anyone experienced this?

0 Kudos

2,043 Views
xtronics
Contributor I

namaquaguy

 

Those are the same symptoms I had before setting up the configure file to say KERNEL_DIR="/usr/src/linux"

 

(of course you have the have your linux-headers installed..)

 

I would be interested in seeing the files they sent you -  karl (at) xtronics.com

 

Please also send me the output of your

$ uname -a 

$ lsmod |grep wind

$ ll /dev |grep wind

 

If you are working with a 64 bit system - I don't think it will work - the build files have hooks for compiling to 64 bits, but the supplied lib is just for 32 bit machines - so to use that pod it seems a minimum of installing as 32bit is needed (it could be they sent you the 64 bit libs in those files? )

 

Some of the things mentioned above are not correct - it I have it working without runnng as root. The fix that xulioc mentioned didn't work for me - it did help me find the real problem..

 

Things are still a bit of a mess - the version of Java they include with CW contains known security vulnerabilities - not sure if it is used in any way that puts a machine at risk ( "As of November 3, 2009 version 5 of Java was declared End of Life by Sun" - best I can tell this version is from 2005  - I did some tests that suggest that it should run fine under a current java release - build 1.6.0_22-b04)

 

I'm still waiting for the OSBDM pod to arrive to test for use on a 64bit machine.

 

There is also a problem that Codewarrior driver drops some hidden files in /etc   .windriver.rc and .java/  that shouldn't be there and didn't get cleaned on uninstall.

 

 

 

0 Kudos

2,043 Views
namaquaguy
Contributor I

xtronics

 

Thanks for your help. The guy from P&E Micro has since admitted that he has been sending me old drivers! :smileysad:

 

Anyway, I re-installed the drivers that came with CW 10.0, so I am at least back to that point. Next, I want to try your other suggestions, but first I'd like to remove CW from my Ubuntu 9.10 machine, because I now have two installations on the same machine. Also, I want to upgrade to 10.04.1 today. Then I can start from scratch again.

 

Any suggestions as to how I should go about to remove CW? Obviously Synaptic Package Manager and apt-get won't work.

0 Kudos