Hi, I'm hoping that some of you out there can advise me on how to get off the ground with development for the i.MX 8M Plus in a microcontroller (MCU) role.
As background, I have decades of experience of microcontroller development (8051, 386EX, AT91(ARM), SHARC DSP, Blackin MCU/DSP, and most recently with many variants of STM32. I also have quite a bit of experience with Windows development (Win32), often in order to write the little apps needed to interface with my embedded devices.
To the problem: I have been tasked with doing a redesign of an old Blackfin project, and an i.MX 8M Plus SOM has been selected despite my feeling that it looks way too complex for our purposes (the attraction was the video encoder because we will need H.264 video out although that is not the primary function).
Normally when I get a new CPU I look at the demo apps, how to use the tools (compile, link, locate, and write to the flash) - giving myself a starting platform on which to build.
But I'm struggling to get started with the iMX8MPlus, I've been trying for a few weeks and each time it ends in failure.
I should mention that I have no development experience in Linux or Android, and frankly don't believe I should need any such knowledge to develop for an MCU project.
Our ultimate plan is to base the project around FreeRTOS, which looks like a simple environment well suited to embedded dev (and the simplest promoted by NXP), but I can't find any code that just works. No ready made image is available (unlike for Linux and Android). I have found examples, but the binaries produced are not stand alone - I have to process the built files and I find that I normally can't read a paragraph on that subject without tripping over some Linux assumption that I really don't want to know about, e.g. "and next you need to use Yocto to...".
I've been reading the CPU reference manual (6000+ pages!), and I THINK it should be far simpler then those getting started guides make out. Like any processor I have to build code, make sure it has the proper header (described in section 6.1.6 of the CPU ref manual) and stick it in flash (or sdcard in the case of the dev kit I have - at offset 0x8000)... and it should work shouldn't it?
So let's recap: the goal is to build a simple test case, let's say I plan to flash an LED using a GPIO pin. I want to boot from sdcard or eMMC and flash my LED, ideally without hearing the word "Linux" mentioned ever.
Does anyone care to take up the challenge?
p.s. I'm willing to provide code I've created so far if that would be useful to pointing out where I've gone wrong, but it's based on an example from the MCUXpresso SDK, so hopefully it can't be far wrong. Pretty much the only thing I did was modify the startup.s file to start with the header that the boot rom requires, and I wrote a Windows tool to place that at offset 0x8000 in an sdcard image, which I burn with Win32DiskImager.
Obviously writing to sdcard is cumbersome, but I haven't worked out how to write from an IDE debug environment yet (my preferred IDE is Visual Studio, with the VisualGDB plugin.
Hi @DonMilne
I hope you are doing well.
Please refer attached guide(IMX_YOCTO_PROJECT_USERS_GUIDE) for yocto setup. Yocto setup is must for the source code modification and compilation. For that you need one Linux host machine.
Please refer attached guide(IMX_LINUX_USERS_GUIDE) for flashing the IMX8M Plus processor.
Please refer the link for the understanding of IMX8MP EVK.
Thanks & Regards
Sanket Parekh
Thank you for the reply. I have in fact already read and successfully applied the Yocto guide - I have built a Linux Poky image which boots on the dev board.
The Linux guide I have not seen and it does look useful, so thanks again for that.
However my question was about using these imx8 processors without involving Linux. This question is important because I am working on a safety related device to SIL2 standards and am concerned that I will struggle to get so much unknown Linux code past an auditor, especially when I know it commits sins such as dynamic memory and storage allocation. I am also concerned that I will not be able to make efficient use of the hardware when some bloated Linux port is standing in my way.
I was led to believe before being handed this project that FreeRTOS was a possibility, but I have found very little accurate information and have completely failed to get that booting on the Variscite dev board I have here (Variscite DART-MX8M-PLUS based on an NXP i.MX 8M Plus SOC).
And ps, I'm sorry if any of the above comes off as aggressive or entitled - but I've been dealing with frustration for several weeks now. I find that the CPU identifier for the same CPU is not consistent between the dev tools and the docs, I find that the docs will refer to some external tool that no longer exists (dead links galore), and if I try to go down the Linux rabbithole to get SOMETHING working I just get led from one document to another, with no indication of WHY I need to be reading this stuff - hence my wish to call a halt and revert to basics.