STM32Cube unit testing tutorial with STM32 disco l475vg iot01a

This is what I see

It means that other program uses this port. Could you try reconnect board and try again?

I’ll try this later since I returned the Win 8.1 PC to it’s owner. So I have to remake the setup in my own win 7 PC

I’ve change my setup and I have a problem compiling this code. I have to solve this before returning back to this problem.

Just with with the files main.h and main.c (I changed "stm32f4xx_hal.h to “stm32l4xx_hal.h”) and the platform.ini:

[env:disco_l475vg_iot01a]
platform = ststm32
board = disco_l475vg_iot01a
framework = stm32cube
debug_tool = stlink

I get this, what does it mean ?

Do you have a space in your username?

Which username are you talking about ?

Your windows username.

Yes I have a space in my windows username

See Fresh instal of VSC and PIO - stm32 Examples dont compile - #2 by maxgerhardt

Compilation worked now with


[platformio]

home_dir = "/Users/Solid Snake/.platformio"

[env:disco_l475vg_iot01a]

platform = ststm32

board = disco_l475vg_iot01a

framework = stm32cube

debug_tool = stlink

See Computer user name has a space, platformio cant handle it. · Issue #149 · platformio/platform-ststm32 · GitHub

It’s rare issue and I can’t reproduce it. SCons automatically handles arguments which contain spaces. I see that in some cases on Windows it does not do that correctly.

What is your OS and locale?

I’m on Windows 7
My home dir: C:/Users/Solid Snake/.platformio

I’ve done

[platformio]

home_dir = "/Users/Solid Snake/.platformio"

and the compilation works. I can go back to the unit testing

I’ve redone the test in my Win7 PC

it gaves nothing, I’ve opnenned the monitor it gaves this “couldn’t not open port COM4”, after disconnecting then reconnecting it gaves the same thing

> Executing task: C:\Users\Solid Snake\.platformio\penv\Scripts\platformio.exe device monitor <

could not open port u'COM4': could not open port u'COM4': WindowsError(5, 'Acc\xe8s refus\xe9.')
Le processus du terminal s'est achevé avec le code de sortie 1

Le terminal sera réutilisé par les tâches, appuyez sur une touche pour le fermer.

> Executing task: C:\Users\Solid Snake\.platformio\penv\Scripts\platformio.exe device monitor <

could not open port u'COM4': could not open port u'COM4': WindowsError(2, 'Le fichier sp\xe9cifi\xe9 est introuvable.')
Le processus du terminal s'est achevé avec le code de sortie 1

Le terminal sera réutilisé par les tâches, appuyez sur une touche pour le fermer.

Please provide an output from

$ pio device list

It gave this

pio device list
COM4
----
Hardware ID: USB VID:PID=0483:374B SER=6 LOCATION=1-3.3:x.2
Description: STMicroelectronics STLink Virtual COM Port (COM4)

what’s new for this issue ?

I see that you can’t even use this COM port from a terminal. I’m not a Windows user. Should you have any permissions to get access to COM ports? Could you try any external Serial Port monitors to check if this port works? For example, Putty.

No I can use this port to upload the code and do anything with it except doing this test.