CppCon 2018: Michael Caisse “Modern C++ in Embedded Systems - The Saga Continues”

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 18

  • @xavierthomas1980
    @xavierthomas1980 5 років тому +40

    Hi there :) I wish I was attending the conference.
    The talk start with a presentation of the speaker, his employer and the industrial applications for which they want to use C++.
    The toolchain and setup information starts at 14:08
    The C++ stuff starts at 22:50
    Great talk. Also I totally agree that, for non-trivial projects, spending time to get the right tools and workflow is totally worth it and is repaid x10 when comes the crunch time at the end of the project.

  • @petermuller9518
    @petermuller9518 5 років тому +4

    We have gone through the same hassle of getting an upstream gcc with cmake working. Was a medium-high amount of work but enabled a whole new workflow.
    However, we have not yet got clang to work for ARM CM0+, any pointers for that?

    • @Trass3r
      @Trass3r 5 років тому +2

      Interesting. It was pretty straightforward for me: gist.github.com/Trass3r/3b70ee33d9b1319bbe78de6bdb09c9dc

  • @LemonChieff
    @LemonChieff 5 років тому +1

    I have one issue with this: whitespace.
    I get it, it's a slide but it's actually harder to read.

  • @JeremyCoppin
    @JeremyCoppin 5 років тому +2

    Strong types are IMO the best, and perhaps only reason, to contemplate using c++ in embedded applications. The risk of letting a bunch of c programmers loose on c++ scares me on an entirely different level.

  • @youtou252
    @youtou252 5 років тому +13

    This talk could be 20 minutes long

    • @yugr
      @yugr 5 років тому +1

      Or 10.

  • @JeremyCoppin
    @JeremyCoppin 5 років тому +1

    Or you use __inline instead of using macros.

    • @LemonChieff
      @LemonChieff 5 років тому

      Or use constexpr and if it has to be evaluated at runtime let the compiler choose whether or not to inline it. Now if you're not sure about doing that just do both and benchmark them. (Properly, with proper randomisation and statistics)
      Or… we can just look at the assembly right away and notice we're really doing the same in both C and C++: godbolt.org/z/ov8816 the only possible difference is that with the C++ version you can't ignore what `make_32()` return otherwise your compiler isn't gonna be happy.
      Remember last time you checked what `printf()` returned?
      I can remember always checking `fgets()` and `scanf()` (just don't use `scanf()`) but never `printf()`

  • @Hauketal
    @Hauketal 5 років тому +1

    Liked. You know why. :-)

    • @arkadigrosman7466
      @arkadigrosman7466 5 років тому

      there ia nothing about contemporary C++ here, not much about C++ in general. Not sure what was intended audience for the talk was. You can see people leaving and for the good reason

    • @Hauketal
      @Hauketal 5 років тому

      @@arkadigrosman7466 The "you know why" was for the presenter. See the video again a few times to know it too. :-)
      Pesonally I'd much more liked to get a how-to presentation. In my development work I have to invent an embedded library piece by piece as needed, or whenever that is to complex, just use C like all the others.
      I see the presentation more as a call to action to improve the sad state of embedded C++. But who might do it? GCC is available for some embedded processors, like ARM or AVR. But there are no libraries for the hardware interfaces. This should be a task for the hardware vendors, but who has enough buying power to convince them?
      The motor industy is an obvious choice, but with MISRA-C thex went another path, dumbing down the language for interns still in college instead of simple to use, expressive libraries.
      Lastly, a lot of hobbyists are using C++ probably without knowing it via the Arduino system, again without an expressive library.
      Any idea to improve the situation?

  • @JeremyCoppin
    @JeremyCoppin 5 років тому +2

    Best talk ever on not using c++ in embedded apps.

  • @JeremyCoppin
    @JeremyCoppin 5 років тому +1

    Another pc developer who does not understand the embedded world. Main function with args... Seriously? That's not embedded! Dammit!