cancel
Showing results for 
Search instead for 
Did you mean: 

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

Remyhx
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

@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

If you feel a post has answered your question, please click "Accept as Solution"

View solution in original post

9 REPLIES 9
STM_Thirty2
ST Employee

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"

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

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
Associate II

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

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"

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


@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

If you feel a post has answered your question, please click "Accept as Solution"

Thx, it worked out now. I’m sorry, not used to the ST structure yet. The .project was also hidden (macOs). 👍🏻

Hi,

 

I am also having a hard time to compile the Zigbee sample that i downloaded at ST. STM32CubeWB - STM32Cube MCU Package for STM32WB series (HAL, Low-Layer APIs and CMSIS, USB, File system, RTOS, BLE, Thread and Zigbee stacks - and examples running on ST boards) - STMicroelectronics

 

I get the latest STM32Cube MCU package for STM32WB software and I tried to run FW into the DKs (STM32WB5MM-DK), however, there is no .ioc file and no Cmake;ist.txt file. I lost the starting point. This is what I like to do compile and download FW to the DK and to see two Zigbee communications works. STM32CubeWB\Projects\STM32WB5MM-DK\Applications\Zigbee\Zigbee_OnOff_Server_Coord

 

Couple of question? 

1. Is there anyway I could get .ioc file for this project? Or at least which pins are needed to set. If i know, I will do those set manually.

2. Is there any specific pins need to be set to use Zigbee communications? If i want to send "ABC" via Zigbee (Server/Client), do i need to set some pins for this goal or do i use LPUART or USART for this purpose. I tried to understand this, but no help in web site yet.

 

Thanks in advance to community,

YJ99