2019-01-13 04:08 AM
Hello,
I am new to STM32 and trying to learn it by migrating from 8 bit PIC. I have started by setting Eclipse environment and created some simple programs. Now I want to use STM32CubeMX but i have problems. I use STM32CubeMX version 5.0.1, and Eclipse 4.9.0. I tried to import it manually following instructions from one book I got, but CubeMX doesn't make and files under Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\ and in every instruction it says that it should.
Than I tried this tool from github https://github.com/cnoviello/CubeMXImporter . When I use this tool and try to build project in Eclipse a lot of error occurs. If I fix one, new one pops up. Initial error is HAL_TICK_FREQ_DEFAUL undeclared here (not in a function). Problem I can see here, that I can't follow as instructed is that I don't have option Vendor CMSIS name when creating project in Eclipse (I don't know why).
I also try importing project direct in eclipse (file -> import) but than no MCU is selected and it wont compile the project.
Do you have any solution for any of those methods, how to import project from CubeMX to Eclipse?
2019-01-13 06:02 AM
Can't CubeMX generate a .GPDSC file which you can import?
Sorry not using CubeMX, and I do GNU/GCC stuff with makefiles, and the rest with Keil, that "just works" without a lot of faffing about.
2019-01-13 07:43 AM
I couldn't find any way, it can generate all needed .c, .h and .s files, but when I try to import them I finish with a lot of errors.
Most of all, I want to use CubeMX to adjust clocks for whole chip, and some parameters also for clock.
2019-01-14 02:38 AM
Hi,
In "Project Manager" tab of STM32CubeMX choose "Makefile" as Toolchain/IDE.
Then generate the code.
For eclipse make sure GNU ARM Eclipse toolchain installed (refer https://gnu-mcu-eclipse.github.io/toolchain/arm/install/).
In eclipse File -> Import -> C/C++ -> Exsisting code as Makefile project -> Next -> and select,
your STM32CubeMX generated code as Exsiting code location and "ARM Cross GCC" ,
Then Finish :D
For your clock configurations you can use STM32CubeMX clock configurations tab.
2021-08-06 06:18 AM
Hello,
I followed your instructions on how to import STM32CubeMX project into the Eclispe and run into the following problem:
/*
15:07:15 **** Build of configuration Default for project Nucleo-L073RZ_test ****
all
Cannot run program "": Launching failed
Error: Program "" not found in PATH
PATH=[C:\Users\..\AppData\Roaming\xPacks\@xpack-dev-tools\windows-build-tools\4.2.1-2.1\.content\bin; ... etc.]
15:07:15 Build Failed. 1 errors, 0 warnings. (took 81ms)
*/
Does anybody have any advice to solve this?
2021-08-06 03:23 PM
@Matěj Turinský Three years passed, and welcome to CubeIDE! It will import your CubeMX .ioc file easily. It will import a makefile project as well.
2021-08-23 05:23 AM
I have the same problem, and I could not solve it. I understand it as a problem with #ifndef / #define directives in Eclipse. I found many ways to deal with this problem online, but none of them worked. For example this one: Preferences-> C / C ++ -> Language Mappings: Add Content Type: C-header Language: C ++
2021-08-23 06:06 AM
Which "same problem" ? Several different issues were mentioned in this thread. Do you import a project created by CubeMX into CubeIDE?
> I found many ways to deal with this problem online, but none of them worked.
That's why Google has not created a real AI yet ))
2021-08-23 06:13 AM
No. I Importing STM32CubeMX to Eclipse. My problem like MTuri.1:
Cannot run program "": Launching failed
Error: Program "" not found in PATH
2021-08-24 05:05 PM
Hmm. Please look in the build settings. Is managed build enabled?
External or internal builder? If external try to change it to internal, and v.v