element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
  • About Us
  • 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
Raspberry Pi Projects
  • Products
  • Raspberry Pi
  • Raspberry Pi Projects
  • More
  • Cancel
Raspberry Pi Projects
Blog Raspberry Pi 2 and Windows 10: Hello World
  • Blog
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: oneleggedredcow
  • Date Created: 27 May 2015 2:06 AM Date Created
  • Views 3117 views
  • Likes 3 likes
  • Comments 15 comments
  • rpibeginner
  • raspberry-pi
  • raspberry_pi_projects
Related
Recommended

Raspberry Pi 2 and Windows 10: Hello World

oneleggedredcow
oneleggedredcow
27 May 2015

A technical preview for Windows 10 is available and can be used to run custom Windows Universal Applications on a Raspberry Pi! If you are anything like me (and I know I am), this is a very exciting time. So, here I'll step through how to get a “Hello, World” Windows Universal App up and running on the Raspberry Pi 2.

 

Prerequisites:

  • Raspberry Pi 2
  • PC with Windows 10 and Visual Studio 2015

 

Installing Windows 10 on the Raspberry Pi:

 

First we need to install Windows 10 on the Raspberry Pi. Fortunately, there is already a detailed set of instructions here:

 

https://ms-iot.github.io/content/win10/SetupRPI.htm

 

Once that is installed and you fire up the Raspberry Pi 2, you should see an image like this:

image

Admittedly, this isn't the most exciting thing in the world. However, it is about to get a lot more exciting when we run our own Windows Universal Application on it.

 

Creating a Windows Universal Application:

 

Fire up Visual Studio 2015 and create a New Project. On the New Project screen, choose “Blank App (Windows Universal)”.

image

(If it prompts you about source control, you can just hit Cancel.)

 

Then, once the new project opens, double click on the MainPage.xaml file in the Solution Explorer:

image

That will open up the MainPage.xaml file for editing. By default, the file will open with the design view on top and the XAML view on the bottom:

image

In the XAML view, put the following code within the <Grid> element:

Once it is done, it should look like this:

image

(You might need to scroll down a bit in the design view in order to see the “Hello, World!” text.)

 

Awesome, once you have that, it is time to deploy it to the Raspberry Pi 2. First, to do this, set the architecture drop down to “ARM”. (It says “x86” by default.) To the right of that will be a green play button with the words “Local Machine” and a small arrow pointing downwards. Click that arrow and set it to “Remote Machine”:

image

That will pop up a menu asking you where you would like to debug the application. In my case, the IP Address of my Raspberry Pi 2 is 192.168.1.8. Enter that and be sure to select an Authentication Mode of None:

image

Even though there is a Raspberry Pi 2 running on your network, Visual Studio 2015 might not be able to find it.  (Mine at least could not detect it.)  Don't despair, it does exist.

 

If you need help finding the IP Address of the Raspberry Pi 2, there are a couple of ways to figure that out.  The easiest is the screen that comes up on the Raspberry Pi 2 contains the IP Address.  Another way is to use the Windows IoT Core Watcher that comes within the Windows_IoT_Core_RPI2_BUILD.zip file that you downloaded while installing Windows 10 on your Raspberry Pi 2.

 

Once that is all configured, you can click on the green play button and watch your application get deployed and run on the Raspberry Pi 2!

  • Sign in to reply

Top Comments

  • Former Member
    Former Member over 10 years ago +2
    How can Microsoft woo embedded engineers to Windows 10 if they force them to buy a Windows 10 license for a "PC" and install Visual Studio (oink!)? My contact at Microsoft says that's the way it is, for…
  • mcb1
    mcb1 over 10 years ago in reply to shabaz +2
    Funnily Microsoft were late to the party for Internet ... you would have thought they might have been quicker off the blocks for IoT ....
  • shabaz
    shabaz over 10 years ago in reply to Former Member +1
    To be honest, developing for the Pi requires the Pi. Although in theory software can be built on any platform (x86 Linux, Windows, etc), cross-compiling is a nightmare that most people avoid if possible…
