Is arduino the right approach?

Hi all,

To start I will say I am a complete noob when it comes to arduino, I have always been into electronics and have a fair base knowledge to start. I started learning python a little while ago and really want to put some things into use.

So basically what I’m looking at doing, I work for a company that manufactures machines that run on custom stm32 based boards, when we program them we use a laptop and an st-link v2 and tbh it a pain in the a. So I want to build a dedicated programmer for it and I’m not sure if arduino is the way to go or there is a better option? Any advice is appreciated tia……lee

Do some research.

According to the above link, programming an STM32 with an AVR chip is an enormous pain, and is actually impossible out-of-the-box.

Ask your supplier to program them! or buy them direct from manufacturer, They will program them for you.

I have read through a few articles that say about making an stm32 programmer with blue pill and so on but not looked into it that much, but if it’s honestly that much of a pain then guess I will have to consider a different route, thanks for the reply

Digikey did this for many of our customers. Very satisfactory results. They even save your program forever, so many years on you can get a chip programmed with that program. They even copied a program from a 20 year old chip onto new chips, when the company could not find the original program. Great to work with!

Unfortunately we can’t as we use the same board for quite a few different machines and have a different programs for each, thanks for the reply

Not a good excuse! Mark your own chips with a program ID.

Hmm not sure I get what you mean, we are supplied built boards and we assemble machines with the same board in each but they need programming depending on their function, we cannot have specific boards for specific machines

That link is

Asked 7 years, 6 months ago

so don’t let that be the end of your research. I glanced at it and it is all relative as to what is, and isn’t, a PITA or “impossible”.

There has been some progress in the last few years, so.

a7

Hi a7,

Ok thank you I will do a decent bit of research before going forward, like I said before I am just unsure as to the suitability of the arduino and thought asking was the quickest solution and maybe a little time saving but see that there is “ differing opinions” of getting someone else to do it which defeats the object of what I’m trying to accomplish. Would you happen to know if the blue pill is something that I can use?.. that is for the reply lee

I think You are on the right track, someway building a more convenient programmer.
14 years in developing code for heavy forklift trucks, maintaining some 10 different standard versions were used and plenty of custom specific versions. Circuits ready from manufacturer on stock would be a waste as all code was maintained, improved constantly.

I wasn't suggesting that OP use only that as their research.

EDIT - Something more recent.

No, but didn’t you notice how it seemed like you completely took all the wind out of the OP’s sails by making your remarks?

I just thought he might not know you, so.

a7

Might be a good idea to save your company the time & effort and buy an off the shelf production programmer. You're not the first one to have this problem and solutions already exist. e.g., Equinox Products Page - ISPjuno ARM - Portable Production ISP Programming System for ARM microcontrollers

or google "standalone ST programmer" for more options. Here's one made specifically for STM32 boards.

Something I would like to clarify for @hoshm is that Arduino is not only about AVR. It is true that the first Arduino boards used AVR chips and the AVR-based boards like the Uno, Mega, Leonardo, etc. are still the most popular in the Arduino community, but a large and ever growing number of different microcontrollers and architectures can be used with the Arduino language, tools, libraries, sketches, documentation, etc.


Not very much Arduino-related, but you might take a look at this approach used by SparkFun, which I thought was very interesting:
https://learn.sparkfun.com/tutorials/raspberry-pi-stand-alone-programmer/all

They are using it to program AVR chips, so the specifics are not directly applicable. But perhaps this idea of having a dedicated headless cheap single board computer (Raspberry Pi in this case) dedicated for each product line will work for you. You may end up still needing to have a programmer device such as an ST-Link V2 or Blue Pill DIY programmer attached between the Raspberry Pi and the target device, but I don't see that as being an issue.

Ok; I'd normally expect an stlink to be pretty convenient. What specifically makes your current process so much of a pain? Perhaps what you really need is new laptop-side software?

That's a great suggestion. I once had an experience buying my own for my nephews school project and it was really convenient.

That's the real question isn't it? Leading off with "I'm doing X and I don't like it because Y" would be more helpful.

Well, STM32s have been around for a few years, so if programming them was;

tbh it a pain in the a

One does wonder why the problem was not solved many years ago.

Not sure if you're being sarcastic, but I linked to multiple solutions for sale.