cancel
Showing results for 
Search instead for 
Did you mean: 

How to import example from GitHub?

MHoop.1
Senior

I am trying to import an example project into my CubeIDE workspace that I have downloaded from GitHub and need some clarification on the process.

I have downloaded (for example) x-cube-azrtos-h7-main from GitHub. I have unzipped the main file into my local repository folder. I then select File->Import->Existing Projects into Workspace which brings up the Import Projects window. I then select the "\Projects\NUCLEO-H723ZG\Applications\NetXDuo\Nx_TCP_Echo_Server" project and the click on "Finish". After the project is imported, there are yellow exclamation indicators on all of the .c files listed in the project file structure. The clicking on any of the files shows that there is no actual file in the folder.

0693W00000Y8CECQA3.png 

I have also tried File->Import->Projects from Folder or Archive (which I am not sure how this is different). This doesn't actually copy files into my workspace. It only creates a link to the original file location in my repository, which I don't want.

How do I import a copy of an existing project from my repository into my workspace?

Thx,

MikeH

14 REPLIES 14
MHoop.1
Senior

So, how valuable is an "example" that you cannot install?

Thanks again Pavel.

It is valuable, just install it with the CubeIDE's pack manager, or manually in the same place.

Optionally use the CubeIDE example import feature.

Simpler examples (self-contained in the Cube "jumbo package") can be used immediately after git clone to almost any location.

MHoop.1
Senior

Just to add a bit more fuel to the fire....

Below is a screenshot of the Import window while importing an F4 version of the same example. Note that there is only one project available to "import". This project DOES import properly, compiles and runs properly. Why is this different from the H7 example?

0693W00000aIj30QAC.png

MHoop.1
Senior

Pavel,

"It needs the CubeIDE "pack installer" magic to get these X packs into the correct places."

I have found this to be oddly accurate. The only way to "import" a complete working example project is to use the "pack" in my repo as the foundation of source code. This means that when I create a project in workspace "A" using Example "A", the original "pack" source code is modified with my changes. So, now if I want to use the "pack" for a different project, the original "pack" code is modified with my previous project "A". This means there is no way to preserve the original "pack" code since the "import" function doesn't actually "copy" code into my new workspace, it simply "links" to the code. This makes no sense to me....unless there is something that I do not understand (very possible).

remiA
Associate

Hello, 

I don't know if this is useful, but for me the problem came from git. Doing the following procedure in a terminal solved my compiliation problem:

 

1) $ cd /yourDirectory

2) $ git clone https://github.com/STMicroelectronics/STM32CubeL4.git

3) $ git pull origin master

4) $ git submodule update --init


Then in STM32CubeIDE I could import the project without any problem using "file->import->Existing Projects into Workspace".

 

Best,
Rémi