Skip to main content
Remyhx
Associate III
March 17, 2024
Solved

Importing example (Heart rate BLE / STM32CubeWB Firmware Package V1.18.0) with VSCode

  • March 17, 2024
  • 9 replies
  • 3362 views

Hi,

I tried to import the BLE Heart rate example from the Firmware Package (1.18.0), direct importing by the STM extension in VSCode (Cube IDE directory inside the project) seems to be not possible. If I choose 'Create a new appl. project' in the extension, open Ble_HeartRate.ioc in the project folder and change the project output to STM CubeIDE and generate the files, it is not compilable. 

Probably importing in Eclipse is more successful, but is there maybe a way to do it in VSCode?

 

Greetings,

Rémy Hurx

    This topic has been closed for replies.
    Best answer by STM_Thirty2

    @Remyhx wrote:

     

    Step 2: Try to "Import a local project" and select the project.ioc

    Fails at this point. After opening up the folder stm32cubeide in the ble heart test example folder, I go to the stm32 extension. Choose import a local project and go one folder up to select ble_heartrate.ioc

     


    This is not what i said in step 2. I said import .project NOT ble_heartrate.ioc . Forget about ble_heartrate.ioc that is for editing configurations in CUBE IDE and you dont want to use that.

    At this point I would delete the  V1.18.0 and have cubeIDE download it again because who knows what VS Code and Cube have modified. And then try to follow the steps as I wrote them

    9 replies

    STM_Thirty2
    ST Employee
    March 18, 2024

    Are you moving the project somewhere else? I am able to import the projects and build with the VS code extension

    C:\Users\%YOU%\STM32Cube\Repository\STM32Cube_FW_WB_V1.18.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_HeartRate\STM32CubeIDE

     

    Step 1: Open Vs Code into the "STM32CubeIDE" version of the project

    Step 2: Try to "Import a local project" and select the project.ioc

    Step 3: Try to build ( CTRL Shift B )

    If that fails, make sure you have CMAKE extension installed 

    Step 4: Open the command palette (CTRL  SHIFT P) and Run CMake: Configure

    Step 5: Try to build again from the command palette ( CTRL SHIFT P ) and run CMake: Build

     

     

     

    "If you feel a post has answered your question, please click ""Accept as Solution"""
    Remyhx
    RemyhxAuthor
    Associate III
    March 18, 2024

    Hi Eddie-Amaya,

    Firstly thank you very much for the quick reply!

    I have the cmake extension installed. I can open up the folder STMCUBEIDE within the BLE/heartrate folders. But when I try to import a local project I get the following error message: Project importing failed. ENOENT: no such file or directory, open '/Users/remyhurx/Documents/STM/Library/STM_Firmware/STM32CubeWB/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/.cproject' 

    I see the .cproject in the STMCUBEIDE folder, the IOC file is located one up in /Users/remyhurx/Documents/STM/Library/STM_Firmware/STM32CubeWB/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/

    The .cproject is in /Users/remyhurx/Documents/STM/Library/STM_Firmware/STM32CubeWB/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/BLE_HeartRate/STMCUBEIDE

     

    Gr Rémy

    STM_Thirty2
    ST Employee
    March 18, 2024

    Yes, I see the core project file in the "Root" directory of the BLE Heartrate project but to build the STM32CubeIDE specific project you want vs code to be in the STM32CubeIDE directory. 

    The project Core files are in the Root so you would have to open another Vs code instance at the root directory but build from the STM32CubeIDE directory. 

    "If you feel a post has answered your question, please click ""Accept as Solution"""
    Remyhx
    RemyhxAuthor
    Associate III
    March 18, 2024

    Hi, one step back: if I try to import a project it will fail, for both folders (root and STM32CubeIDE). I can open the ioc file in cubemx, generate the files (cubeide, generate under root). Then I can import the project, but it will not build. Because of an error in the cmake files (included a readme.txt) and it can't find stm32wbxx_nucleo.h

    STM_Thirty2
    ST Employee
    March 18, 2024

    Did you try the CMAKE commands i mentioned to have the extension reconfigure the cmake files?

    "If you feel a post has answered your question, please click ""Accept as Solution"""
    Remyhx
    RemyhxAuthor
    Associate III
    March 19, 2024

    If I try exactly as you say:

    Step 1: Open Vs Code into the "STM32CubeIDE" version of the project

    Open folder, succes.

    Image 19-03-2024 at 07.34.jpeg

    Step 2: Try to "Import a local project" and select the project.ioc

    Fails at this point. After opening up the folder stm32cubeide in the ble heart test example folder, I go to the stm32 extension. Choose import a local project and go one folder up to select ble_heartrate.ioc

    The returning error: Project importing failed. ENOENT: no such file or directory, open '/Users/remyhurx/Documents/STM/Library/STM_Firmware/STM32CubeWB/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/.project'

    This file is in the already opened folder, but it doesn’t read. So it fails before I can do step 3 etc. 

    I tried to add the higher folder (with the.ioc) to the workspace, with the same result. So I didn’t had the chance yet to do step 3 or 4. 


    Step 3: Try to build ( CTRL Shift B )

    If that fails, make sure you have CMAKE extension installed 

    Step 4: Open the command palette (CTRL  SHIFT P) and Run CMake: Configure

    Step 5: Try to build again from the command palette ( CTRL SHIFT P ) and run CMake: Build