Skip to content

Commit 4a84753

Browse files
committed
Merge pull request #61 from ARMmbed/docs_usbmount
Add usbmount instructions
2 parents 837bbb7 + 3a8bebd commit 4a84753

File tree

1 file changed

+67
-14
lines changed

1 file changed

+67
-14
lines changed

README.md

Lines changed: 67 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# Table of contents
66

7+
* [Table of contents](#table-of-contents)
78
* [Description](#description)
89
* [Rationale](#rationale)
910
* [Installation](#installation)
@@ -20,6 +21,10 @@
2021
* [Mock command line examples](#mock-command-line-examples)
2122
* [Mocking example with Freescale K64F platform](#mocking-example-with-freescale-k64f-platform)
2223
* [mbed-ls unit testing](#mbed-ls-unit-testing)
24+
* [Configure mbed-enabled device to work with your host](#configure-mbed-enabled-device-to-work-with-your-host)
25+
* [Windows serial port configuration](#windows-serial-port-configuration)
26+
* [Mounting with sync](#mounting-with-sync)
27+
* [Ubuntu](#ubuntu)
2328
* [Known issues](#known-issues)
2429

2530
# Description
@@ -33,19 +38,15 @@ Currently supported operating system:
3338
* Linux (generic).
3439
* Mac OS X (Darwin).
3540

36-
The stand-alone mbed-lstools Python package is still under development, but it's already delivered as part of the mbed SDK's test suite and a command line tool (see below).
37-
3841
# Rationale
3942

4043
When connecting more than one mbed-enabled device to the host computer, it takes time to manually check the platforms' binds:
4144

42-
* Mount point (disk).
43-
* Virtual serial port.
45+
* Mount point (MSD / disk).
46+
* Virtual serial port (CDC).
4447
* mbed's TargetID and generic platform name.
4548

46-
mbedls provides these points of information for all connected boards at once in a simple console (terminal) output.
47-
48-
**Tip:** Because we are all automation fanatics, the ```mbedls``` command will also output mbed-enabled auto-detection data in JSON format (see below).
49+
```mbed-ls``` provides these points of information for all connected boards at once in a simple console (terminal) output.
4950

5051
# Installation
5152

@@ -55,12 +56,7 @@ mbed-ls module is redistributed via PyPI. We recommend you use the [application
5556

5657
**Note:** Python 2.7.9 and later (on the Python 2 series), and Python 3.4 and later include pip by default, so you may have pip already.
5758

58-
To install mbed-ls from Python Package Index use command:
59-
```
60-
$ pip install mbed-ls
61-
```
62-
63-
To install latest version use command:
59+
To install mbed-ls from [PyPI](https://pypi.python.org/pypi/mbed-ls) use command:
6460
```
6561
$ pip install mbed-ls --upgrade
6662
```
@@ -76,7 +72,7 @@ To install the mbed-ls module:
7672
Clone the mbed-ls repository. The following example uses the GitHub command line tools, but you can do this directly from the website:
7773

7874
```
79-
$ git clone <link-to-mbed-ls-repo>
75+
$ git clone https://github.com/ARMmbed/mbed-ls.git
8076
8177
```
8278
Change the directory to the mbed-ls repository directory:
@@ -532,6 +528,63 @@ Ran 18 tests in 0.302s
532528
OK
533529
```
534530

531+
# Configure mbed-enabled device to work with your host
532+
533+
## Windows serial port configuration
534+
535+
The mbed serial port works by default on Mac and Linux, but Windows needs a driver. Check [here](https://developer.mbed.org/handbook/Windows-serial-configuration) for more details.
536+
537+
## Mounting with sync
538+
While working under Ubuntu/Linux/OSX OSs you will have to mount your mbed-enabled device. You can follow instructions how to do it [here](https://developer.mbed.org/handbook/Mounting-with-sync).
539+
540+
### Ubuntu
541+
We recommend you use ```usbmount``` package to auto-mount mbed devices plugged to your host system:
542+
543+
* Install ```usbmount```:
544+
545+
```
546+
$ sudo apt-get install usbmount
547+
```
548+
549+
* Make copy of ```/etc/usbmount/usbmount.conf```:
550+
551+
```
552+
$ sudo cp /etc/usbmount/usbmount.conf /etc/usbmount/usbmount.conf.bak
553+
```
554+
555+
* Modify ```/etc/usbmount/usbmount.conf``` file as follows:
556+
557+
```
558+
ENABLED=1
559+
560+
MOUNTPOINTS="/media/usb0 /media/usb1 /media/usb2 /media/usb3
561+
/media/usb4 /media/usb5 /media/usb6 /media/usb7
562+
/media/usb8 /media/usb9 /media/usb10 /media/usb11
563+
/media/usb12 /media/usb13 /media/usb14 /media/usb15
564+
/media/usb16 /media/usb17 /media/usb18 /media/usb19"
565+
566+
FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus"
567+
568+
MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime"
569+
570+
FS_MOUNTOPTIONS="-fstype=vfat,gid=USERGROUP,uid=USERNAME,dmask=000,fmask=000"
571+
572+
VERBOSE=no
573+
```
574+
575+
*Note*: In line:
576+
```
577+
FS_MOUNTOPTIONS="-fstype=vfat,gid=USERGROUP,uid=USERNAME,dmask=000,fmask=000"
578+
```
579+
change ```USERGROUP``` and ```USERNAME``` to your user and group names.
580+
581+
You can check user "USERNAME" group by typing:
582+
```
583+
$ groups USERNAME
584+
```
585+
586+
This ```usbmount``` configuration will auto-mount your mbed devices without need to type ```mount``` commands each time you plug your mbeds!
587+
535588
# Known issues
536589
* Users reported issues while using ```mbed-ls``` on VM (Virtual Machines).
537590
* [mbedls fails to list devices on OS X El Capitan](https://github.com/ARMmbed/mbed-ls/issues/38).

0 commit comments

Comments
 (0)