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 Developer Part 5 - Flashing Firmware with MDK Utility
  • 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: Catwell
  • Date Created: 12 May 2017 8:15 PM Date Created
  • Views 2176 views
  • Likes 2 likes
  • Comments 1 comment
  • smartphone
  • developer
  • moto-z
  • motorola
  • embedded
  • mobile
  • cabeatwell
  • moto mdk
  • mdk
  • motomods
  • develop
Related
Recommended

Moto Mods Developer Part 5 - Flashing Firmware with MDK Utility

Catwell
Catwell
12 May 2017

Index of the Moto Mods Developer project:

Moto Mods Developer Part 1 - Getting Started - Virtual Machine Setup and Linux Install

Moto Mods Developer Part 2 - Getting Started - SDK Setup & Android Studio Install

Moto Mods Developer Part 3 - Firmware Setup

Moto Mods Developer Part 4 - Getting Started - Make Build-Folder, add Utility and OS files

Moto Mods Developer Part 5 - Flashing Firmware with MDK Utility

Moto Mods Developer Part 6 - Blinking an LED on the Moto Mods Perfboard

Moto Mods Developer Part 7 - Modifying the C file for the perfboard LED

Moto Mods Developer Part 8 - Configure Nuttx

Moto Mods Developer Part 9 - Updating the Hardware Manifests file

Moto Mods Developer Part 10 - Cont’d Configure and Compile Nuttx

Moto Mods Developer Part 11 - Load newly created Nuttx Firmware onto Reference Board

Moto Mods Developer Part 12 - Soldering the Test Points to use the perfboard

Moto Mods Developer Part 13 - Making custom App to control the Firmware

 

 

Flashing Firmware with MDK Utility

 

Flashing the firmware can be done in two ways, using the MDK Utility Android App (APK) which can be downloaded from the MotorolaMobilityLLC github repository or the Google Play Store. Or you can use OpenOCD to flash bootloader and firmware. We will use the Android app method.

 

In order to flash using the MDK Utility on the Motorola Z Droid. We need to check some parameters in our configuration. Enter:

 

$ cd ./nuttx/nuttx
$ make menuconfig

 

Once executed, a text based menu system in the terminal will pop up showing you the config menu. Navigate to the “Device Drivers” menu and make sure the parameters below are checked. Leave all other settings how they are, when finished, exit.

 

Device Drivers  --> 
    Greybus support (GREYBUS [=y])
        [*] Mods Protocol
            [*] Support APK update of firmware



image

 

image

 

image

 

image

 

Now back in the terminal, we need to compile the bootloader, enter

 

$ cd /home/username/MotoModsFirmware/muc-loader
$ ./configure hdk/developer
$ make

 

image

 

This will create a file called ‘defconfig’, in the ./MotoModsFirmware/muc-loader/configs/hdk/developer directory. We need to check this file for a similar parameter.

 

CONFIG_GREYBUS_MODS_SUPPORT_VENDOR_UPDATES=y

 

Open the file using the explorer or terminal and the last parameter should be ‘y’. As highlighted below:

 

image



Close file, and plug in phone. We will transfer the generated firmware executable file to the phone so that the MDK Utility can flash it to the MuC. This can be also done but loading it onto an SD card and plugging that into the phone.

 

The device will show in the file explorer

 

image

 

Make sure the phone is in File Transfer Mode (MTP)

 

image

 

Navigate to ./MotoModsFirmware/nuttx/nuttx, where the output files were generated. We will ‘Copy To…’ the “nuttx.tftf” file to the phone. Lets save it in the /Downloads directory

 

image

 

Hit Select

 

image

 

Now that the .tftf file is on the phone we are ready to flash using the MDK Utility

 

On the phone, open your MDK Utility app

 

imageimage

 

In the Mode section, make sure you are in “Developer mode” for firmware flashing. If not, hit “SET MODE” and select, “Developer Mode”.

 

Click “SELECT FILES” and navigate to the ‘./Download’ folder we saved the .tftf file on the phone.

 

imageimageimage

 

Select “nuttx.tftf” and hit “PERFORM UPDATE”

 

imageimageimage

 

Click Continue

 

Now the firmware is flashed, you can see that the firmware is a Blinky program that tests the built-in LED on the Reference Moto Mod. The LED is located above the personality card slot. You can toggle the “MDK LED Light” switch to turn on or off the blink. The light should illuminate for 1 second ON and 1 second OFF. You can Eject/unmount and unplug the phone.

 

imageimage



image

Ta-da!

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

    Hi! I followed the tutorial and flashed the firmware using MDK Utility. However, the firmware doesn't mean to be working. When I select files, there isn't an internal storage option so I used my Google drive to update. Could this be a problem? The name is displayed as "acc=1;doc=5008" under "SELECT FILES(S)". After the "firmware update succeeded" it says "uncertified device attached" and Moto Mods Status changes into:

    Name: MDK

    VID: 0X00000042

    PID: 0x00000001

    Firmware: 0x00000001

    Package Name: Default

    Could you please tell me what may be the problem?

    • 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