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
  • 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
  • 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
  • balearicdynamics
    balearicdynamics over 10 years ago in reply to shabaz

    I share the same point of view of and shabaz but I have big doubts that they will change. And I am almost sure that the reason is commercial. The point is - IMHO - what are the real advantages to manage an embedded device like the PI with windows10. I mean in the real world, real engineering applications, while it is totally not conformed with what embedded developers has done until now. All the engineers that approach embedded devices that are non-intel platforms approach the ARM (and not only) also from the Windows development platform using tricks and pieces of software (one over all is cygnus win) just to be able to program and develop for Linux. All this sounds me very strange. Maybe my ignorance but sounds strange anyway.

     

    Enrico

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

    Hi Enrico,

     

    Most of the time those developers running Windows for desktop but targeting Linux platforms just use Windows for SSH'ing into a Linux platform. I do the same. The reason I do it is because I like the Windows UI. I prefer it over OSX, Unity, KDE, etc. That's a simple personal choice. I don't want to use OSX or Unity or KDE because I'm less productive with them and I think they have made bizarre HCI choices - personal opinion though, others will disagree.


    I'm productive with the Linux shell however. So I want the best of both worlds and for me that means using both Windows and Linux.

    I don't use any tricks or complicated workflow, I use basic network protocols like SSH and that's it.

     

    I also like using Office for documenting my work - again a personal choice, and I may revisit it one day. If/when I migrate, I probably won't use LibreOffice, because it is too late for me - there are plenty of SaaS options which are getting better all the time, and then I'll be OS and device-agnostic for productivity tools for some tasks and scenarios.

    Not everyone will want to do that, but it's a personal choice.

     

    Most developers will not test on cygwin, if this is what you mean. Cygwin is sometimes useful if you want your code to also compile and run on Windows. It is rare I would consider cygwin. I don't think I have it installed. Developers much prefer test harnesses running on a simulator or real hardware. I wouldn't consider a Cygwin based compilation for test purposes - easier to run and test on the actual target hardware (or a simulation), if the target resources allow for it. I may use cygwin for simple personal tools to help me with my workflow, but I wouldn't consider it otherwise (not least because of the licensing requirements with it).

     

    Sometimes build and packaging tools (or IDE if using one) _may_ require (say) Windows if the vendor has not released them for other platforms. I agree this is not helpful if one doesn't want to use Windows.


    Engineers may or may not have a choice today (depends on if they are being paid for it by their employer! - and so depends on if they need to develop for Windows IoT now, or later when things may be different, or never. I don't work for MS so I don't know the answer. In terms of flexibility MS could continue to go the Azure way, or the Apple IOS way. I don't know.


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

    Hello Shabaz, thank you for the detailed answer image

     

    As far as I read it seems that in some parts of my post I was not too clear image I was not put in discussion what platform engineer do prefer, for any reason. As you write, it's true that it is a question of personal choice. And about Cygnwin I have used it tons of time ago but got it as an example just because I see around several posts of E14 that many people uses this. I personally have never loved too much this mechanism and I have used it only when I had no chance.

     

    About the documentation method it is the same. Personally, I use both MS Office and OpenOffice for professional reasons but LibreOffice is the first thing that I uninstall from any linux distro that includes it by default. And on the Mac their "pages" is so out of any standard the I have not removed because some time I receive documents in this format but I hate to use it.

     

    My general question instead, about the equation Windows10 embeded VS Linux embedded, is why engineers, that using the development platform they consider better for embedded development, used to develop with the linux features in mind, should move to the MS platform. Considering also the following: there are definitely strong commercial and licensing limitations, is not so friendly as MS claim, it is probable that they will be obliged to adopt a specific development desktop and should invest a considerable amount of money to study and perfectly understand a new embedded OS, that at the actual date, it is not sure at all it has some real advantages than the "traditional" linux embedded that is well assessed and well known by years...

     

    I am developing on the Gizmo2 a hardware interface for some special printers for a producer. This has sense, because they should cover as much as possible what their customer market need to sell their printers. So I have already done the Android direct printing driver, now it's the turn of WIndows 7 and 8.1 then it will be the linux time.

    But thinking to a company that should use an embedded platform to integrate in its products (that are not necessarily IT hardware). What is the reason that they should follow a choice like Windows10 embedded ? This is what sounds really strange to me.

     

    Enrico

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

    Hi Enrico,

     

    Oh, I see what you mean. I must admit, I've not looked up the features of Windows IoT in any detail yet, but I suspect the reason for it is that Microsoft want (the same as others) to have some control of as many elements of IoT solutions as possible, from sensors to devices to firmware to cloud platform to XaaS. They want it all : ) as do Google, Samsung, Apple, etc.

    Linux for embedded apps is still Linux, it may be hardened, it may have unnecessary drivers removed. The secret sauce for IoT will be all the other software running on-board for security, remote device management/provisioning,  wireless updates, deep sleep and advanced wake-up strategies, etc. All this is possible with Linux in conjunction with a lot of open source out there, but it still needs to glue together with the rest of solutions that Microsoft or others are cooking up, and has to be scalable for millions or billions of devices.

    Personally, I have no intention to spend time learning Windows IoT _yet_. That may change though, depends on what features it gets, and how easy it is to work with, licensing requirements and so on. For now I'm happy with working with Linux on embedded devices containing application processors, but I'm open to Android too although I have little experience in this area.

     

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

    Hi Enrico,

     

    Oh, I see what you mean. I must admit, I've not looked up the features of Windows IoT in any detail yet, but I suspect the reason for it is that Microsoft want (the same as others) to have some control of as many elements of IoT solutions as possible, from sensors to devices to firmware to cloud platform to XaaS. They want it all : ) as do Google, Samsung, Apple, etc.

    Linux for embedded apps is still Linux, it may be hardened, it may have unnecessary drivers removed. The secret sauce for IoT will be all the other software running on-board for security, remote device management/provisioning,  wireless updates, deep sleep and advanced wake-up strategies, etc. All this is possible with Linux in conjunction with a lot of open source out there, but it still needs to glue together with the rest of solutions that Microsoft or others are cooking up, and has to be scalable for millions or billions of devices.

    Personally, I have no intention to spend time learning Windows IoT _yet_. That may change though, depends on what features it gets, and how easy it is to work with, licensing requirements and so on. For now I'm happy with working with Linux on embedded devices containing application processors, but I'm open to Android too although I have little experience in this area.

     

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

    Funnily Microsoft were late to the party for Internet ...

    you would have thought they might have been quicker off the blocks for IoT ....image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 10 years ago in reply to mcb1

    mcb1 & shabaz it is my opinion that for a different reason MS is late also for the IoT image I don't see a simple scenario to involve a serious number of engineers moving from their used and well organised development environments to the new world of the W10 embedded if they don't offer a really great priceless alternative. And the things seems are not going in this direction. I have the sensation that the golden time of MS, when it was the worth to make right things has passed...

     

    And about the IoT i think, as I have already discussed in past, the it is not a real new tech or some kind of evolution. It is just a new label, as it was the Internet 3.0 to expand a market. Sure trying to force the customers to acquire a lot of new hardware at least to start to understand it is not so attractive for many, especially the less experts that - I think - will continue orienting their choices to the low-cost open source market.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • oneleggedredcow
    oneleggedredcow over 10 years ago in reply to balearicdynamics

    I come from a different perspective.  I'm mostly a desktop developer who dabbles a little in the embedded world.  So, I'm really excited to see MS enter into the game because now I can use all of the same tools and environments.  It significantly lowers the bar for entry.  Additionally, the idea of writing the majority (or all) of the code once and being able to deploy it to multiple platforms is incredible.  We'll have to see how that pans out in reality, but you have to admit that the idea is really intriguing.

     

    I also don't think that the goal is moving existing embedded developers to Win10.  I really think they are targeting more desktop developers and trying to bring them over into the IoT world.

     

    Looks like there is going to be a community (free) version of VS 2015 that supports the RPi.  So, assuming that you already have Win10, it would be a priceless alternative for developing on the RPi.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 10 years ago in reply to oneleggedredcow

    Hello Shaun,

     

    I think I am in the middle, worked a lot as desktop developer and not desktop too. My attention has moved during last years over the mobile and embedded devices but remain anyway desktop development knowledge somewhere. What you say is correct, and I was just assuming that this will be the real effective target of developers that can appreciate the W10 embedded development environment. Just like the other do the same in the opposite direction. What I am almost sure is that as linux has not won over MS and vice-versa the Internet challenge with this new "world" of IoT will occur the same. That is far away than the idea of astonishing innovation represented by W10 and the embedded platforms the MS is speaking about (and probably believe too).

     

    Looks like there is going to be a community (free) version of VS 2015 that supports the RPi.  So, assuming that you already have Win10, it would be a priceless alternative for developing on the RPi.


    To be honest i don't trust too much to the idea of free that MS has, but as I have time to put the hands on this development environment - and it is more stable - I will do a try for sure. At least because I am curious. If there is a version really free for the RPI, sure it is a great step ahead for the Redmond company.


    Enrico

    • 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