cancel
Showing results for 
Search instead for 
Did you mean: 

Configure a CMake Project for the H757I-Eval

nnoK
Associate

Hi, I am trying Visual Studios' new feature of importing an STM32CubeIDE Project (making it a CMake Project) and have a problem:

Visual Studio Import Feature only works with single-core boards, and unfortunately, I only have dual-core boards;

Anyways... it asks for the `.cproject` file, but we kinda have 2 of them - one for each core;

VS allows you to import only 1 `.cproject` at a time, which means you'd have to do the importing process 2x, but then VS thinks these are 2 separate projects and makes no linking, whatsoever.

In the CubeIDE we build the project and we also get to choose the debug configuration, thereby I choose, for example, another port for CM4-debugging, connect under reset, that I want CM7 to load the code for CM4, and so on.

We get this `<project_name> Debug.launch` file inside each core folder.

I'd would like to replicate that (launching of one core using the other) using CMake.

Does anyone have an idea how I could accomplish that?

I am already working on the other configurations. For example, importing the 2 .cprojects separately, and once we get the CMakeLists.txt and the /cmake, I create a root CMakeLists.txt that only sets up the project(instead of already "adding an st-target" with the name of the project, as the generated ones do), then to go into the CM4 and CM7 folders and, by using the rest code of the generated CMakeLists.txt files, create the target, this time with 2 separate names reflecting the CM7 and CM4 cores.

I'll also modify the generated CMake modules (gcc-arm-none-eabi.cmake and st-project.cmake) to perform a check (if CM4 or CM7 is passed) and then modify the files/directory/names accordingly.

There should be something like creating the CM4_Target as a library, and the CM7 one as an executable; then, statically link the CM4_Target (lib) to the CM7_Target (exe) and then run/execute it.

See the picture below to have an idea of what I am trying to accomplish ahah.

Also note that those .c files will most probably be .cpp files (I intend to develop in C++).

0693W00000aIa7NQAS.png 

  • CMakeLists.txt dot - sets up the project
  • CMakeLists.txt ddot - adds the `src` dir
  • CMakeLists.txt dddot - creates the actual target

Thank you so much!

0 REPLIES 0