I'm using Eclipse under Ubuntu 14.04 to work on an STM32F4DISCOVERY I have set the system to flash my blinky project to the Discovery. After building the project I go to Run-> External Tools and hit Run to down load the code to flash but I get the following message on the Console window:
invalid command line
stlinkv1 command line: ./st-flash [--debug] [--reset] {read|write} /dev/sgX path addr <size>
stlinkv1 command line: ./st-flash [--debug] /dev/sgX erase
stlinkv2 command line: ./st-flash [--debug] [--reset] {read|write} path addr <size>
stlinkv2 command line: ./st-flash [--debug] erase
use hex format for addr and <size>
The External Tool Configurations I'm using is as follows:
Main-> Location /usr/local/bin/st-flash
Main -> Working Directory ${project_loc}/Release
Main -> Arguments:write${project_name}.bin 0x8000000
I have ran the following commands to check that everything is set correctly:
julio#julio-virtual-machine:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 008: ID 0483:3748 STMicroelectronics ST-LINK/V2
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
julio#julio-virtual-machine:~$ dmesg|tail -n 6
[ 3558.411428] usb 2-2.1: new full-speed USB device number 8 using uhci_hcd
[ 3558.690133] usb 2-2.1: New USB device found, idVendor=0483, idProduct=3748
[ 3558.690143] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3558.690148] usb 2-2.1: Product: STM32 STLink
[ 3558.690152] usb 2-2.1: Manufacturer: STMicroelectronics
[ 3558.690156] usb 2-2.1: SerialNumber: P\xffffffc3\xffffffbf\xffffffbfr\x06PfPQCH#\xffffffc2\xffffff87\xffffff87
julio#julio-virtual-machine:~/ARM ToolChain/gcc-arm-none-eabi-4_9-2015q2/bin$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Could you help me check if I'm missing something or if I'm doing it in a wrong way?
Thanks for your help
Related
I’m currently deploying a kvm/qemu virtual machine with mesos/marathon. In marathon, I’m using the built in mesos command executor and running the script.
virsh start centos7.0; while true; do echo 'centos 7.0 guest is running'; sleep 5; done
Note the while loop is there only to keep the task running. My issue is that I cannot get mesos to monitor the resource usage of the virtual machine.
When marathon deploys this task on a mesos-agent, it is creating a container that uses the memory and cpu cgroups.
/sys/fs/cgroup/cpu/mesos/31b48dc3-6f09-4b5a-8964-b82d711bb895
/sys/fs/cgroup/memory/mesos/31b48dc3-6f09-4b5a-8964-b82d711bb895
When the virtual machine is being kicked off, the virsh start command is sending a request to libvirtd. Libvirtd then reads the guest.xml file located in /etc/libvirt/qemu/ and then sends a request to the qemu/kvm driver to deploy it.
In my guest.xml file I’m using a custom partition cgroup slice to monitor my virtual machine usage.
https://libvirt.org/cgroups.html
(for each cgroup)
/sys/fs/cgroup/???/vmHolder.slice/machine-qemu\x2d1\x2dcentos7.0\x2dclone.scope
What I have tried.
I tried deleting my memory / cpu cgroup from this slice by doing
cgdelete -r cpu,memory:vmHolder.slice
and then adding my qemu guest process to the mesos controllers
cgclassify -g cpu,memory:mesos/31b48dc3-6f09-4b5a-8964-b82d711bb895 GUEST-PID
When I run the command cat /proc/5531/cgroup
11:perf_event:/vmHolder.slice/machine-qemu\x2d1\x2dcentos7.0\x2dclone.scope
10:pids:/
9:devices:/vmHolder.slice/machine-qemu\x2d1\x2dcentos7.0\x2dclone.scope
8:cpuset:/vmHolder.slice/machine-qemu\x2d1\x2dcentos7.0\x2dclone.scope/emulator
7:net_prio,net_cls:/vmHolder.slice/machine-qemu\x2d1\x2dcentos7.0\x2dclone.scope
6:freezer:/vmHolder.slice/machine-qemu\x2d1\x2dcentos7.0\x2dclone.scope
5:blkio:/vmHolder.slice/machine-qemu\x2d1\x2dcentos7.0\x2dclone.scope
4:hugetlb:/
3:cpuacct,cpu:/mesos/31b48dc3-6f09-4b5a-8964-b82d711bb895
2:memory:/mesos/31b48dc3-6f09-4b5a-8964-b82d711bb895
1:name=systemd:/vmHolder.slice/machine-qemu\x2d1\x2dcentos7.0\x2dclone.scope
It shows that I’m using those controllers, but when I run systemd-cgtop it's not adding the memory usage of the VM. I'm not sure what to do next. Any suggestions?
Hye. I'm trying to use a Kinect for XBox one on fedora 21. I installed freenect/openKinect using the official repository.
When i plug the Kinect on my computer dmesg | tail gives:
[ 2877.198513] usb 1-2: USB disconnect, device number 4
[ 2877.400501] usb 2-2: USB disconnect, device number 6
[ 2877.400512] usb 2-2.1: USB disconnect, device number 7
[ 2881.158423] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[ 2881.574851] usb 2-2: new SuperSpeed USB device number 8 using xhci_hcd
[ 2881.589681] usb 1-2: New USB device found, idVendor=045e, idProduct=02d9
[ 2881.589690] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2881.589694] usb 1-2: Product: NuiSensor Adaptor
[ 2881.589698] usb 1-2: Manufacturer: Microsoft Corporation
[ 2881.591297] hub 1-2:1.0: USB hub found
[ 2881.591616] hub 1-2:1.0: 1 port detected
[ 2884.550626] usb 2-2: New USB device found, idVendor=045e, idProduct=02d9
[ 2884.550638] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2884.550643] usb 2-2: Product: NuiSensor Adaptor
[ 2884.550648] usb 2-2: Manufacturer: Microsoft Corporation
[ 2884.551941] hub 2-2:1.0: USB hub found
[ 2884.552474] hub 2-2:1.0: 1 port detected
and lsusb gives:
Bus 004 Device 004: ID 5986:0315 Acer, Inc
Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 011: ID 045e:02c4 Microsoft Corp.
Bus 002 Device 010: ID 045e:02d9 Microsoft Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 045e:02d9 Microsoft Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
but i can't find any knew device knew device /dev/ and when i try the demonstration program it doesn't find the device and show:
Kinect camera test
Number of devices found: 0
Did anyone succeed to use freenect on fedora?
Are you using appropriate AC adaptor to connect the sensor to PC?!
I had a similar issue and I kept trying every thing for days, and finally the issue turned to be from the kinect AC adaptor... I tried it with the official windows sdk and developer toolkit, when I attempted one of the example codes the issue persists to appear but with a clear message asking to plug the power cord in, though the adaptor is brand new!!
I searched for some information a bout the AC adaptor and it seems that there is a problem with the adaptor, and most importantly the Kinect manual states that any unoriginal adaptors may cause the device to fail - also the manual says that original AC adaptor power output is 12V-1.1A while the one I have is rated 12V-1.08A (no big deal but who knows)
Kinect for Xbox 360 freezes and disconnects from USB after running Processing SimpleOpenNi depth image example
I am trying to attach ipad2 usb device by using virsh from host ubuntu 12.10 to OpenSuse 13, it returns success, but I can not find it on vm, any suggestions?
Host: ubuntu 12.10
VM: OpenSuse 13
===HOST===
root#o-ubuntu-103:/image# more usb_ipad2.xml
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x05ac'/>
<product id='0x129f'/>
</source>
</hostdev>
root#o-ubuntu-103:/image# virsh attach-device suse13-001 usb_ipad2.xml
Device attached successfully
root#o-ubuntu-103:/image# lsusb
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 003 Device 036: ID 05ac:129f Apple, Inc. iPad 2
Bus 003 Device 040: ID 04e8:6866 Samsung Electronics Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
===VM===
v-suse-33:/home/aaron # lsusb
Bus 001 Device 003: ID 0409:55aa NEC Corp. Hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
You may want to attach the USB device with your VM directoly, either use the virt-manager GUI there is a graphical interface to add USB devices), either add line that seems as
<hostdev mode='subsystem' type='usb' managed='yes'>
<source startupPolicy='optional'>
<vendor id='0x03f0'/>
<product id='0x4217'/>
</source>
</hostdev>
<!--- TIMBER !!! this depend upon your USB device and machine would fail
to start if you miss, use the GUI instead! --->
I read this : https://askubuntu.com/questions/828823/virtual-machine-manager-error-did-not-find-usb-device
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've been installing multiple versions of ubunutu over years and now I better understand why I faced always problems with wifi configuration on these different baselines : Debian root of course.
Issue
Now on Debian 7.4 :
The Broadcom BCM4313 driver is not loaded by default (not free product) for my wifi card. This is stated thru the UNCLAIMED declaration when looking at the network hardware status excerpt :
sudo lshw -c network
*-network UNCLAIMED
description: Network controller
product: BCM4313 802.11b/g/n Wireless LAN Controller
vendor: Broadcom Corporation
physical id: 0
bus info: pci#0000:03:00.0
version: 01
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress cap_list
configuration: latency=0
resources: memory:f1100000-f1103fff
Unclaimed means : no driver found (no kernel association)
So I installed the driver located in the non-free backports by adding this target into the local packages repository /etc/apt/sources.list
deb http://http.debian.net/debian/ wheezy main contrib non-free
and install :
sudo apt-get update && sudo apt-get install firmware-brcm80211
sudo modprobe brcm80211
and restart
sudo shutdown now -r
Check seems OK :
sudo lshw -c network
*-network
description: Wireless interface
product: BCM4313 802.11b/g/n Wireless LAN Controller
vendor: Broadcom Corporation
physical id: 0
bus info: pci#0000:03:00.0
logical name: wlan0
version: 01
serial: 78:e4:00:4e:49:a3
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=brcmsmac driverversion=3.2.0-4-amd64 firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn
resources: irq:19 memory:f1100000-f1103fff
Network Configuration
minimal /etc/network/interfaces as required by NetworManager
auto lo
iface lo inet loopback
.. and restart
Failure
No wifi network is detected and of course I can't connect using wlan0
it doesn't work.
I found informations here regarding WPA2/PSK wifi configuration on debian :
http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_wireless_lan_interface_with_wpa_wpa2
so I added this setup to my interfaces file an got :
auto lo
iface lo inet loopback
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid Hznteam-Datacenter
# hexadecimal psk is encoded from a plaintext passphrase
wpa-psk 12345678901234567890123456
Same as above no wifi network detected and ifconfig gives no allocated ip address :
wlan0 Link encap:Ethernet HWaddr 78:e4:00:4e:49:a3
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0:avahi Link encap:Ethernet HWaddr 78:e4:00:4e:49:a3
inet addr:169.254.7.34 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
Note that my required WPA2/PSK AES key length is 26 chars as requested on my other PC that connect successfully to my wifi router
Any idea ? it's boring wasting hours on the same problem again ..
Help welcome ...
Wrong wifi kernel module selected
I should have installed the brcmsmac module instead of the brcm80211 one. The latter is the Squeeze version kernel module. Wheezy needs the brcmsmac module as mentioned here
Althouhg the package is named brcm80211 the kernel module to load for Wheezy is brcmsmac instead of brcm80211 for the Squeeze version
more detail in this StackoverFlow post and a summary is also available here
Interfaces
I also set the /etc/network/interfaces conf file to only
$ sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback
this seems to allow Network-Manager to take any discovered interfaces in account.
Everything's OK. Wifi up and running now.
.. And so much wasted time for a stupid version error !
So I am using XBMC (a media center program) that has an Android app with a feature that allows you to send Wake on LAN "magic packets" to computers you have XBMC installed on. While this would be a great feature for me if I had a dedicated media PC that auto-ran XBMC on startup, I use it instead on my normal desktop PC.
What I would like to do is see if I can write a little listener script that would run on my PC that would listen for those magic packets sent over port 9 and just start the XBMC application.
Some of my friends say that you cannot listen on this port. The Google searches on "port 9", "wake on lan", and "simple TCP/IP" I've performed remain inconclusive as to weather or not this is possible.
With Python and pcap (winpcap and pypcap http://code.google.com/p/pypcap/). Not very nice but works for me.
import os, pcap
pc = pcap.pcap()
pc.setfilter('udp port 9 and (udp[8:4] == 0xFFFFFFFF and udp[12:2] == 0xFFFF)')
for ts, pkt in pc:
os.system(r'"C:\Program Files (x86)\XBMC\xbmc.exe"')
You should be able to do this on a Windows PC. However your program will not run on a *Nix style system without having superuser, or using a privilege escalator program like jsvc.