Hello! First of all this is my first Lemmy post, so if I did anything wrong pls tell me!

Now, I’m 19yo in 4th semester of Computer Engineering, and while I’m doing good in college I realized that they give us good background in electronics (from the basics to microcontrollers. ICs. logical design, etc) but the programming aspect is high level and web-oriented (python. java, php)! I appreciate learning those, but I’m not interested on that but rather on a kernel/firmware development! So… I’ve been learning C for some weeks and while I do love it (mainly been learning from K&R and Zed A. Shaw - Learn C the Hard Way) I don’t really know how to practice the skills required to do the proper bridge between hardware and software.

Basically, how does one begin their first real project to learn how to write drivers/baremetal and testing them? Thanks for reading and sorry if my question is dumb, I just feel a bit lost.

  • owenfromcanada@lemmy.ca
    link
    fedilink
    arrow-up
    24
    ·
    edit-2
    12 hours ago

    You’re looking for what’s called Embedded Programming, which is that low-level stuff where the software you create makes things happen in real life outside of just a computer screen. There are lots of hobby beginner kits that come with things like motors, lights, etc. That’s probably your best bet for actually getting some hands-on experience.

    If you want something a little higher-level, go for something like a Raspberry Pi (a Single Board Computer or SBC). On these, you’ll have a full-fledged Linux kernel and operating system, but still have ways of interacting with hardware like lights and such. If you want to get lower level, try Arduino or something based on ESP32 (the key word here is microcontroller). On these, you’ll either use a smaller OS or go “bare-metal”. Though note that Raspberry Pi makes things at this level as well (their “Pico” line).

    For making that connection between computer theory and programming, I recommend experimenting with microcontrollers. You can even do some projects in assembly and understand what all the key registers are doing. I started on PIC micros, which was a great beginner thing. Not sure if they’re still around.

    If you want recommendations on a starter kit, let me know your budget and what country you’re in, and I can send some suggestions.

    Source: embedded programming for 20+ years.

    • wwaaaaa@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      11
      ·
      12 hours ago

      Thanks! Yes you completely nailed it, since I already have some circuitry knowledge (and I really find it fascinating) I guess I should start with microcontrollers, then the Raspberry Pi or similar SBC. I will gladly take into account your recommendations, my budget is kinda low since I live in a quite complicated country (Venezuela), so if you can give me the generals on what I should look for I would really appreciate it. Do you also suggest any book or learning resource?

      Also (sorry if I’m asking too much) do you think it is viable for me to get a remote job in this field, or a similar one that can make use of this skills? As you can imagine in this country the local offer is pretty low, basically non-existant.

      • kibiz0r@midwest.social
        link
        fedilink
        English
        arrow-up
        8
        ·
        10 hours ago

        If hardware cost/availability is an issue, there are a few hardware simulators out there. Wokwi (ESP32 sim) is free for personal open-source use.

        • wwaaaaa@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          8 hours ago

          Oh wow thanks, I was actually searching for something like that because it is very useful to practice until I can afford all the parts I want to implement.

      • owenfromcanada@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        9 hours ago

        No problem! I love chatting about this stuff, questions are always welcome!

        Not sure what online retailers are available or what you have access to in Vemezuela, but something like this starter kit would be ideal. But anything you can get your hands on can be fun.

        In general, you need:

        • a microcontroller
        • a way to program it
        • hardware to control and usually some sort of input or sensor

        Even if you can’t find a starter kit, finding a USB UART interface lets you hack into all sorts of devices (did that to reprogram a router a while back), as long as you’re handy with a soldering iron. And like another commenter said, hardware emulators would let you get started writing and running code if you can’t get hardware right away.

        Hope it’s fun! Feel free to DM with questions if you’d like.

        • wwaaaaa@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          8 hours ago

          I see! Well I’m going to take the suggestion and get a STM32 as another user pointed out and after some research I found it to be really good, and a kit with a bunch of resistors and other components, similar to the one you suggested but with less components (little by little I will buy more). I have actually done some soldering myself, not too complicated stuff I must admit, but atleast something. Also taking into account the DM since you are a welcoming person, thanks for helping me so much I have a way clearer plan now.