Native X86 C++ projects in MCUXpresso (Windows 10)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Native X86 C++ projects in MCUXpresso (Windows 10)

Jump to solution
1,525 Views
davenadler
Senior Contributor I

We use host builds for testing our software (including simulation or mocks for hardware-specific components). Historically we've used a separate IDE (another Eclipse install or Visual Studio).

We would like to make these builds part of the MCUXpresso Eclipse workset. Is there...

  1. a recommended way to do this?
  2. a recommended GCC toolchain (MinGW? other?)?

Thanks!
Best Regards, Dave

PS: In case you're not clear on why one would do this, you might enjoy this video:
Butterfly Windows simulator 

 

0 Kudos
1 Solution
1,491 Views
davenadler
Senior Contributor I

OK, this is not too difficult:

  1. Install your favorite GCC. I used a 32-bit MinGW from http://winlibs.com/ 
  2. In MCUXpresso, create a new C/C++ project, either managed build or un-managed. On next panel, give a name, uncheck “show project types and toolchains only of they are supported on the platform”, then select toolchain MinGW.
  3. After the project is created, set debug+release properties:
    • C/C++ Build, Environment, MINGW_HOME environment variable to c:\MinGW32.
    • Launching gdb inside Eclipse will die if there are DLLs required and not on the path.
    Either modify the path in the local Eclipse shell (how?), or use linker option -static.
    Otherwise on starting gdb Eclipse gives the error:
    Failed to execute MI command: -run
    Error message from debugger back end:
    During startup program exited with code 0xc0000135.

A project created this way can be built and debugged within MCUXpresso.
In my case I also added GUI framework wxWidgets to help with our test frameworks.

Enjoy,
Best Regards, Dave

View solution in original post

4 Replies
1,487 Views
davenadler
Senior Contributor I

Hi @ErichStyger - I think license is no problem using MinGW but Cygwin could be a problem.
Test frames are for our math libraries and certainly don't use any NXP code!
Thanks as always,
Best Regards, Dave

0 Kudos
1,492 Views
davenadler
Senior Contributor I

OK, this is not too difficult:

  1. Install your favorite GCC. I used a 32-bit MinGW from http://winlibs.com/ 
  2. In MCUXpresso, create a new C/C++ project, either managed build or un-managed. On next panel, give a name, uncheck “show project types and toolchains only of they are supported on the platform”, then select toolchain MinGW.
  3. After the project is created, set debug+release properties:
    • C/C++ Build, Environment, MINGW_HOME environment variable to c:\MinGW32.
    • Launching gdb inside Eclipse will die if there are DLLs required and not on the path.
    Either modify the path in the local Eclipse shell (how?), or use linker option -static.
    Otherwise on starting gdb Eclipse gives the error:
    Failed to execute MI command: -run
    Error message from debugger back end:
    During startup program exited with code 0xc0000135.

A project created this way can be built and debugged within MCUXpresso.
In my case I also added GUI framework wxWidgets to help with our test frameworks.

Enjoy,
Best Regards, Dave

1,489 Views
ErichStyger
Senior Contributor V

Hi @davenadler ,

Yes, you can build and debug anything which has gcc and gdb. Just make sure you have read the licensing terms: it should not be an issue in your case in combination with NXP parts, but if you would do only x86 then it would

0 Kudos
1,512 Views
converse
Senior Contributor V

It is definitely possible, but I doubt you'll get much help on this forum. Suggest you search for "add 2nd toolchain to cdt eclipse" and start from there.

0 Kudos