2022-06-30 07:42 AM
Hy there!
I'm new on ST platforms and development environments (I'm used to Netbeans-like ones).
Well, I would like to copy (automatically) both .elf executable and the .map files in given folder after building the projet.
This folder ("Out") is placed inside the project path.
I tried by adding a post-building step but i'm not able to find makefile variables sutch as ${ProjName} and so on...
I need those variables to automate the process throgh several configurations.
Where are defined those variable and what they contain?
I saw them, looking at the project options but I'm not able to find a guide to use them to write a building step as I'm used to do in other environments...
Thank You in advance for your support!
iTTy
Solved! Go to Solution.
2022-07-01 05:53 AM
Hi @Kevin HUBER ,
First of all thancks a lot for yous fast reply!
First good fact: following your suggestions and exploring a little bit more the environment i found a list containing a lot of environment variables.
Opening the Project properties -> C/C++ -> Build Variables and checking the voice "Show system variables", will display a comprehensive variable list...
The problem now is that building fails beause makefile seems "Unable to find specified path"
I tried following exactly your example, giving manually full paths and also using environment variables; but the result is always the same.
What I understand watching the console is that now file and paths are correctly expanded in the post-build step, but command fails for some reason.
Could be a "/" vs "\" issue...
About code: I'm just playing on a Nucleo-144 demo board (with a dual core STM32H7) using STM32CubeIDE version 1.9.0 on an empty self-generated project.
I'm focusing on understand how the tool works and how to manage the workflow...
iTTy
2022-06-30 08:44 AM
Hello @iTTy ,
I made a quick test with STM32CubeIde 1.10 and ${ProjName} seems available in post build step:
After the build, the copy is done as expected:
If you still can't access to this variable, you can try to configure a build variable in the property of your project and you set its value to ${ProjName}:
Then you can use this variable
From what I remember, the variable {ProjName} is related to
<name>OpenAMP_TTY_echo_CM4</name>
inside your ".project".
If it still doesn't work please share some codes with us 🙂
Hope it helps,
Kevin
2022-07-01 05:53 AM
Hi @Kevin HUBER ,
First of all thancks a lot for yous fast reply!
First good fact: following your suggestions and exploring a little bit more the environment i found a list containing a lot of environment variables.
Opening the Project properties -> C/C++ -> Build Variables and checking the voice "Show system variables", will display a comprehensive variable list...
The problem now is that building fails beause makefile seems "Unable to find specified path"
I tried following exactly your example, giving manually full paths and also using environment variables; but the result is always the same.
What I understand watching the console is that now file and paths are correctly expanded in the post-build step, but command fails for some reason.
Could be a "/" vs "\" issue...
About code: I'm just playing on a Nucleo-144 demo board (with a dual core STM32H7) using STM32CubeIDE version 1.9.0 on an empty self-generated project.
I'm focusing on understand how the tool works and how to manage the workflow...
iTTy
2022-07-06 02:26 AM
Hello @iTTy ,
Did you success to execute the cp command?
In linux you have to use "/" and in windows "\".
On which OS are you trying to use the CubeIde? Do you still need help?
Regards,
Kevin
2022-07-18 07:07 AM
Hi @Kevin HUBER ,
sorry for my ghosting: I was out for vacations.😁
Coming back at work, I re-started experimeenting on ST platform and after some attempts I fixed my issues!
Well, as you suggested above, there was a path syntax issue: since I'm on a Windows system, I expressed paths using "\"; but it seems that make commands shall be written using linux-like syntax (using "/")!
Therefore your first suggestion was right without "tranlation" to the Windows syntax!
It was so simple! 😅
Thanks a lot for your support!
Regards,
iTTy