Due to the newt package build system, Mynewt examples are better to be a spin-off from the main stack repo. To run the examples
- Firstly check out the official Mynewt documentation to set up and install newt tool
- Clone and install dependency repos
$ git clone https://github.com/hathach/mynewt-tinyusb-example.git
$ cd mynewt-tinyusb-example
$ newt install
Examples should be able to run with boards that are supported by Mynewt, provided that the mcu is already supported by TinyUSB stack. Following is board that is mainly used and tested
- Nordic nRF52840 Development Kit (aka pca10056)
- STM32F407g Discovery Note: work in progress, not able to blink LED just yet.
Build and load bootloader
$ newt build pca10056_boot
$ newt load pca10056_boot
Now we can build tinyusb example, create image and load it
This example enumerated as composite device with CDC, MSC and HID
$ newt build pca10056_cdc_msc_hid
$ newt create-image pca10056_cdc_msc_hid 1.0.0
$ newt load pca10056_cdc_msc_hid
This example enumerated as mass storage with dual ram disk
$ newt build pca10056_msc_dual_lun
$ newt create-image pca10056_msc_dual_lun 1.0.0
$ newt load pca10056_msc_dual_lun
Work in progresss, not able to blink LED just yet.