2024-08-20 07:39 AM
Using STMCubeMX 6.12.0
We're hoping to setup a CI pipeline using the CubeMX command line functionality and are having problems downloading and installing FW packages among other things.
I've followed the connection setup instructions and get the green check mark saying it works.
I've found that interactive mode described in the manual does not work. As suggested in this post it does in fact launch into the CubeMX application/IDE. As I understand the following command should result in a MX> prompt but does not.
& "$env:STM32CubeMX_PATH\jre\bin\java" -jar "$env:STM32CubeMX_PATH\STM32CubeMX.exe" -i
The manuals suggest using the following commands to download and install FW packages:
I've placed those commands in a script
swmgr install stm32cube_f4_1.28.0 ask
exit
and executed the scrip via PowerShell:
& "$env:STM32CubeMX_PATH\jre\bin\java" -jar "$env:STM32CubeMX_PATH\STM32CubeMX.exe" -q .\myscript
Which results in the following error:
..... [Lots of noise omitted]
swmgr install stm32cube_f4_1.28.0 ask
2024-08-20 10:19:19,160 [INFO] UserAuth:417 - Internet connection configuration mode: 1
2024-08-20 10:19:19,170 [INFO] JxBrowserEngine:152 - Initiate JxBrowser Engine with user profile folder
..... [Lots of noise omitted]
2024-08-20 10:19:21,568 [INFO] WebApp:578 - Web application path used jar:file:/C:/Program%20Files/STMicroelectronics/STM32Cube/STM32CubeMX/STM32CubeMX.exe!/db/plu
gins/mcufinder/reactClient1/index.html
This download action requires prior login. To proceed, please use the 'login' command with your my.st.com account email and password.
Run 'login <email> <password> <remember_me>' for example 'login john.smith@st.com mypassword y'.
If you do not have a my.st.com account, please visit https://st.com website to create one.
KO
exit
Bye bye
Note the error saying the login command is required. So I add the login command before the install as it requests.
login some.user@mycompany.com myPassword y [actual credentials omitted of course]
swmgr install stm32cube_f4_1.28.0 ask
exit
For which I now receive this error:
..... [Lots of noise omitted]
2024-08-20 10:24:45,580 [INFO] UserAuth:179 - activating auth plugin
login some.user@mycompany.com myPassword y [actual credentials omitted of course]
Usage:
log
log <level>
set
import
ocxtest
ocxt <opt_ide:all|iar|keil|sw4> <opt_copy_fw:NONE|LITE|FULL> <opt_usr_cubex_path: open cube example test
MultiConfig
load
load <mcu>: open mcu xml file
get
lock
reset
clearpinout
clearpinout: remove all the pin mapping
possible_value
not_a_possible_value
add
check
csv
generate
tinyload
tinyload <mcu>: load mcu for pinout only
waitclock
Wait for a delay in seconds until clock has finished its initialization
switch
unset
export
list
loadboard
loadboard <boardname> <allmodes>]|<nomode> load a board with or without modes
project
setDriver
set Ip driver
SetStructure
Set Application structure (Advanced/Basic).
SetCopyLibrary
Set Copy Library (copy all/ copy only / copy as reference).
pinout
disable2024-08-20 10:24:45,583 [INFO] UserAuth:417 - Internet connection configuration mode: 1
tooltip
clock
updateIpUI
update UI <IpName>: update the UI for a given IP
swmgr
user_analytics
user_analytics <true|false>
config
simulate
isPluginError
isPluginError <pluginName>, where pluginName can be "Clock Configuration", "Pinout & Configuration"
exit_mx
exit_mx: leave mx same way than exit menu
setprop
set a system property: setprop <property> <value>
getprop
get a system property: getprop <property>
getenv
get an environment variable: getenv <variable>
xcopy
xcopy
<sw_vendor>
<sw_version>
<example_name>
<example_path>
<ide:all|iar|keil|swb|cube> default:all
<copy_fw:NONE|LITE|FULL> default:LITE
<opt:user_example_path> default:$HOME/STM32CubEX
<opt:fw_path> default:$HOME/STM32Cube/Repository
<opt:board_name> default: empty
Description: Open cube example test
Example: xcopy "STMicroelectronics" "X-CUBE-BLE2_V3.2.0" "Beacon" "/Projects/NUCLEO-L476RG/Applications/Beacon" "all" "LITE" "" "" "NUCLEO-L476RG"
xts
example testsuite
xtest
xtest <args> : example test command
xbuild
xbuild <project_path>
Description: automatic build command
Example: xbuild "C:\Users\chaumont\STM32Cube\Example\CORTEX_MPU"
popupwrapper
xcubedl
xcubedl <packname> : X-CUBE Download
Help
help: Print Help
Exit
exit: Exit process
script
script <file>: execute all command in file
KO
swmgr install stm32cube_f4_1.28.0 ask
..... [Lots of noise omitted]
The login command appears to be unsupported because it's execution results in the help command output being displayed. Odd, that login is not supported, the previous swmgr command specifically calls it out as necessary (as I showed above) and it's also described in the manual.
Can someone help me understand what I'm actually supposed to do here to download packages? Seems the command line has issues.
2024-08-20 10:17 AM
Manually download all the Cube related install files and store them locally. Have you CI commands install from these local copies. Trying to download stuff from the web in you CI will cause you nothing but headaches.
2024-08-20 10:30 AM - edited 2024-08-20 10:31 AM
Are you suggesting roll my own un-zip routine? i.e. Is manually unzipping the file into the STM32Cube Repository all that's needed?
It seems the swmgr install command is functionally useless anyway as according to the usage I can only (deny|ask) the package license. There is no accept option?
Usage:
swmgr swmgr install <full_cmsispack_name | full_firmware_name | full_filepath> <licence_mode (deny|ask)>: install specified Cmsis packname or Cube Firmware with se
lected license accept mode.
ask - negates the entire concept of command line where you don't want to interact with a UI as it pops up the license acceptance dialog and freezes for user input.
deny - downloads the package (yes, goes through the entire download) and then tosses it out because you automatically deny the license. So net is a NOOP where you downloaded an 800Mb file. Seriously, who actually authored this API and what possible use case does this represent?