How hard is it for a software developer to learn how to program a microcontroller?

前端 未结 6 1507
小鲜肉
小鲜肉 2021-02-02 16:29

I\'m a software developer. I\'ve been programming in high level languages for a few years.

I would like to know, how to take my first step into programming hardware. N

相关标签:
6条回答
  • 2021-02-02 17:09

    Well, if you want to know what you're doing, you need to understand the assembly language of the processor and the processor's architecture.

    You will need to learn C to be competent in microcontrollers. There is no way around that.

    There are some VM-level languages on embedded systems. I see the Java out-of-memory exception from time to time on my cell phone(which also helps to give me a strong opinion on VM-level embedded languages).

    The ARM has some support for hardware-level Java bytecodes.

    Your best bet is to pick up something like the PIC or the Atmel chips and begin hacking with them.

    If you want to do it with your existing hardware, get a hypervisor for your PC and begin writing a basic kernel.

    0 讨论(0)
  • 2021-02-02 17:13

    I have been coding in C both as a hobby and professionally for about 16 years now, but always for userland code (i.e., programs, not kernel or drivers). Most of my jobs involved high level languages (I have done a lot of Perl and Ruby programming, with the occasional Java, Python and shell scripting in between). I did develop a lot for MS-DOS (which was probably as close to bare-metal programming as you would get on a x86 machine), but my last job involved 5 years of Perl and Ruby on Rails web development.

    That being said, I am now a senior engineer for embedded Linux development, developing drivers (including an emulator for a legacy simple microprocessor inside a kernel module) for uClinux on the Blackfin platform. There are times when my inexperience with hardware related issues (i.e., floating signal levels due to lack of a pull-up/pull-down on a pin) did get in the way, but it has been mostly a highly enjoyable and thrilling experience. As stated by others, understanding your tools is essential -- for uClinux, that meant the GNU Toolchain, which fortunately I was already familiar with due to my background on FOSS technologies.

    The Blackfin is hardly an entry-level microprocessor (in particular, it does not have a MMU, which has some relevant effects on Linux development), but as already stated, you can buy a Beagleboard for around US$200 with all required accessories and start messing around with it in just a few days. If you want something simpler, there are many Arduino options out there, though if you have some real development experience under your belt I believe you will find their development environment a little limiting (I know I did).

    After you get comfortable with your tools you might want to spend some money on an in-circuit emulator (or ICE). These are usually highly platform specific (both in terms of target architecture and development environment), but are highly recommended for anything beyond the usual blink-LEDs-after-button-press examples I am sure you will quickly outgrow.

    In few months you will find yourself building custom images for hackable customer devices using Buildroot and having a lot of fun. All I can say is, go for it, it's highly addictive and not particularly expensive to do nowadays.

    0 讨论(0)
  • 2021-02-02 17:14

    If you know C then it's only a matter of learnig the tool chain steps to download the code.

    Easy place to start (cheap hardware/software) http://www.arduino.cc/en/Guide/HomePage

    0 讨论(0)
  • 2021-02-02 17:19

    Also something to look into is the Microsoft Robotics Studio. They support quite a lot of hardware boards (including CE), and with it is is fairly easy to get a small robot up and running. And what's more cool a project to learn embedded programming?

    It all integrates nicely in Visual Studio (express) and their devkit also comes with a free express edition.

    0 讨论(0)
  • 2021-02-02 17:29

    The actual programming isn't a big deal. The frustrating, annoying part is getting your development environment setup and getting the tools working. Once you've done that, you're half done.

    I'd suggest buying a development kit ('dev kit') that has USB built in and works with your chosen OS. Get that working, and you're halfway done.

    If you're missing the knowledge, it's also important to know the basics of how a processor works. You'll be programming at a much lower level than any other programming, so the fundamentals are a bit more important.

    0 讨论(0)
  • 2021-02-02 17:30

    Get a beagleboard. Cheap, lots of users (community support will be key), many OS options. http://beagleboard.org/

    0 讨论(0)
提交回复
热议问题