Crates.io | wio_lite_w600 |
lib.rs | wio_lite_w600 |
version | 0.3.1 |
source | src |
created_at | 2021-10-21 14:04:19.641669 |
updated_at | 2024-10-18 20:27:36.976747 |
description | Board Support crate for the Wio Lite W600 |
homepage | |
repository | https://github.com/atsamd-rs/atsamd |
max_upload_size | |
id | 468463 |
size | 28,878 |
This crate provides a type-safe API for working with the WIO Lite W600(https://wiki.seeedstudio.com/Wio-Lite-W600/).
Arduino15/packages/Seeeduino/tools/bossac/1.7.0[-arduino3]/
.
It's very important that you use this version only, as it is possible to lock yourself out of the board with
the wrong one. You can find Arduino15 in the following locations:
Arduino15
is likely something like ~/.arduino15/
Arduino15
is likely something like ~/Library/Arduino15
rustup target add thumbv6m-none-eabi
To build your example, you can either use arm-none-eabi-objcopy
or cargo-binutils
:
If using arm-none-eabi-objcopy
$ 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
$ 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):
~/Library/Arduino15/packages/Seeeduino/tools/bossac/1.7.0-arduino3/bossac --port=cu.usbmodem14601 -idewvRU target/blinky_basic.bin
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
$ 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.
~/Library/Arduino15/packages/Seeeduino/tools/bossac/1.7.0-arduino3/bossac --port=cu.usbmodem14601 -idewvRU target/blinky_basic.bin
Build the example
$ 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.
~/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 wio_lite_w600s 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)
$ screen /dev/cu.usbmodemWIO_LITE_W6001 9600
You can then press keys and you should get a response Eg:
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