Import from Keil MDK into STMCubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-26 12:38 PM
Hello,
I have been trying to import an already-existing project into CubeIDE. This project was created on Keil MDK. So, when I import the project, CubeIDE does not recognize the drivers for the board I am program, nor the source files. How can I use the project on CubeIDE?
Any insight is appreciated
Thank you.
- Labels:
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-26 12:39 PM
Is your Keil project based on STM32CubeMX (.ioc file) ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-26 12:44 PM
Hi,
No, it has no .ioc file. I have all .h and .c files, which include drivers and middlewares. Is there a way of importing?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-26 1:06 PM
If no .ioc move to STM32CubeIDE is fully doable but will require you to invest a bit.
I foresee various options:
1) Let's create a brand new STM32CubeIDE so called "Empty": File > New > STM32Cube Project
Then up to you to copy / paste your .c/.h files and add proper setups to get a build running (defines, includes, ...) based on project properties
Or have a ty to import a "pre"-set project you can get from FW pack. File > Open Project From File System
Note: Select your serie and board you need
Then still up to you to copy / paste your .c/.h files and add proper setups to get a build running (defines, includes, ...) based on project properties BUT already all drivers dependencies and setup should be available to you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-08 11:56 AM
Hi @Cartu38 OpenDev​,
I have been trying to create my new project on STMCubeIDE from an empty project as suggested (copy-paste of source files) but it looks like some files are not recognizable by STMCubeIDE or even missing (the files do exist actually in the folder). Moreover, I am not working with commercial board.
Do you know if there is any way to use the existing uvprojx and uvoptx files into STMCudeIDE?
Thanks for your help
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-08 12:15 PM
uvprojx and uvoptx are Keil proprietary files ... no way to exploit such if STM32CubeIDE.
Could you possibly share your Keil project ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-08 1:03 PM
Hi @Cartu38 OpenDev​,
Ok, I see what you mean with that.
Unfortunately, I cannot share my Keil project.
I appreciate your help.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-08 2:24 PM
If I remember correctly, Keil can create sort of makefile for MDK projects.
CubeIDE then can import a makefile-based project.
You'll need to provide assembly startup file , linker script and some C library stub files instead of Keil-specific files.
If this sounds complicated, find a consultant/contractor to help.
--pa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-19 1:50 PM
Hello,
I have some questions. I have been reading on how the projects are structured on both STM32CubeIDE and Keil MDK.
I believe that I have found a manner to deal with the importing process from Keil MDK to STMCubeIDE, which is:
On Keil MDK, the *.uvprojx file contains the project structure in XML format; such a file also contains the compilation/linking flags and these are IDE-dependent. So, what is useful for me are the source files. Furthermore, since I have the scatter file *.sct (this describes the memory layout; STM32CubeIDE does not support such files) created on Keil, I can use it to write a linker file *.ld on STM32CubeIDE.
In addition, I have the startup code written in assembler *.s and it is my understanding that I have to modify it according to my project since this is IDE-dependent. STM32CubeIDE is capable of creating the makefile automatically. However, I also must work on it; specifically, I have to modify the compilation and linking flags.
I already have the linker script *.ld describing the memory layout.
These points are not clear to me:
- STM32CubeIDE is equipped with GNU ARM Embedded and GNU for STM32 toolchains, which one should I use to then? When I work on the makefile, the compilation and linking flags, and target and debugger configuration should follow such a toolchain
- Can I avoid having a *.ioc file and still have a working project?
- I can start off a empty project, but I do not see how its structure should be, which folder should contain what?
- I have all object files created on Keil. So can I use them to first have a working linker script? I am not sure if these are compatible with STM32CubeIDE.
Thank you for your support.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-19 2:26 PM
> I have the startup code written in assembler *.s and it is my understanding that I have to modify it according to my project since this is IDE-dependent.
Correct
> STM32CubeIDE is capable of creating the makefile automatically.
Yes, the latest version 1.7 can create a makefile-type project from existing files.
To your questions:
1 - start with the STM32 toolchain, unless you must use generic ARM toolchain.
2 - yes
3 - Create a minimal project or import an example, then delete all unneeded files.
For a single-core processor (most of the models) all sources can just be in one flat directory.
4 - no
--pa
