Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ matrix:
- pip install "Jinja2>=2.10.1,<2.11"
- pip install "intelhex>=1.3,<=2.2.1"
script:
- mbedtools checkout
- echo mbedtools build -t GCC_ARM -m ${TARGET_NAME} -b ${PROFILE}
- mbedtools build -t GCC_ARM -m ${TARGET_NAME} -b ${PROFILE}
- mbedtools deploy
- echo mbedtools compile -t GCC_ARM -m ${TARGET_NAME} -b ${PROFILE}
- mbedtools compile -t GCC_ARM -m ${TARGET_NAME} -b ${PROFILE}
- ccache -s

- <<: *cmake-build-test
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ add_subdirectory(${MBED_PATH})

add_executable(${APP_TARGET})

mbed_configure_app_target(${APP_TARGET})

mbed_set_mbed_target_linker_script(${APP_TARGET})

project(${APP_TARGET})

target_include_directories(${APP_TARGET}
Expand Down
64 changes: 43 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ The application can be built for the unsecure 6LoWPAN-ND or Wi-SUN network.

See the [6LoWPAN overview](https://os.mbed.com/docs/latest/reference/mesh-tech.html) for the definition of star and mesh networks. These same principles apply also to Wi-SUN protocol.

## Setup

### Download the application
## Mbed OS build tools

```
mbed import mbed-os-example-mesh-minimal
cd mbed-os-example-mesh-minimal
```
### Mbed CLI 2
Starting with version 6.5, Mbed OS uses Mbed CLI 2. It uses Ninja as a build system, and CMake to generate the build environment and manage the build process in a compiler-independent manner. If you are working with Mbed OS version prior to 6.5 then check the section [Mbed CLI 1](#mbed-cli-1).
1. [Install Mbed CLI 2](https://os.mbed.com/docs/mbed-os/latest/build-tools/install-or-upgrade.html).
1. From the command-line, import the example: `mbed-tools import mbed-os-example-mesh-minimal`
1. Change the current directory to where the project was imported.

### Mbed CLI 1
1. [Install Mbed CLI 1](https://os.mbed.com/docs/mbed-os/latest/quick-start/offline-with-mbed-cli.html).
1. From the command-line, import the example: `mbed import mbed-os-example-mesh-minimal`
1. Change the current directory to where the project was imported.


## Setup

### Change the channel settings (optional)

Expand Down Expand Up @@ -119,22 +127,10 @@ To use the S2LP, modify the `mbed_app.json` file by setting:

Note that the provide-default for each radio driver defaults to false, so there is no need to list all the possible drivers in the `mbed_app.json`.

### Compile the application

```
mbed compile -m K64F -t GCC_ARM
```

A binary is generated in the end of the build process.

### Connect the RF shield to the board

We are using the Atmel AT86RF233, which you can [purchase](https://l-tek.si/web-shop/l-tek-6lowpan-arduino-shield-2-4ghz/). Place the shield on top of your board, and power it up.

### Program the target

Drag and drop the binary to the target to program the application.

### Update the firmware of the border router

This example supports the following border router:
Expand All @@ -145,6 +141,25 @@ The border router supports [static and dynamic backhaul configuration](https://g

Remember to connect the Ethernet cable between the border router and your home/office router. Then power on the board.

## Building and running

1. Connect a USB cable between the USB port on the board and the host computer.
1. Run the following command to build the example project and program the microcontroller flash memory:

* Mbed CLI 2

```bash
$ mbed-tools compile -m <TARGET> -t <TOOLCHAIN> --flash
```

* Mbed CLI 1

```bash
$ mbed compile -m <TARGET> -t <TOOLCHAIN> --flash
```

Your PC may take a few minutes to compile your code.

## Testing

By default the application is built for the LED control demo, in which the device sends a multicast message to all devices in the network when the button is pressed. All devices that receive the multicast message will change the LED status (red LED on/off) to the state defined in the message. The following applies only to the case when the border router is set-up.
Expand Down Expand Up @@ -219,10 +234,17 @@ For devices with small memory, we recommend using release profiles for building

Examples:


* Mbed CLI 2

```bash
$ mbed-tools compile -m <TARGET> -t <TOOLCHAIN> --profile release
```
$ mbed export -m KW24D -i make_iar --profile release
OR
$ mbed compile -m KW24D -t IAR --profile release

* Mbed CLI 1

```bash
$ mbed compile -m <TARGET> -t <TOOLCHAIN> --profile release
```

## Troubleshooting
Expand Down