Skip to main content
Associate II
October 11, 2023
Solved

Bug using CubeMx "User Actions" feature

  • October 11, 2023
  • 5 replies
  • 4745 views

I started using the new "User Actions" feature, and it seems that there's an issue with the function that allows running a script after code generation. I managed to make the feature work without any problems when the "Window -> Outputs" option is checked. However, when it's unchecked, CubeMx completely freezes. In such cases, you have to terminate its process through the task manager, which is not desirable.

For information, I use ".bat" file. CubeMx version 6.9.2

This topic has been closed for replies.
Best answer by Semer CHERNI

Hello,

The issue is escalated to the developers and it's under investigation.

Internal ticket number: 164200 (This is an internal tracking number and is not accessible or usable by customers).

BR,

Semer.

5 replies

Technical Moderator
October 12, 2023

Hello @Jdescot 

Thank you for having reported the issue.

I escalated this internally to STM32CubeMx team for check and will come back to you soon with update.

Thanks

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
Semer CHERNI
ST Employee
October 19, 2023

Hello @Jdescot 

First let me thank you for posting.
Could you share the content of the script you are using. In fact at the moment CubeMX have an issue under investigation about "Pause" command in the script.

KR,

Semer.

JdescotAuthor
Associate II
October 20, 2023

cubemx_post_gen should be ".bat" file. 

Example of content : 

C: & cd C:\repo\simple_project & powershell -command "remref"

remref content (it's a powershell function) :

function RemoveReference([String]$repo, [String]$project)
{
$PSDefaultParameterValues = @{ '*:Encoding' = 'utf8' }

$file_name = ".cproject"

$regex_replace = "\t+<listOptionValue builtIn.+\/Users\/.+"

(Get-Content $file_name) -replace $regex_replace, '' | Set-Content $file_name

(gc $file_name) | ? { $_.trim() -ne "" } | set-content $file_name
}
New-Alias -Name remref -Value RemoveReference -Option AllScope

As you can see, there is no "Pause" related function.

Thank you,

Joël

Semer CHERNI
Semer CHERNIBest answer
ST Employee
October 27, 2023

Hello,

The issue is escalated to the developers and it's under investigation.

Internal ticket number: 164200 (This is an internal tracking number and is not accessible or usable by customers).

BR,

Semer.

JdescotAuthor
Associate II
February 1, 2024

Any updates ?

Thank you !

Semer CHERNI
ST Employee
February 2, 2024

Hell @Jdescot 

Sorry for the delay to respond.

The case is under investigation by our teams. I will keep you updated when the fix is implemented.

KR,
Semer.

JdescotAuthor
Associate II
November 22, 2023

Any update ?