Skip to main content
Graduate II
June 30, 2022
Solved

Project building process

  • June 30, 2022
  • 4 replies
  • 1895 views

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

    This topic has been closed for replies.
    Best answer by iTTy

    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

    4 replies

    Technical Moderator
    June 30, 2022

    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

    iTTyAuthorAnswer
    Graduate II
    July 1, 2022

    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

    Technical Moderator
    July 6, 2022

    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

    iTTyAuthor
    Graduate II
    July 18, 2022

    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