WIO Lite W600 Board Support Crate

This crate provides a type-safe API for working with the WIO Lite W600(https://wiki.seeedstudio.com/Wio-Lite-W600/).

Examples

Requirements

To build your example, you can either use arm-none-eabi-objcopy or cargo-binutils:

If using arm-none-eabi-objcopy

bash $ cargo build --release --example blinky_basic $ arm-none-eabi-objcopy -O binary target/thumbv6m-none-eabi/release/examples/blinky_basic target/blinky_basic.bin

Or, if using cargo-binutils

bash $ cargo objcopy --example blinky_basic --release -- -O binary target/blinky_basic.bin

For the purposes of simplicity, the documentation below will use cargo-binutils

To copy the example across, first you need to find the port the Wio Lite W600 is attached to. This can be done easily in the Arduino IDE or on nix based systems, you can find it inside the /dev directory. Note, it might not show up, until you put the device into bootloader mode by double tapping the reset button on the board.

For example, if your device attaches to /dev/cu.usbmodem14601 you will need cu.usbmodem14601 below.

You will also need to put the device into bootloader mode before copying the file by double tapping the reset button. Using the bossac you found above, with the previously found port that the device is attached to.

Example (your install location may vary):

bash ~/Library/Arduino15/packages/Seeeduino/tools/bossac/1.7.0-arduino3/bossac --port=cu.usbmodem14601 -idewvRU target/blinky_basic.bin

Example - Blinky Basic

Wiring

The onboard LED is attached to the W600 module, so blinky_basic uses pin D13 instead. In order to see the example work you must attach and LED and appropriate resistor to this pin.

c

Build the example bash $ cargo objcopy --example blinky_basic --release -- -O binary target/blinky_basic.bin

Connect the device and find what port it has connected using the steps above. Put the device into bootloader mode and then use Seeeduino's version of boassac to copy the file over.

bash ~/Library/Arduino15/packages/Seeeduino/tools/bossac/1.7.0-arduino3/bossac --port=cu.usbmodem14601 -idewvRU target/blinky_basic.bin

Example - USB ack

Steps

Build the example

bash $ cargo objcopy --example usb_ack --release -- -O binary target/usb_ack.bin

Connect the device and find what port it has connected using the steps above. Put the device into bootloader mode and then use Seeeduino's version of boassac to copy the file over.

bash ~/Library/Arduino15/packages/Seeeduino/tools/bossac/1.7.0-arduino3/bossac --port=cu.usbmodem14601 -idewvRU target/usb_ack.bin

Usually this is located in /dev/cu.usbmodemWIO_LITE_W6001. though if you have multiple wiolitew600s plugged in and running this example, the last number may change.

You can then send the USB device bytes. Each time the device receives data, it will respond with "Received: X" where X is the data that it received. To test this in a variety of ways but the easiest is probably with screen.

Connect to the device like this (9600 is the baud rate)

bash $ screen /dev/cu.usbmodemWIO_LITE_W6001 9600

You can then press keys and you should get a response Eg:

text Received: h Received: e Received: l Received: l Received: o Received: Received: w Received: o Received: r Received: l Received: d

To quit screen, use ctrl-a followed by crtl-\ then y