Use codesys to program STM32

  • andrija

    andrija - 2020-07-27

    I don't know if this is a thing, but I was wondering if it was possible to use codesys to program an STM32, like I would program a PLC. On the website (,
    it says that STM32 is supported, but does that mean that I could just plug a programmer into my laptop, open codesys and start programming, or would I need some additional firmware, and/or external components?
    If it is possible, has anyone tried it so far?

  • Ingo

    Ingo - 2020-07-27

    Hi Andrija,
    and the guys who liked this. Sadly this is not possible this way. But we support this processor explicitely with our runtime. So someone who buys a toolkit and wants to use this processor family has an easy start.

    But I'd like to know more about your use case. What do you plan to implement?


  • andrija

    andrija - 2020-07-27

    The plan is to build a custom industrial-like controller, and to use a 32 bit microcontroller as the brains. An idea crossed my mind that it would be nice to have the option to program it using LD or FBD (like a PLC), in order to make it easier to program for an electrical engineer, and make it easier for maintenance.
    All of this is currently just an idea, due to lack of free time because of my regular job.

    • Morberis

      Morberis - 2020-07-28

      Perhaps the Beaglebone Black/Industrial/Enhanced would work for you? You could also use a Raspberry Pi Compute module or a Raspberry Pi. Hilscher uses a Raspberry Pi CPU on their own board for the NetPi and not a compute module I believe. Maybe not as cost effective as using a STM32 depending on the scale you would want to produce at.

      I would have recommended Sequent Microsystem's hats but they no longer have any Codesys support though perhaps you could roll your own drivers or pay them.


      Last edit: Morberis 2020-07-28
  • andrija

    andrija - 2020-07-28

    It wouldn't be large scale production, at least not for now, maybe a couple of units, for prototyping, and testing for bugs and errors

    • Morberis

      Morberis - 2020-07-30

      Well I'd be excited to see what you come up with. I don't know how helpful the boards I listed would be in the case that you want to continue with a STM32 solution. I'm sure you know but the STM32 Discovery boards are very handy for 1 off and low production run STM32 projects. I know in the music community the STM32F407G-DISC1 is the board of choice for custom midi controllers.


      Last edit: Morberis 2020-07-30

Log in to post a comment.