Skip to content

Commit

Permalink
README polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemekWirkus committed Nov 18, 2015
1 parent fa37d86 commit 5f0b597
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,15 @@ Mock configuration will be stored in directory where ```mbedls --mock``` command
## Mock command line examples
* Add new command line parameter ```--mock``` (switch -m)
* Add new / mask existing mapping ```MID``` -> ```platform_name``` and assign MID
* ```$mbedls --mock MID:PLATFORM_NAME``` or
* ```$mbedls --mock MID1:PLATFORM_NAME1,MID2:PLATFORM_NAME2```
* ```$ mbedls --mock MID:PLATFORM_NAME``` or
* ```$ mbedls --mock MID1:PLATFORM_NAME1,MID2:PLATFORM_NAME2```
* Mask existing manufacturers ID with new platform name
* Remove masking with '!' prefix
* ```$ mbedls --mock !MID```
* Remove all maskings using !* notation
* ```$ mbedls --mock !*```
* Combine above using comma (```,```) separator:
* ```$mbedls --mock MID1:PLATFORM_NAME1,!MID2```
* ```$ mbedls --mock MID1:PLATFORM_NAME1,!MID2```

## Mocking example with Freescale K64F platform
Initial setup with 1 x Freescale ```K64F``` board:
Expand All @@ -341,19 +341,19 @@ $ mbedls

* We can mask current mapping ```0240``` -> ```K64F``` to something else. For example we can replace ```K64F``` name with maybe more suitable for us in current setup ```FRDM-K64F```:
```
$ mbedls --mock 0240:FRDM_K64F
$ mbedls --mock 0240:FRDM_K64F
```
Current mocking mapping is stored in local file ```.mbedls-mock```:
```
$ cat .mbedls-mock
$ cat .mbedls-mock
{
"1234": "NEW_PLATFORM_1",
"0240": "FRDM_K64F"
}
```
We can observe changes immediately. Please note this change only works in the same directory because we save ```.mbedls-mock``` file locally:
```
$ mbedls
$ mbedls
+--------------+---------------------+------------+------------+-------------------------+
|platform_name |platform_name_unique |mount_point |serial_port |target_id |
+--------------+---------------------+------------+------------+-------------------------+
Expand All @@ -372,7 +372,7 @@ $ mbedls --mock !1234 --json

* We can add multiple mappings at the same time:
```
$ --mock 0000:DUMMY,1111:DUMMY_2 --json
$ mbedls --mock 0000:DUMMY,1111:DUMMY_2 --json
{
"1111": "DUMMY_2",
"0240": "FRDM_K64F",
Expand Down

0 comments on commit 5f0b597

Please sign in to comment.