cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to run some applications on STM32 through the STMCubeIDE. Just wanted to know if there is any API which can be used inorder to perform the same functions using CLI.

VNaga.2
Associate II

The overview of the workflow is as follows: Open the STMCubeIDE -> Open new Project -> elect the directory -> Build -> debug -> build

So I am looking for a python library/API which can be used to perform the same function through Automation.

The UI automation through GUI is a little complicated approach, hence I am looking for CLI alternatives to perform the above mentioned steps on STM32.

9 REPLIES 9
Sarra.S
ST Employee

Hello @VNaga.2​,

Please check this user manual and precisely section 5 STM32CubeProgrammer CLI for MPUs

Thank you!

Sarra

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.

MM..1
Chief III

I mean you search for c:\ST\STM32CubeIDE_1.***.0\STM32CubeIDE\headless-build.bat 

VNaga.2
Associate II

Hi @Sarra.S​ and @MM..1​ 

I tried the below command C:\ST\STM32CubeIDE_1.11.0\STM32CubeIDE>stm32cubeidec.exe -nosplash --launcher.suppressErrors -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data

I can see Access Denied error in the command prompt. Could you please help me with this.

The workspace as well as the project are not in the same path.

For windows cmd shell and powershell "\\" is not a quoted backslash. Just use single \.

VNaga.2
Associate II

Hi @Pavel A.​ , thanks for the help. It is working for me.

But when I load another application, the previous application loads back onto the MCU and not the specified application.

  • Is there any reason for this behaviour ?
  • Is it necessary to erase the application before we load any other application ?
  • Also, is there a way to run in mode through command line after the building ?

VNaga.2
Associate II

Can anyone please provide inputs on these

 when I load another application, the previous application loads back onto T2 and not the specified application.

  • Is there any reason for this behaviour ?
  • Is it necessary to erase the application before we load any other application ?
  • Also, is there a way to run in mode through command line after the building ?

I need these information to progress with automation. I am using python for automation.

Wijeden RHIMI
ST Employee

 Hello@ VNaga.2,

Could you please check those stuffs :

  1. Read about headless build user guide
  2. Read GDB manual on using python for scripting debug
  3. You could find this two manuals in the help info center
  4. What do you mean with T2?

We need those answers to help you and solve your issue !

Wijdene,

VNaga.2
Associate II

Hi @Wijeden RHIMI​ ,

Please point me to the help info center to find the user guides. I could just find the normal STMCudeIDE user guide.

I need to find the GDB user guides as well as the headless user guides.

Wijeden RHIMI
ST Employee

Hello@VNaga.2,

  1. headless build : go to  help ->info center->2.4.3
  2. GDB server manual: go to help ->info center->STL_LINK GDB server manual

Maybe those two screenshots bellow could help you :

0693W00000Y7THVQA3.png0693W00000Y7TFeQAN.png 

Don't hesitate to ask any additional questions .

Wijeden,