Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:59 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MINT: STCube Programmer in Linux....

     Page 3 of 4    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 01:18am 14 Dec 2021
Copy link to clipboard 
Print this post

As a last resort, I did a RTFM
  Quote  1.2.1 Linux install
If you are using a USB port to connect to theSTM32 device, install the libusb1.0 package by
typing the following command:
sudo apt-get install libusb-1.0.0-dev
To use ST-LINK probe or USB DFU to connect to a target, copy the rules files located under
Driver/rules folder in /etc/udev/rules.d/ on Ubuntu ("sudo cp *.* /etc/udev/rules.d").
Note: libusb1.0.12 version or higher is required to run STM32CubeProgrammer.


To do the second part, you need to navigate to the rules folder in the STM installation first.

It worked for me but I will not be silly enough to say it will for you.

You must be the first on TBS to try and run CubeProgrammer on Linux.

Jim
Edited 2021-12-14 11:20 by TassyJim
VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 01:42am 14 Dec 2021
Copy link to clipboard 
Print this post

I thought it would be simple to run Cube on Linux, simply cos there was a Linux version on the ST website.  

I STILL have not ever received any forum confirmation email, so I can't seem to join the ST forums and ask there, if I never get the confirmation email.  Yes, I did check my spam and junk folders.  I keep them empty just about every day, but there was nothing in there either.

Oh well.

I will try out what you quoted, and yes - I probably should have RTFM myself, but I thought it would be easy to get going if the application installed OK.  
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 05:38am 14 Dec 2021
Copy link to clipboard 
Print this post

I went to try this now, and on BOTH monitors of Mint, the taskbar and "Start menu" are now invisible.  I don't know why - they were there last night.

Forced a full reboot, but now I don't have any menu bar thing at the bottom of EITHER screen as you would normally expect.  This means I cannot run anything other then what is iconized on the desktop.

That also means I cannot call up the console, as I need the menus to do that.

I've switched back to my Windoze Ten machine for now so I can post this, but does anyone know how I can restore the missing start-menu/taskbar thingy?

Once I get that back, I can try Jim suggested quote.
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 06:34am 14 Dec 2021
Copy link to clipboard 
Print this post

ctrl_alt-T will open a terminal for you.

Not sure what you can do about the missing taskbar.
I still haven't worked out what flavour of Mint you are running.

The 'windows' key opens the start menu.

Jim
Edited 2021-12-14 16:44 by TassyJim
VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 06:39am 14 Dec 2021
Copy link to clipboard 
Print this post

Sorry for not mentioning it before.
Mint 20.2 Cinnamon.
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 06:47am 14 Dec 2021
Copy link to clipboard 
Print this post

If you can't find it through the start menus (Windows key), I did find this one to run in a terminal:

gsettings reset-recursively org.cinnamon

while you are in the terminal enter:
inxi -Sz

and tell us what it gives.
VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 07:05am 14 Dec 2021
Copy link to clipboard 
Print this post

Hi Jim - thanks for your persistence.

CTRL+ALT+T - this DOES open a terminal, so now I have that.
'Windows' key DOES NOT bring up 'Start menu' for me.
There is simply no effect at all.

But now I have the terminal, I can proceed.

Stay tuned.

@ Jim: Much love.    

I have the taskbar/menu thing back now.
I wonder what the hell went on there? (rhetorical)





Now, the next bit....
Edited 2021-12-14 17:14 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 07:23am 14 Dec 2021
Copy link to clipboard 
Print this post

OK, results of the inxi -Sz:



Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:48am 14 Dec 2021
Copy link to clipboard 
Print this post

Now you can try the fixes for CubeProgrammer...

Jim
VK7JH
MMedit
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 12:44pm 14 Dec 2021
Copy link to clipboard 
Print this post

It would make sense for ST's tool to put up a prominent message about needing udev rule(s).

(I do have a similar rule but TBH forget how many years ago I put it there.)

On the taskbar, mine can be slid off (& back on) to allow more free screen area. I'm not on Mint but maybe it's similar?

John
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 02:32am 15 Dec 2021
Copy link to clipboard 
Print this post

No co-operation.





I give up at this point.

Might not really be that much of an issue.
I get the vibe that the latest PicoMite firmwares are going to support basic colour VGA now, so the Black Pill module port might be getting aborted.
I'm waiting for Peter to confirm that, but it would not surprise me.

