• printf("%s", name);@piefed.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 days ago

      After having done C in an x64 Linux environment using only clang, I was… Flabbergasted? At the myriad of components required to compile for this little piece of shi… I mean piece of wonderful hardware called ARM. 🥰🤣😱

      • LH0ezVT@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        7 days ago

        I’m pretty sure you can just write valid ARM/RISC machine code at the right flash address by hand and it will just work. Might be a bit inconvenient, of course. But I’ve done a bit of that on other ARM chips. Even in the 21st century, sometimes the quickest way to get results is typing in the hex codes for “write 42069 into r0 and jump to that function, then see if the function spits out the funny number”.

  • one_old_coder@piefed.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 days ago

    In C++, main MUST return int, but it can be omitted, like int main() { }

    If the Pico is a microcontroller without an OS, it’s not supposed to “return,” it makes no sense. It’s like saying “what will you do after you are dead?” You’re supposed to loop forever or something.

    But I may be wrong…