I have a legacy 32-bit application written in C that will be hard to migrate to 64-bit and I want to have it running on a Colibri iMX8. I’m currently using the reference images and not the torizon one.
My understanding is that iMX8 CPU (Cortex-A35) support 32 and 64 bit instructions so my question is what are the options to run the application on Colibri iMX8 ?
Here are the option I have in mind today:
port my app to be 64-bit compatible
build a 32-bit BSP, but how ?
run the application in 32-bit is a 64-bit BSP. Is it possible ?
Hello @ykrons ,
In order to have a better understanding of your situation, could you please tell us the board and BSP version that you are using?
We would also like to know the interfaces that you are planning to use.
Our application is currently running on a Colibri-iMX7d eMMC 1G with BSP3 and we want to go with a Colibri-iMX8DX with BSP5.
The application is only using network and an i2C bus.
That’s correct, but there might be some libraries or functions that might not be working with this setup.
I found this link showing more or less the options you were mentioning. To be prepared for long term, I would suggest the best option would be to build your application in 64bit.
Other options might be to try something like multilib that would include all libraries in 64 and 32bit variants. This though is not guaranteed to be working in all circumstances.
Further, you could try to build a BSP for an older target like the iMX6 and then try to make it work from there. That will be quite hard I believe.
Probably the fastest and easiest way to at least try it would be this one here.
Here they build the application with the -static parameter. This seems to look quite easy, you might give this a try.
Hope this helps, and let us know if you were successful.
however I’m not able to build the SDK anymore. I get errors during nativesdk-glibc do_configure task.
Is there special settings to add to have a multilib sdk ?
Yesterday I have done a cleanall on nativesdk-glibc and now the SDK build is working properly in multilib or 64 bit mode.
I guess something has gone wrong during development and remains until the clean.
Thanks for your support
Other options might be to try something like multilib that would include all libraries in 64 and 32bit variants. This though is not guaranteed to be working in all circumstances.
There is no clear situation where these errors would arrive and one could be the one that you faced once you added a new package. We also saw that you forwarded a patch to the meta-freescale github. Please tell us if the patch is approved.