I CAN copy updated firmware files fine to the PicoMite as it shows up as a small flash-drive, and Mint handles that just fine.

Won't help for the CMM2, but it's gonna be months before I can get more chips, so we might have worked it out by then - who knows!
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 05:29am 15 Dec 2021
Copy link to clipboard 
Print this post

hi grogster,
   have you done BOTH of:

echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/45-stdfu-permissions.rules > /dev/null


(as a single line), AND:

sudo adduser $USER plugdev


just cut (from this message) and paste each of the lines into a command terminal. both are CASE SENSITIVE, and both will prompt for your password.

the purpose of the first line is to create a file called /etc/udev/rules.d/45-stdfu-permissions.rules containing the one line of text: SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="plugdev"

this allows access to the VDI/PID 0483:df11.


cheers,
rob   :-)
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:20am 15 Dec 2021
Copy link to clipboard 
Print this post

Remind me not to ask you to test MMEdit for Linux!

To fix your latest problem, I would go to my Update Manager and change the Software Sources.
You can change them and then change them back if you like. That 'might' cause the files to get rewritten.

Jim
VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 11:18pm 15 Dec 2021
Copy link to clipboard 
Print this post

WORKING!!!!

Rob's commands made things work.




...and then - YAY!  



Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:17am 16 Dec 2021
Copy link to clipboard 
Print this post

Good to see.
The second part of the STM instructions would have copied this to the rules:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", GROUP="users", MODE="0666"


It also does similar for STlink connections.

Jim
VK7JH
MMedit
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 08:21am 16 Dec 2021
Copy link to clipboard 
Print this post

Excellent news! :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 11:05am 16 Dec 2021
Copy link to clipboard 
Print this post

am pleased to hear things worked out    


would a few of you who have (one or more) boards that use the USB DFU protocol, and who are running any variety of linux, care to possible carry out the following experiment for each device and post the results here:

1. open a command window
2. type dmesg -w
3. press the 'enter' key on your keyboard a few times to clear some blank lines in the window
4. plug in the USB DFU device
5. press the 'enter' key
6. unplug the USB DFU device
7. select and copy the resulting messages, and post them here
8. when finished, press ctrl-C (or just close the window) to end dmesg


you should see output something like:

[1036476.046831] usb 2-1.2: new full-speed USB device number 33 using ehci-pci
[1036476.161027] usb 2-1.2: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[1036476.161037] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1036476.161040] usb 2-1.2: Product: CP2102 USB to UART Bridge Controller
[1036476.161043] usb 2-1.2: Manufacturer: Silicon Labs
[1036476.161045] usb 2-1.2: SerialNumber: 0001
[1036476.161908] cp210x 2-1.2:1.0: cp210x converter detected
[1036476.166374] usb 2-1.2: cp210x converter now attached to ttyUSB0

[1036481.713467] usb 2-1.2: USB disconnect, device number 33
[1036481.713691] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[1036481.713715] cp210x 2-1.2:1.0: device disconnected



with this information, i can likely create a GUI program that will create the necessary udev file entries, as well as perform the adduser. it will do something like:

a. prompt you to plug in the USB DFU device
b. detect the VID/PID in the dmesg output and ask if you'd like the necessary rule created
c. if OK'ed, append the necessary line to the end of the .rules file and add the current user to the plugdev group


cheers,
rob   :-)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 01:05pm 16 Dec 2021
Copy link to clipboard 
Print this post

Rob - just DFU things?

Won't they all be 483 ... df11?

John
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 05:44pm 16 Dec 2021
Copy link to clipboard 
Print this post

  JohnS said  Rob - just DFU things?

Won't they all be 483 ... df11?

John


well, the vendor id 0x0483 belongs (exclusively) to ST Micros, does any other manufacturer produce devices that are USB DFU? also the PID 0xDF11 seems to also be used by ST Micros for "Digital Radio in USB mode".

so, i don't know the answer. i've not dealt with USB DFU devices before, and do not have any myself.


cheers,
rob   :-)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 06:16pm 16 Dec 2021
Copy link to clipboard 
Print this post

I've plenty but all look to be STM and so 483:df11

(I normally log dmesg strings when I first connect a device.)

John
 
     Page 3 of 4    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025