Please check out this repo https://github.com/hathach/mynewt-tinyusb-exmaple For mynewt example