Parents
  • Former Member
    Former Member over 10 years ago

    How can Microsoft woo embedded engineers to Windows 10 if they force them to buy a Windows 10 license for a "PC" and install Visual Studio (oink!)?  My contact at Microsoft says that's the way it is, for better and worse.  My pal does understand that a significant number of embedded engineers probably prefer a neutral/non-specific staging methodology which would include Linux, Unix, or MacOSX platforms as well as Windows. 

     

    Requiring a Windows "mother ship" seems onerous to me, especially after using the "small is beautiful" Raspbian deployment process.  People should have more choices, not be constrained to one way. 

     

    I think that Microsoft will eventually have to re-think the way they deploy Windows 10 to embedded platforms.  Anyone have another perspective?

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • Former Member
    Former Member over 10 years ago

    How can Microsoft woo embedded engineers to Windows 10 if they force them to buy a Windows 10 license for a "PC" and install Visual Studio (oink!)?  My contact at Microsoft says that's the way it is, for better and worse.  My pal does understand that a significant number of embedded engineers probably prefer a neutral/non-specific staging methodology which would include Linux, Unix, or MacOSX platforms as well as Windows. 

     

    Requiring a Windows "mother ship" seems onerous to me, especially after using the "small is beautiful" Raspbian deployment process.  People should have more choices, not be constrained to one way. 

     

    I think that Microsoft will eventually have to re-think the way they deploy Windows 10 to embedded platforms.  Anyone have another perspective?

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • shabaz
    shabaz over 10 years ago in reply to Former Member

    Hi Richard,

     

    I too suspect that Microsoft will eventually provide tools to use it from other OSs too.

    My belief is that usually with cutting edge (i.e. new technology that has been released), companies only test and recommend one prescribed workflow, until the important features are in place and then the developers and test teams can have more time to concentrate on integrating and/or testing the workflow with other OSs.

    This does mean that for customers to be on that cutting edge, sometimes one has to do things in the more prescribed manner (i.e. using Windows 10 today).

     

    On the other hand, for almost a decade, deploying arbitrary apps for Apple IOS generally still requires a Mac and OSX (although there there are some alternative methods feasible for some apps). Lets hope Microsoft doesn't do this.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to shabaz

    Ironically, the organizations that can least afford it (E.g. Raspbian) gave the users the most flexibility in spite of the processes being on the "cutting edge".  If folks in the donationware communities can succeed in this effort then I think that Microsoft with all of its resources certainly could as well.  Perhaps Microsoft has a secondary agenda in requiring Windows 10 on a PC?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago in reply to Former Member

    To be honest, developing for the Pi requires the Pi. Although in theory software can be built on any platform (x86 Linux, Windows, etc), cross-compiling is a nightmare that most people avoid if possible. With small microcontrollers there is generally no choice (although as a caveat there are interpreted languages that will run on microcontrollers), but for a Linux platform the general preference is to compile natively on the actual hardware that the software will run on, if the resources (memory, processing power etc) allow this to be practical.

    Many times apps can be written and tested on any platform of course.

    Furthermore, Raspbian was near-essential for Pi to have any chance of success, i.e. there was little choice, because the original Pi's ARM core was quite old and no longer supported by any of the popular distributions as far as I understand.

    I'm very pro-Linux, by the way - (and was at one point very pro-Solaris too, not that it matters!) although I regularly use Windows on the desktop - so I try to see things from several sides(!) of the fence.

    By secondary agenda, do you mean to encourage Windows 10 desktop (PC) adoption?

    If so, I can't see this being likely, because the majority of desktop users will not be developers for Windows IoT, they will be people in all vocational areas, and home users. I could be wrong though, but to me it doesn't seem likely to be this sort of agenda, but I'm just guessing.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to shabaz

    Obviously, the Raspbian folks and others use native compilations and then an build image on the native machine before uploading (simplest path to success).  Microsoft could have done the same.  They chose not to and also chose to require Windows 10 on bare metal (no VM-based Windows 10 permitted).  Of course, they are trying to get you to buy a new machine from one of their partners with Windows 8.1 already installed to facilitate a migration to Windows 10.  See the instructions on http://ms-iot.github.io/content/en-US/win10/SetupRPI.htm.

     

    This is not engineer-friendly at all.  It's a Mercedes Benz that requires an inordinate amount of time and effort.  No thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago in reply to Former Member

    Richard Elkins wrote:

     

    This is not engineer-friendly at all.

    I'm with you there. I completely agree. I think it will change though. The reason they give for mandating a physical machine rather than a VM doesn't seem to be for commercial reasons - they give the reason to be that the OS needs to access the SD card slot. Probably (this is a guess) VMware, VirtualBox, etc will eventually support this ability so that we won't need to buy a physically new machine (or a new drive in an existing one) and we will be able to run a VM. I don't know about VirtualBox release cycles but definitely VMware sometimes takes a short time before it officially supports new releases.

    Whether (and how fast) other OSs (i.e. other than Windows) will be supported for development purposes (so that we don't need to run a Windows VM) is anybody's guess.

    Writing and deploying apps to Microsoft Azure (as an example) doesn't require Windows, but from memory I think it initially did when it was first launched. Meanwhile Apple still insists on requiring Macs for IOS development : (

    • 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