I created "Hello World" program in eclipse IDE on Windows Desktop PC. The executable filename is example.exe
My MCIMX8QXP-CPU: I.MX8QuadPlus Multisensory Enablement Kit (MEK) is connected to puTTy serial terminal on my Windows PC.
The board boots from SD Card.
I want to execute "Hello World" program in MEK. How do I copy example.exe to the Linux 'root' folder?
已解决! 转到解答。
You can use PSFTP (should be installed with putty) to upload the exe file to MEK, but I guess it won't execute because it was built with Windows compiler so it cannot run under Linux. I would suggest you write the code directly in MEK using vi, then use gcc to compile and build the exe file.
I created "Hello World" program in eclipse IDE on Windows Desktop PC. I selected MinGW GCC Toolchain.
>> but I guess it won't execute because it was built with Windows compiler so it cannot run under Linux.
It was built with gcc compiler. I downloaded this compiler from www.equation.com. This compiler only applies to
windows, not Linux? If yes, is there a different gcc compiler for Linux?
Hello,
The gcc compiler is usually included in our Yocto end images. However, if you want to include it, you need to add the Yocto recipe in the local.conf file. To make that, you need to write the below in the local.conf file.
IMAGE_INSTALL_append = " gcc"
Hope this can help you.
Best regards,
Diego.
Hello,
For Android, we do not support the gcc compiler, Android does have an internal gcc compiler. However, this kind of support is out of our scope. To run a simple hello world example in Android I suggest you use Java. However, this is also not supported by us.
On Linux, you can use the gcc compiler and create a c code for a "hello world" example. To make that you can use the gcc compiler that is already in our end Yocto image. Or, you can create a recipe with the "hello world" example. Please see the below web-pages.
http://www.linfo.org/create_c1.html
https://community.nxp.com/docs/DOC-331917
In the second web-page, please go to the "Adding an empty layer and a new recipe" part. At the time you are creating the new layer, it will say if you want to add the hello world example, just say yes, and after that, you will have the hello world example natively in your end Yocto image.
For more detailed information, you can see the below web-page:
https://community.nxp.com/docs/DOC-95333
And to know more about Yocto, you can see the below training.
https://community.nxp.com/docs/DOC-94849
Hope this information could help you.
Best regards,
Diego.
Is Yocto end image Linux distribution?
Isn't purpose of Yocto project to build Linux OS? Android Linux distribution already comes in SD card with MEK. So, I don't think I need Yocto right now?
I want to run simple program like "Hello World" in MEK. What tools do I need to install in my windows PC. Do I need a cross compiler and linker and 'c' language libraries? Can I use eclipse IDE with cross gcc toolchain?
Later in development I'll need to create Linux image using Yocto project but to start out I need cross development environment and create simple 'c' programs to run in MEK.
You can use PSFTP (should be installed with putty) to upload the exe file to MEK, but I guess it won't execute because it was built with Windows compiler so it cannot run under Linux. I would suggest you write the code directly in MEK using vi, then use gcc to compile and build the exe file.
>> I would suggest you write the code directly in MEK
I haven't used MEK before. Is MEK IDE? Do I need to install it in my windows machine? Does it come with gcc compiler and editor? Please provide information on MEK.
Other Options:
When I created "Hello World" project in eclipse IDE, I selected MinGW GCC Toolchain. Will my program run in Linux if I choose Cross GCC toolchain from eclipse IDE?
MEK is Multisensory Enablement Kit, the board running Linux. I originally thought the MEK linux comes with gcc but later I found no gcc was installed. So your solution is correct, use cross compiler as your described.
I also noticed that the default linux coming with MEK doesn't have sftp installed :smileysad:, so PSFTP cannot be used too. Need other solutions.
>> I originally thought the MEK linux comes with gcc but later I found no gcc was installed
How did you find out? Is this information specified in some document? Is this possible to use Yocto Project to create linux image with gcc and vi or vim editor so a person can develop application software in MEK?