i am using SoC FPGA+ARM A9 system. The ARM A9 will run Linux Yocto. I want to write some software for this Linux on C or Python language. My question is, do i need to install Linux on my Windows desktop in order to develop software for Linux, or is there some kind of Linux Shell/emulator, in which i can test my code under Windows 7?
-
Python should be fairly portable. But if you want to be absolutely sure you could run it in a Linux Virtual Machine or a Linux Container. – Sleep Deprived Bulbasaur Aug 10 '14 at 15:54
-
If you want to write C code, you don't just need a linux emulator, you need an ARM emulator, which is a much bigger issue. (And a cross-compiler, but that's easier.) – abarnert Aug 10 '14 at 16:11
-
One in-between idea that might be worth considering: Install [cygwin](http://www.cygwin.com), which gives you most of a GNU/Linux userland on Windows, including a build of Python that has all the Unix-specific stuff instead of the Windows-specific stuff (and a Unix-like C standard library, if you're serious about going that way). – abarnert Aug 10 '14 at 16:15
1 Answers
Python code is fairly portable as long as you don't use Windows specific modules or functions. And as abarnert rightly mentions, some functions act differently on different operating systems. And not all functions are available on all platforms. But this is generally mentioned in the documentation.
You could set up a cross-compiler for Linux on Windows, but it is more ofter done the other way around, because Linux in general comes with more developer tools and has better infrastructure for installing software packages.
What you could do is set up a virtual machine (like virtualbox, vmware or qemu) running Linux. That will enable you to get experience with Linux and its development tools.
If you are using an Altera board, it seems that their tools (Board Support Package) only run on Linux.

- 1
- 1

- 42,427
- 3
- 64
- 94
-
1One minor quibble: It's not just Windows-specific modules; some cross-platform modules have Windows-specific functions (like `os.startfile`), or functions that act differently in Windows and Unix (like `os.rename`). Fortunately, every such case is clearly documented. – abarnert Aug 10 '14 at 16:12
-
@abarnert Good point. I've updated the answer to take that into account. – Roland Smith Aug 10 '14 at 17:59
-
Thank you very much. Yes, i am using Altera DE1 SOC board. I will mainly use LINUx on ARM to plot/visualize data. I will try virtual machine first, else i will install complete Ubuntu on my desktop system ( i just afraid that installing Linux will ruin my Windows system, which will be catastrophic). – user3597998 Aug 10 '14 at 22:26
-
@user3597998 There are several guides on the internet about installing Linux next to Windows. And as long as you have a proper backup of your Windows system, the risk is low. If you've never made a backup, I suggest you do that *now*. – Roland Smith Aug 11 '14 at 18:28