• @xmunk
    link
    4623 days ago

    You’re probably using the wrong compiler flags, did you remember -Wall -Oz -nostdlib?

    • Aatube
      link
      fedilink
      40
      edit-2
      23 days ago

      -Oz

      Optimize aggressively for size rather than speed.

      TIL

      • @xmunk
        link
        2923 days ago

        It is, honestly, the dumbest of the -O flag option, which is why I picked it. I’m sure there are times when it’s useful, but it’s nearly never the right choice.

            • @[email protected]
              link
              fedilink
              423 days ago

              As someone who has worked on embedded systems for the past 30 years: It used to be a real big deal, but for the past 10-15 years it hasn’t. We now have fully fledged multi core systems running everything. Even small embedded sensors or actuation controllers are 100+ MHz microcontrollers with oodles of flash and ram.

              Now there has been an interesting turnaround with the whole chip shortage for the past years. All the young folk are at a loss, being used to just putting powerful chips all around willy-nilly. So they turn to the old folk like me to figure out designs with less chips, running busses all over and connecting dumb sensors/actuators to a central processing unit.