STM32Cube unit testing tutorial with STM32 disco l475vg iot01a

Hi I’m trying to od unit testing tutorial (STM32Cube HAL and Nucleo-F401RE: debugging and unit testing — PlatformIO latest documentation)with the board STM32 disco l475vg iot01a but without success. The test stuck at If you don't see any output for the first 10 secs, please reset board (press reset button)

Microsoft Windows [version 6.3.9600]
(c) 2013 Microsoft Corporation. Tous droits réservés.

C:\Users\gry\Documents\PlatformIO\Projects\STM32CubeProject>pio test -v
PIO Plus (https://pioplus.com) v1.4.6
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items

================================================================================================== [test/*] Building... (1/3) ==================================================================================================
Processing disco_l475vg_iot01a (platform: ststm32; board: disco_l475vg_iot01a; framework: stm32cube)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: ST STM32 > ST DISCO-L475VG-IOT01A
SYSTEM: STM32L475VGT6 80MHz 128KB RAM (1MB Flash)
DEBUG: CURRENT(stlink) ON-BOARD(stlink) EXTERNAL(blackmagic, jlink)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 0 compatible libraries
Scanning dependencies...
No dependencies
Archiving .pioenvs\disco_l475vg_iot01a\libFrameworkHALDriver.a
Linking .pioenvs\disco_l475vg_iot01a\firmware.elf
Checking size .pioenvs\disco_l475vg_iot01a\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   0.2% (used 288 bytes from 131072 bytes)
PROGRAM: [          ]   0.5% (used 5552 bytes from 1048576 bytes)

================================================================================================= [test/*] Uploading... (2/3) =================================================================================================
Processing disco_l475vg_iot01a (platform: ststm32; board: disco_l475vg_iot01a; framework: stm32cube)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: ST STM32 > ST DISCO-L475VG-IOT01A
SYSTEM: STM32L475VGT6 80MHz 128KB RAM (1MB Flash)
DEBUG: CURRENT(stlink) ON-BOARD(stlink) EXTERNAL(blackmagic, jlink)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 0 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pioenvs\disco_l475vg_iot01a\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   0.2% (used 288 bytes from 131072 bytes)
PROGRAM: [          ]   0.5% (used 5552 bytes from 1048576 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, jlink, mbed, stlink
CURRENT: upload_protocol = mbed
Looking for upload disk...
Auto-detected: D:\
Uploading .pioenvs\disco_l475vg_iot01a\firmware.bin
Firmware has been successfully uploaded.
(Some boards may require manual hard reset)

================================================================================================== [test/*] Testing... (3/3) ==================================================================================================
If you don't see any output for the first 10 secs, please reset board (press reset button)

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

Do you see any output from device via pio device monitor?

No it sticks at
If you don’t see any output for the first 10 secs, please reset board (press reset button)
And not any othr output

I mean open Serial Device Monitor from IDE. Do you see any output?

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