[n00b] Flash .elf file directly with Qt Creator

Hi, i’m Carlos and this is the first day i use PlatformIO :grin:

The documentation is great and i have been able to integrate PlatformIO with libopencm3 framework using Qt Creator as IDE, my OS is Ubuntu 16.04.

Following the documentation i can build directly on Qt Creator (using the build button), and then using the command line on the project directory upload the .elf file to the target with the following command:

$ platformio run -t upload

I would like to upload the .elf file to the target using the Run button, but i haven’t been able to configure Qt Creator do it properly, here’s what i have been trying so far:

  1. Go to Project menu on the left side of Qt Creator, then choose Run option.
  2. On the Run configuration i find the .elf file using the Browse button (/.pioenvs/disco_f407vg/firmware.elf), then on Command line arguments option i written the same command i use on the command line:

platformio run -t upload

  1. Working directory i leave it as default %{buildDir}

  2. What i get:

Failed to start program. Path or permissions wrong?

Is this the proper way to configure Qt to do this?
There’s another way?
or i just have to be less lazy and do it from the command line by hand :disappointed_relieved:?

Thanks in advance, i did search on the forum similar threads but none are related to Qt.


Have you resolved this issue?


No i haven’t, there’s a concept of “kits” on Qt Creator, and i had seen that it’s used to develop on cross-platform projects, so i will try to follow that path, got some free time on the following weeks.

Or maybe there’s other ways to do it?

You should use default desktop kit and select as compiler GCC from the pltaformio toolchain. Than you can build with “platformio run” direct from qt and have advantage of qt code navigation and error parsing. I have completed this setup right now (including build and upload). It works really great!!! I was unable to get work of error parsing with other IDEs.