STM32Cube unit testing tutorial with STM32 disco l475vg iot01a


#1

Hi I’m trying to od unit testing tutorial (https://docs.platformio.org/en/latest/tutorials/ststm32/stm32cube_debugging_unit_testing.html)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


#2

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


#4

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


#5

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


#6

This is what I see


#7

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


#8

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


#9

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


#10

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 ?


#11

Do you have a space in your username?


#12

Which username are you talking about ?


#13

Your windows username.


#14

Yes I have a space in my windows username


#15

See Fresh instal of VSC and PIO - stm32 Examples dont compile


#16

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

#17

See https://github.com/platformio/platform-ststm32/issues/149

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?


#18

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


#19

I’ve done

[platformio]

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

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


#20

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.

#21

Please provide an output from

$ pio device list