cancel
Showing results for 
Search instead for 
Did you mean: 

Project building process

iTTy
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
iTTy
Associate III

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.

0693W00000QKHJsQAP.pngOpening 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"

0693W00000QKHOdQAP.png 

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

View solution in original post

4 REPLIES 4
Kevin HUBER
ST Employee

Hello @iTTy​ ,

I made a quick test with STM32CubeIde 1.10 and ${ProjName} seems available in post build step:

0693W00000QKCqSQAX.png 

After the build, the copy is done as expected:

0693W00000QKCqhQAH.png 

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}:

0693W00000QKCrkQAH.png 

Then you can use this variable0693W00000QKCrzQAH.png 

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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
iTTy
Associate III

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.

0693W00000QKHJsQAP.pngOpening 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"

0693W00000QKHOdQAP.png 

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

Kevin HUBER
ST Employee

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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
iTTy
Associate III

Hi @Kevin HUBER​ ,

sorry for my ghosting: I was out for vacations.:beaming_face_with_smiling_eyes:

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! :grinning_face_with_sweat:

Thanks a lot for your support!

Regards,

iTTy