[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-\u002Fdocumentation\u002Fiot-dev-kit\u002Fdev-kit-getting-started\u002Fdeveloper-environment-setup\u002Fwindows-os-for-zephyr-development":3},{"docData":4,"isAuthenticated":11,"isTOCHidden":12,"commonDAProps":27},{"id":5,"title":6,"superTitle":7,"description":8,"sectionOrder":9,"slug":10,"isAuthenticated":11,"isTOCHidden":12,"createdAt":13,"updatedAt":14,"publishedAt":15,"environments":16,"isDeprecated":8,"deprecationNoticeTitle":8,"deprecationNotice":8,"documentId":20,"forPartnerDashboard":8,"parent_page":8,"children_pages":21,"pageContent":22},346,"Windows OS for Zephyr Development","Learning Level: Advanced",null,24082,"windows-os-for-zephyr-development",false,true,"2024-07-25T06:55:21.689Z","2025-02-14T20:39:18.377Z","2022-11-11T20:08:55.906Z",[17,18,19],"partner","preprod","production2","o4o4ahiegsj7sxukkfsxxqdj",[],[23],{"__component":24,"id":25,"content":26,"referenceURL":8},"content-components.markdown",212,"\u003Cstyle>\n     code { display:inline; background-color: #e5e7eb; border-radius: 5px; padding: 3px 10px; }\n     pre { counter-reset: line; background-color: #000; color: #fff; padding: 1em; overflow: scroll; width: 780px; margin-bottom: 1.5em; }\n     pre span { counter-increment: line; color: #fff; }\n     pre span:before { content: counter(line, decimal-leading-zero); padding: 0em 1.5em 0em .75em; display: inline-block; border-right: 1px solid #fff; margin-right: 1em; color: #e20074; }\n     pre code { counter-increment: line; color: #fff; display: unset; background-color: unset; border-radius: unset; padding: unset; }\n     pre code:before { content: counter(line); padding: 0em 1.5em 0em .75em; display: inline-block; border-right: 1px solid #fff; margin-right: 1em; color: #e20074; }\n     th { border: 1px solid #000000; padding: 10px; background-color: #f2f2f2; }\n     td { border: 1px solid #000000; padding: 10px; vertical-align: top; }\n     tr:nth-child(even) { background-color: #f2f2f2; }\n     .note { background-color: #f2f2f2; border: 1px solid #D0D5DD; padding: 15px; border-radius: 8px; color: #344054; }  \n     .note:before { content: ' \\266B' \" NOTE:\"; padding-right: 5px; font-weight: bold; font-size: large; display: block; }\n     .important { background-color: #ffffff; border: 1px solid #E65BA2;; padding: 15px; border-radius: 8px; color: #E20074; }  \n     .important:before { content: ' \\2763' \" IMPORTANT:\"; padding-right: 5px; font-weight: bold; font-size: large; display: block; }\n     .tip { background-color: #F6FEF9; border: 1px solid #6CE9A6; padding: 15px; border-radius: 8px; color: #027A48; }  \n     .tip:before { content: ' \\2714' \" TIP:\"; padding-right: 5px; font-weight: bold; font-size: large; display: block; }\n     .warning { background-color: #FFFCF5; border: 1px solid #FEC84B; padding: 15px; border-radius: 8px; color: #B54708; }  \n     .warning:before { content: ' \\26A0' \" WARNING:\"; padding-right: 5px; font-weight: bold; font-size: large; display: block; }\n     .bug { background-color: #FFFBFA; border: 1px solid #FDA29B; padding: 15px; border-radius: 8px; color: #B42318; }  \n     .bug:before { content: ' \\2639' \" BUG:\"; padding-right: 5px; font-weight: bold; font-size: large; display: block; }\n     img { max-width: 100%; height: auto; }\n     ol li li { list-style-type: lower-alpha; }\n     ol li li li { list-style-type: lower-roman; }\n     ul li li { list-style-type: circle; }\n     ul li li li { list-style-type: square; }\n     hr { max-width:100%; border: 4px solid #000000; }\n\u003C\u002Fstyle>\n## Introduction\n\nThis document explains how to setup a development environment on Windows OS for the [DevEdge IoT Developer Kit](\u002Fsolutions\u002Fiotdevkit)'s RTOS and SDK.\n\n## Prerequisites\n\n- A computer with Windows operating system 10 or greater installed on it.\n- A serial app.\n- The computer with USB ports.\n- Understand that these instructions use the Command Prompt app (cmd.exe) and not PowerShell.\n\n## Why would I want to implement the instructions in this document? \n\n- To be able to upgrade or change the firmware on the [DevEdge IoT Developer Kit](\u002Fsolutions\u002Fiotdevkit).\n\n## Configuration\n\n### Step A\n\nBackup your work. If you have previous installation of the T-Mobile RTOS and SDK downloaded on your machine, please save a copy of your work. If not, please skip to Step B.\n\n1.  Save a copy of the following folders or all your work in progress will be deleted:\n\n    a. %HOMEPATH%\\\\zephyrproject\\\\DevEdge-IoTDevKit-ZephyrSDK\n\n    b. %HOMEPATH%\\\\zephyrproject\\\\zephyr\n\n### Step B\n\nInstall Zephyr.\n\n1.  Follow the instructions [here](https:\u002F\u002Fdocs.zephyrproject.org\u002Flatest\u002Fdevelop\u002Fgetting_started\u002Findex.html) to install Zephyr for Windows.\n\n2.  Under _Get Zephyr and install Python dependencies_ > Step 2 or 4 (depending on whether you are installing a virtual or global environment) replace  \n    `west init zephyr`  \n    with  \n    `west init -m https:\u002F\u002Fgithub.com\u002Ftmobile\u002FDevEdge-IoTDevKit-ZephyrRTOS.git %HOMEPATH%\\zephyrproject`\n    \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage_2022_12_21_12_24_18_3b4d0ce9c9.png?updated_at=2022-12-23T19:45:36.239Z\" width=\"725\" \u002F>\n\n3.  The rest of the instructions remain the same.\n\n4.  Stop at the _Build the Blinky Sample_ section.\n\n### Step C\n\nClone the T-Mobile Zephyr RTOS and SDK.\n\n1.  Open the Command Prompt app. You do not need to be in administrator mode.\n\n2.  Enter the following to download the T-Mobile Zephyr SDK, aka [tmo_shell](\u002Fdocumentation-hub\u002Fiot-developer-kit\u002Finteracting-with-the-kit-at-cli-via-tmo-shell).\n\n    \u003Cdiv class=\"note\">The release version will change over time.\u003C\u002Fdiv>\n    \u003Cbr>\n\n    \u003Cpre>\n    \u003Cspan>cd %HOMEPATH%\\zephyrproject\u003C\u002Fspan>\n    \u003Cspan>git clone https:\u002F\u002Fgithub.com\u002Ftmobile\u002FDevEdge-IoTDevKit-ZephyrSDK.git\u003C\u002Fspan>\n    \u003Cspan>cd DevEdge-IoTDevKit-ZephyrSDK\u003C\u002Fspan>\n    \u003Cspan>git checkout tmz-sdk-1.19.1-qa \u003C\u002Fspan>\n    \u003C\u002Fpre>\n    \u003Cbr>\n\n3.  Clone the T-Mobile Zephyr RTOS repository:\n\n    \u003Cdiv class=\"note\">The release version will change over time.\u003C\u002Fdiv>\n    \u003Cbr>\n\n    \u003Cpre>\n    \u003Cspan>cd %HOMEPATH%\\zephyrproject\u003C\u002Fspan>\n    \u003Cspan>rd \u002FS \u002FQ zephyr\u003C\u002Fspan>\n    \u003Cspan>git clone https:\u002F\u002Fgithub.com\u002Ftmobile\u002FDevEdge-IoTDevKit-ZephyrRTOS.git zephyr\u003C\u002Fspan>\n    \u003Cspan>cd zephyr\u003C\u002Fspan>\n    \u003Cspan>git checkout tmz-1.19.1-qa\u003C\u002Fspan>\n    \u003C\u002Fpre>\n    \u003Cbr>\n\n4.  Refresh the Zephyr modules by running the following commands.\n\n    \u003Cdiv class=\"important\">Do this whenever cloning or pulling the Zephyr repo. \u003C\u002Fdiv>\n    \u003Cbr>\n\n    \u003Cpre>\n    \u003Cspan>cd %HOMEPATH%\\zephyrproject\u003C\u002Fspan>\n    \u003Cspan>west update\u003C\u002Fspan>\n    \u003C\u002Fpre>\n    \u003Cbr>\n\n### Step D\n\nBuild your \"Hello World\" sample then flash the board.\n\n1.  Connect to your IoT Developer Kit via serial app.\n\n    1.  Connect your developer kit to your Windows computer. Plug in your USB-C to USB-A cable into the board like in the screenshot below. Ensure that the USB-C end is plugged into the **J-Link USB-C Debug** port.\n        \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fiot_dev_kit_how_to_connect_3e7f450c51.png\" width=\"400\" \u002F>\n\n    2.  Open your serial app. For demonstration purposes we will use Tera Term.\n    3.  Select the serial port that is connected to your IoT Developer Kit then click _**Open**_.\n    4.  Under **Setup** > **Serial Port** make sure the following values are set then click either _**New setting**_ or _**Cancel**_:\n        1.  Baud Rate \u002F Speed - 9600\n        2.  Data Rate - 8\n        3.  Parity - None\n        4.  Stop Bits - 1\n        5.  Flow Control - None\n            \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage2022_7_13_15_48_26_3fc4be846c.png\" width=\"500\" \u002F>\n    5.  At the command line screen press _**Enter**_ on your keyboard. The uart command prompt appears. To learn more about uart, please read the document [Interacting with the Kit at CLI via tmo_shell](\u002Fdocumentation-hub\u002Fiot-developer-kit\u002Finteracting-with-the-kit-at-cli-via-tmo-shell).  \n        \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F05_10_2022_12_43_e9fd5fced2.png\" width=\"500\" \u002F>\n\n2.  In Command Prompt, build the \"Hello World\" sample.\n    \u003Cpre>\n    \u003Cspan>cd %HOMEPATH%\\zephyrproject\\zephyr\u003C\u002Fspan>\n    \u003Cspan>west build -p always -b tmo_dev_edge samples\\hello_world\u003C\u002Fspan>\n    \u003C\u002Fpre>\n    \u003Cbr>\n3.  Flash the \"Hello World\" sample onto the kit.\n    \u003Cpre>\n    \u003Cspan>west flash\u003C\u002Fspan>\n    \u003C\u002Fpre>\n    \u003Cbr>\n4.  If the flash occurred successfully you should see the below screenshot in your serial app.   \n    \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F12_21_2022_11_28_3a0d509f55.png?updated_at=2022-12-23T20:25:42.090Z\" width=\"500\" \u002F>\n5.  Update the code found in the %HOMEPATH%\\\\zephyrproject\\\\zephyr\\\\samples\\\\hello_world\\\\src\\\\main.c file to create whatever project you desire.\n    \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage_2022_12_21_16_1_4_f7e95044a8.png?updated_at=2022-12-23T20:29:17.485Z\" width=\"600\" \u002F>\u003Cbr>\n    \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage_2022_12_23_9_54_57_c2d304ed1e.png?updated_at=2022-12-23T20:29:12.200Z\" width =\"600\" \u002F>\n6.  Flash the board again with your changes.\n    \u003Cpre>\n    \u003Cspan>west flash\u003C\u002Fspan>\n    \u003C\u002Fpre>\n    \u003Cbr>\n7.  Test that your \"Hello World\" project works.  \n    \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F12_21_2022_11_34_03cf4ee50e.png?updated_at=2022-12-23T20:33:32.614Z\" width=\"500\" \u002F>\n\n### Step E\n\nBuild your \"tmo_shell\" sample then flash the board.\n\n1.  Enter the below in Command Prompt to build the tmo_shell sample.\n    \u003Cpre>\n    \u003Cspan>cd %HOMEPATH%\\zephyrproject\\DevEdge-IoTDevKit-ZephyrSDK\u003C\u002Fspan>\n    \u003Cspan>west build -p always -b tmo_dev_edge samples\\tmo_shell\u003C\u002Fspan>\n    \u003C\u002Fpre>\n    \u003Cbr>\n2.  Flash the tmo_shell sample onto the kit.\n    \u003Cpre>\n    \u003Cspan>west flash\u003C\u002Fspan>\n    \u003C\u002Fpre>\n    \u003Cbr>\n3.  If the flash occurred successfully you should see, in your serial app, your kit going through a series of system checks then finally arrive at the following screenshot.\n    \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F12_22_2022_19_02_143e7b237d.png?updated_at=2022-12-23T20:49:41.382Z\" width=\"500\" \u002F>\n    \u003Cbr \u002F>\n4.  Press _**Return**_ on your keyboard to get to the uart command line.\n    \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F12_22_2022_19_02_1_b87eff4fbe.png?updated_at=2022-12-23T20:49:41.367Z\" width=\"500\" \u002F>\n    \u003Cbr \u002F>\n5.  Enter `tmo version` to see the version of your SDK. It should be upgraded to tmz-1.19.1-qa.\n    \u003Cbr \u002F>\n6.  Update the code found in the $HOME\u002Fzephyrproject\u002FDevEdge-IoTDevKit-ZephyrSDK\u002Fsamples\u002Ftmo_shell folder to create whatever project you desire. To understand what the various files in the **tmo_shell** folder do, please see the [Description of tmo_shell Source Files](\u002Fdocumentation-hub\u002Fiot-developer-kit\u002Fdeveloper-environment-setup\u002Fdescription-of-tmo-shell-source-files) document.\n    \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage_2022_12_21_16_15_50_dcbfb5401d.png?updated_at=2022-12-23T20:49:44.375Z\" width=\"500\" \u002F>\n    \u003Cbr \u002F>\n7.  An example of a source file update is setting the SSID and PSK for Wi-Fi.\n\n    1.  Open the %HOMEPATH\\\\zephyrproject\\\\DevEdge-IoTDevKit-ZephyrSDK\\\\samples\\\\tmo_shell\\\\prj.conf in your IDE.\n    2.  Find the `CONFIG_TMO_SHELL_SSID` and `CONFIG_TMO_SHELL_PSK` variables.\n    3.  Set the arguments to your Wi-Fi SSID and PSK then save the file.\n        \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage_2022_12_21_16_18_36_890715c039.png?updated_at=2022-12-23T20:49:41.604Z\" width=\"600\" \u002F>\n        \u003Cbr \u002F>\n    4.  Build the tmo_shell sample.\n\n        \u003Cpre>\n        \u003Cspan>cd %HOMEPATH%\\zephyrproject\\DevEdge-IoTDevKit-ZephyrSDK\u003C\u002Fspan>\n        \u003Cspan>west build -p always -b tmo_dev_edge samples\\tmo_shell\u003C\u002Fspan>\n        \u003C\u002Fpre>\n        \u003Cbr>\n\n    5.  Flash the sample onto the kit.\n\n        \u003Cpre>\n        \u003Cspan>west flash\u003C\u002Fspan>\n        \u003C\u002Fpre>\n        \u003Cbr>\n\n    6.  In your serial app, your kit goes through a series of system checks then finally arrives at the following screenshot. Press _**Return**_ on your keyboard to get to the uart command line.\n\n         \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F12_22_2022_19_02_1_b87eff4fbe.png?updated_at=2022-12-23T20:49:41.367Z\" width=\"500\" \u002F>\n         \u003Cbr \u002F>\n\n    7.  Enter `tmo wifi status 2`. Instead of having to enter `tmo wifi connect 2 \"\u003CSSID>\" 0 \"\u003CPSK>\"` you'll notice that you are already connected to Wi-Fi automatically.\n\n         \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F12_22_2022_19_03_1_9dd4decbb3.png?updated_at=2022-12-23T20:49:31.578Z\" width=\"500\" \u002F>\n         \u003Cbr \u002F>\n\n8.  Update any other source files you desire.\n9.  Flash the board again with your changes.\n\n    \u003Cpre>\n    \u003Cspan>west flash\u003C\u002Fspan>\n    \u003C\u002Fpre>\n    \u003Cbr>\n\n10. Test that your tmo_shell project works.\n\n## Troubleshooting\n\n- **Issue** - I keep getting a \"FATAL ERROR: required program JLink.exe not found; install it or add its location to PATH\" message. What does this mean and how can I fix it?\n  \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage_2022_12_21_16_25_53_1a2db0d71f.png?updated_at=2022-12-23T20:49:38.907Z\" width=\"600\" \u002F>\n- **Suggested Solution** - This message means that the required PATH to your J-Link apps is not set. As a result, you will not be able to flash your kit. Note that this is assuming that you have already installed the SEGGER J-Link apps found [here](https:\u002F\u002Fwww.segger.com\u002Fdownloads\u002Fjlink\u002F). To resolve this issue, follow the steps below:\n\n  1.  Search for a J-Link shortcut icon then right click on it. The below window appears. Copy the **Start in:** destination folder then click _**OK**_ to close the window.\n      \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F12_21_2022_08_55_1_41885893f4.png?updated_at=2022-12-23T20:49:27.775Z\" width=\"500\" \u002F>\n  2.  Follow the steps found in this article: [https:\u002F\u002Fwww.computerhope.com\u002Fissues\u002Fch000549.htm](https:\u002F\u002Fwww.computerhope.com\u002Fissues\u002Fch000549.htm)\n  3.  Click _**New**_.  \n       \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage_2022_12_23_10_38_27_5d17e7d893.png?updated_at=2022-12-23T20:49:31.577Z\" width=\"500\" \u002F>\n      \u003Cbr \u002F>\n  4.  Enter the destination folder address that you copied in step a then click _**OK**_.  \n      \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F12_23_2022_10_47_fb7d0de050.png?updated_at=2022-12-23T20:49:26.076Z\" width=\"500\" \u002F>\n      \u003Cbr \u002F>\n\n  5.  The J-Link path now appears in your list.  \n      \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002F12_23_2022_10_47_1_ca7ad6d340.png?updated_at=2022-12-23T20:49:24.106Z\" width=\"500\" \u002F>\n\n      \u003Cbr \u002F>\n\n  6.  Click _**OK**_ to save.\n\n- **Issue** - I received the message \"FATAL ERROR: --build-dir was not given, and neither %HOMEPATH%\\\\zephyrproject nor %HOMEPATH%\\\\zephyrproject\\\\build are zephyr build directories. What does this mean and how can I fix it?\n  \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage_2022_12_21_16_36_33_50a107ed02.png?updated_at=2022-12-23T21:29:43.166Z\" width=\"500\" \u002F>\n- **Suggested Solution** - When flashing the kit, you need to be in a directory that contains the **set-zephyr-build-env** file. If you are not in the **DevEdge-IoTDevKit-ZephyrSDK** directory and you try to flash the board you will receive this error. To resolve this issue `cd %HOMEPATH%\\zephyrproject\\DevEdge-IoTDevKit-ZephyrSDK` then try flashing the kit.\n  \u003Cimg src=\"https:\u002F\u002Fdevedge.t-mobile.com\u002Fuploads\u002Fimage_2022_12_21_16_47_33_1_ef69e8d4f7.png?updated_at=2022-12-23T21:29:45.008Z\" width=\"500\" \u002F>\n\n## FAQ\n\n- **Question** - Will these instructions work for macOS or Linux OS?\n- **Answer** - No they will not. Please read the [macOS for Zephyr Development](\u002Fdocumentation-hub\u002Fiot-developer-kit\u002Fdeveloper-environment-setup\u002Fmacos-for-zephyr-development) or [Linux OS for Zephyr Development](\u002Fdocumentation-hub\u002Fiot-developer-kit\u002Fdeveloper-environment-setup\u002Flinux-os-for-zephyr-development) to learn more.\n\n\u003Cbr>\n\n- **Question** - What do the different files in the $HOME\u002Fzephyrproject\u002FDevEdge-IoTDevKit-ZephyrSDK\u002Fsamples\u002Ftmo_shell folder do?\n- **Answer** - Please see the [Description of tmo_shell Source Files](\u002Fdocumentation-hub\u002Fiot-developer-kit\u002Fdeveloper-environment-setup\u002Fdescription-of-tmo-shell-source-files) document to learn more.\n",{"docPagePath":28,"pageName":29},"documentation>iot-dev-kit>dev-kit-getting-started>developer-environment-setup>windows-os-for-zephyr-development","documentation"]