Is there examples for Cortex-M4 / iMX8qm similar to these for iMX7:
Is it possible to use the same driver examples of iMX7? (if yes, where can we find: board.c/h, clock_freq.c/h , gpio_pins.c/h, pin_mux.c/h files for iMX8qm_apalis_m4)
We didn’t do too much about the iMX8QM M4 implementation. I ran a few examples from the MCUXpresso SDK, and they basically work.
Please note that you probably need to adjust the examples in order to select reasonable pins.
The iMX7 examples won’t work, because the resource management such as pin muxing and clock selection is different for the iMX8QM.
If you face problems with the JTAG interface, it might require a patch. Let me know if you need more information.
I found that the Segger patch is in a download area which requires you to register and agree to a license agreement.
Here’s a link to the page where the download starts.
I’m not sure whether you simply need to register to be able to download, or whether you need to go through your local NXP representative to get access to the files.
You only need a small part of this download package, which is 2 initialization scripts for the J-Link adapter, and an updated device list:
JLinkDevices.xml
NXP_iMX8QM_Connect_CortexM4_0.JLinkScript
NXP_iMX8QM_Connect_CortexM4_1.JLinkScript
I hope this helps. If you can’t get access, get back to me. I will try to find a way to legally get you the information.
just as a test for the cortex-m4 on the imx8qm, could you guide me what to change in the hello_world example of NXP to make it work on the apalis board?
According to what i understood from the code, I have to change the following defintions in pin_mux.h file, to the pins/pads of the imx8qm, with which the serial port of apalis are connected (but I couldn’t figure it out)
I didn’t test your changes, but I found some time to try out some M4 samples. I optimized parts of the code for our usecase and added files to support Visual Studio Code (this is not yet finished).
Look at the attached ZIP file. There is also a markdown readme ( HowToSetupEvalboard.md ) that explains how to configure the Evaluation Board.