1

I like to work on DIY electronics projects every once in a while, but I am still new to this. I generally use STM32 microcontroller rather than Arduino, but one problem with the microcontroller is the various tool-chain it needs to build and deploy my code.

Here is my development environment

  • OS : Ubuntu 18.04
  • IDE : Aton with PlatformIO
  • ToolChain: OpenOCD
  • Framework: stm32-cube

My problem is every once in a while, I do an update and once of this component updates and the entire environment breaks. This happened 3 times in last 4 months, where I had updated something and the next week it stopped working. Now after various troubleshooting and Uninstalling/Installing/Updating, I got everything working again.

Does anyone have any tips on How to maintain the development environment so that I don't have to spend time in fixing the environment rather than working on the project?

Nikul Padhya
  • 512
  • 4
  • 11

2 Answers2

1

If it ain't broke, don't fix it.

You build a virtual machine with the required IDE and tools and nothing else. Disable all possible automatic update methods. Validate it, i.e. verify that it can reliably build and debug programs for the hardware you're going to work on, even without network access (you cannot be sure that any network service of today will be around in 20 years, when you'll need that Y2038 fix for your old DIY calender). Archive it, along with the installers used.

The virtual machine has no network interfaces, and you control physical access to it, therefore security updates are not critical. If it ever becomes compromised, just restore the backup.

Don't update.

When the development environment does no longer fulfill your needs, e.g. you need to use a new compiler feature, framework etc, create a new virtual machine. You can build it up again from scratch, or update the old one, but if you do it by updating, always make a copy of the old virtual machine first, and keep it around until no more projects made with it are in service.

1

I am answering my own question because I found what I was looking for.

Docker is a perfect way to create and snapshot your development environment for Embedded development. Here is an awesome guild https://dev.to/dalimay28/using-docker-for-embedded-systems-development-b16

Alternatively, if you are familiar with docker, give the following command a try. Many awesome folks have worked on something, that can be used as a base.

docker search stm32
Nikul Padhya
  • 512
  • 4
  • 11