2017-04-11 11:04 AM
Hi,
Recently I am developing a project using CubeMx and uVision5 on NUCLEO-F103RB board. I try to retain CubeMx support and for this reason I write my code within the predefined user code sections so I keep CubeMx integrity active.
What I want to do is, I would like to use some mbed programs in my project.
I can easily export an mbed c++ program for Keil uVision and I can use it in uVision without problem; The code can be compiled without error and works.However, if I want to integrate the exported mbed code into an existing CubeMx/Keil uVision project the things become complicated. First of all the directory structure and location of files are different for exported mbed code and generated CubeMx code. Then, there are 2 set of option, configuration files, etc.
Is it possible to make what I want to do, or, should I forget it! I appreciate very much your help.
Regards, Murat
2017-04-12 01:36 AM
Hello
Tologlu.Murat
,I transmit your feedback internally to our CubeMx team.
Thanks
Imen
2017-06-27 09:43 PM
I would just like to add that this would be very useful.It is something developers at my company are struggling with.
2017-07-17 06:46 AM
Hello
Tologlu.Murat
,I would like to thank you first for your feedback.
I looked over 10 mbed projects for nucloe boards.
All examples were written in C++ (if you have a link to any MBED C project, I will be glad to look at how to port them) .
As CubeMx only generates C code, your point becomes how import C++ code into a C project.
For this topic, I am sure the net is full of examples, and explanations, on how to do such porting/calling.
Kind regards
Sirma
2018-03-01 03:42 PM
Sirma Siang wrote:
As CubeMx only generates C code, your point becomes how import C++ code into a C project.
Well, that becomes one extra issue to consider - but it is certainly not the whole story!
2018-03-01 10:18 PM
As a beginner I was delighted when I started to program AVRs with the Wiring language but with time I accumulated experience and decided that Wiring language generate fat (read huge) code. So I decided to go C language and bare metal. For that, I started to translate in C all the libraries my applications used, or to make from scratch libraries with the same functionality (or finding on the Net the work of others), keeping as much as possible the original name of the functions (kinda 'keeping' the same API but rewritten in C). This is the first step and the most time occupying. But advantages are obvious. So
SIRY.Marc
is right.I
2018-03-02 02:52 AM
Note that Arduino code is just C++