[EDIT]
Solved
The user folder has an "è" character in it (non-ASCII) and that proved to be the culprit as for some reason PlatformIO couldn't find the necessary map file based on the project path that includes non-ascii characters.
So, the solution is to move the project to a folder that has a path with ASCII characters only and recompile from there (or change your PC user account name :-)
[ORIGINAL ANSWER]
It looks like the installation for the STM32 platform is not in the best shape. There is couple of things you can try:
- Sometimes it can be as simple as cleaning the cached files PlatformIo produces for the build. It's the stuff that lives in your projects folder/.pio (you have that path mentioned in the output error, C:/Users/Elève/Documents/PlatformIO/Projects/Test/.pio/)
You can trash everything there and try to recompile or with your project opened in VS Code in the side bar click the PlatformIO icon, then open Project Tasks > Full Clean (if you don't see "full clean" you should update PlatformIO or remove the files manually as I've mentioned)
This sometimes sorts things out but it could also be a more messed up issue.
- If the library/package for the STM32 platform is not properly installed or corrupted I would imagine it could produce such a message.
The thing to try is in PlatformIO choose "Platforms", you should see the "ST STM32" and use the "Uninstall" option.
I would suggest that you close your project first and then run uninstall. Then re-open the project and PlatformIO should pickup what's written in the platformio.ini (comment out the "build_flags = ...") and start re-downloading the STM32 packages.
There is a few to download so keep an eye on the progress and any error messages. If PlatformIO doesn't start to download the STM32 platform automatically then try going through the same "Platform" section and search./install from there.
If after re-installing the entire STM32 platform it's the same issue than it's a matter with the actual board definition, had that happening few times with some boards and usually the easiest way is to pick a different board from the same family.
There is of course ways of manually removing files that live in the PlatformIO installation but if it gets to that, uninstall the whole PlatformIO and start again (I had to do that on few occasions :-)
Hope this helps