element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Moto Mods
  • Products
  • Manufacturers
  • Moto Mods
  • More
  • Cancel
Moto Mods
Blog Moto Mods usb2 Walkthrough
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Moto Mods to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: motomodsdev
  • Date Created: 7 Mar 2017 10:18 PM Date Created
  • Views 1566 views
  • Likes 2 likes
  • Comments 2 comments
Related
Recommended

Moto Mods usb2 Walkthrough

motomodsdev
motomodsdev
7 Mar 2017

imageimage

 

This details the steps to use the usb2 sample project with your Moto Mods Development Kit.  Hat tip to Screen mirroring a Moto Z to HDMI, with the Moto Mod Development Kit (MDK) for the structure (and the great details).

Ingredients

  1. Moto Z, Moto Z Force, or Moto Z Play phone
  2. Moto Mods Development Kit
  3. USB OTG cable (MicroUSB)
  4. USB 2.0 Thumb Drive (or other USB 2.0 device)
  5. MDK Utility app (from the Play Store)

 

Instructions

Building your Firmware

The firmware used is the unmodified MDK-USB2 example.  This is the usb2 project in nuttx/configs/muc.

  1. Setup your build environment as per Embedded Firmware Development
  2. Download the source, stopping after build/install kconfig-mconf as per Developer Tools: Build from Source: Build Firmware
    1. Create a BUILD_TOP environment variable with the path to the cloned repositories
  3. Build the usb2 firmware with the following commands

    $ export PATH=$PATH:$BUILD_TOP/manifesto:$BUILD_TOP/bootrom-tools

    $ cd $BUILD_TOP/nuttx/nuttx

    $ make distclean

    $ cd $BUILD_TOP/nuttx/nuttx/tools

    $ ./configure.sh hdk/muc/usb2

    $ cd $BUILD_TOP/nuttx/nuttx

    $ make

  4. The compiled firmware is in the nuttx.tftf file.  Transfer this file to your Moto Z with adb, an SD Card, or a file sharing service such as Dropbox or Drive.

Configure the MDK

  1. Detach the MDK from the Moto Z and remove any board or personality card.
  2. On the MDK, set dip switch A3 to ON
  3. Set the remaining dip switches to OFF.
  4. Reattach the MDK to the Moto Z.

Flash the Firmware

  1. Install MDK Utility on your Moto Z.
  2. Set the Mode to Developer Mode (if not there already)
  3. Tap Select File(s) and choose your nuttx.tftf file you built earlier
  4. Tap Perform Update
  5. When prompted whether to update unsecure firmware, select CONTINUE
  6. A Toast message will appear reading Firmware update successful
  7. In the MDK Utility, the Moto Mods Status should now read:
    NameMDK-USB2
    VID0x00000042
    PID0x00000001
    Firmware0x00000001
    Package NameDefault

Attach your USB 2.0 Device

  1. Plug your USB device into the OTG adapter
  2. Plug the OTG adapter into USB #3 (the bottom and only microUSB port on the MDK)

 

Note: USB 2.0 devices can also be used through the USB #2 (TypeC middle port on the MDK).  You will need a TypeC OTG cable.  When using the TypeC port for USB 2.0, set A4 to ON and all other dip switches OFF.

Really Note: The TypeC port does not auto-swap.  If things should be working but aren't, try flipping the cable over.

  • Sign in to reply
  • slkow
    slkow over 7 years ago

    Thanks! It works for me

     

    Is it possible to enable charging (and control it from app, like from blink example) in this firmware?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • msp
    msp over 8 years ago

    Is this firmware needed when using USB on the perforated board?  I cannot seem to get this to compile, can you possibly make the .tftf file available?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube