Converting an external project in a mcuxpresso project

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Converting an external project in a mcuxpresso project

3,527件の閲覧回数
tomato
Contributor III

Hi all,

 

I am a student and I have a begginer level coding experience. I have a C project that I would like to import and compile with MCUxpresso.

In order to do this I created a new C project in the IDE selecting the target device

tomato_0-1678809760416.png

Then I imported all the folder of the existing project in this brand new project created in MCUxpresso.

At the end I am getting these two errors

 

make[1]: *** [makefile:47: projectname.axf] Error 1
make: *** [makefile:38: all] Error 2
"make -r -j8 all" terminated with exit code 2. Build might be incomplete.

 

Can you help me?

 

0 件の賞賛
返信
8 返答(返信)

3,474件の閲覧回数
frank_m
Senior Contributor III

I would recommend another approach.

Take a simple example (like Blinky) from the MCUXpresso SDK for the MCU or board you intend to use, and build and run it first.
Then, take your sources and integrate them into this project.
Alternatively, if you project is IO/peripherals-intensive, choose an appropriate peripheral example.

0 件の賞賛
返信

3,471件の閲覧回数
tomato
Contributor III

Hi @frank_m 

 

ok thanks. I will try it.

Can you tell me if this option could be useful for what I have to do?

tomato_0-1678958746306.png

 

0 件の賞賛
返信

3,467件の閲覧回数
frank_m
Senior Contributor III

Not exactly what I meant ...

Here an example from my installation:

frank_meyer_0-1678960188311.png

If necessary, create a SDK for your MCU/board online on the NXP website, download it, and import it into your IDE.
This process is described here as well, I suppose many poster here could assist you with that.

The selection of the proper and most fitting example would be up to you.
Here an example that would fit the "Blinky" description - GPIO LED output.

frank_meyer_1-1678960444034.png

Pick one that best fits the application you have in mind.
You can add other example projects later, test them separately, and "copy" relevant code to your project.

I did a project for the OM13009 board (LPCXpresso54628) in this way - combining code for an ADC example, an ext. SDRAM example, and a FatFS example into one project.

0 件の賞賛
返信

3,518件の閲覧回数
ErichStyger
Specialist I

It would be helpful if you could provide more information and context.

If you 'imported' your folders, you probably have to setup things like include paths to get things compiled, depending on your file structure and way to include files.

0 件の賞賛
返信

3,514件の閲覧回数
tomato
Contributor III

Hi @ErichStyger 

 

You are correct. I had to setup the path for the include folder and this resolved many errors during compiling but not these last two errors reported above ( they should be related to other issues).

what kind of information you need to help me?

 

Thanks

0 件の賞賛
返信

3,508件の閲覧回数
ErichStyger
Specialist I

You need to look at the other messages in the console view, as they have more details about what is not working.

0 件の賞賛
返信

3,498件の閲覧回数
tomato
Contributor III

HI @ErichStyger 

thanks for the recommendations. Indeed I was able to fix all the errors and to get the compiled binary file. However the compiled code is not as expected (different dimension and it does not work when loaded in the microcontroller). Can you show me a the proper way to compile an existing project (src,include and build folders and makefile) starting from scratch in mcuxpresso?

thanks

 

0 件の賞賛
返信

3,496件の閲覧回数
ErichStyger
Specialist I

I think you did nothing wrong.

As your application is not working, I think it is now time to start debugging it, step by step, to see what is not working and why.

Good luck!