Automatic verification + upload of code

Hi,

I have some hardware component that I flash using the Arduino IDE.

The steps consist of:

  • Modify some configuration in the code.
  • Verify the code.
  • Upload the code.

I would like to automate these tasks using a shell script that would receive the configuration as argument.

Is it possible?

Thanks,
Mickael

Is it possible?

How will this batch process edit the code? The rest is easy.

I thought about using M4. It should be enough.

How the rest can be done?

Thanks, Mickael

I thought about using M4.

Makes sense to me. Scare the code into rewriting itself.

I was meaning...

GNU M4 - GNU Project - Free Software Foundation :slight_smile:

Could the configuration parameters take the form of an .h file stored in the same directory as your sketch so it gets combined with it when compiled?

If yes then turn on verbose output for compile and upload and capture the results to text files. This should give you an idea what happens to compile/upload your sketch.
Another option might be Arduino Builder that has both GUI and CLI versions.

I don't really need help for the text replacement part.

I was mostly asking for the automatic compilation + upload.

Arduino Builder CLI sounds great, I will check.

Thank you