Programming the Quad core i.MX 6 and dual core i.MX 8 as a MCU?
How easy can I as a developer get access to program individual CPUs, without running an OS?
I have Segger embedded studio, which is said to support ARM A7/A9 and a J-LINK base programmer.
What can I use to help me get started? Examples, libraries, techniques, and settings to switch to programming another CPU may help.
Discussion welcome.
To anyone interested. I would not recommend diving into yocto. It was not very easy to build the toolchain, and then you must configure a lot to make it build your application. Here is another alternative.
Step 1: download the sdk platform .
Step 2: download gcc-arm-none-eabi-5_2-2015q4 , see this instructional video on cross-compiling for understanding some name conventions etc. Anatomy of Cross-Compilation Toolchains - YouTube
Step 3: Also download the newest toolchain gcc-arm-none-eabi-7-2017-q4-major
Step 4. Unzip everything you have downloaded so far "tar -xvf" usually works.
Step 5: git clone http://git.denx.de/u-boot-imx.git
Step 6 build your application in the using the gcc-arm-none-eabi-5_2.
PATH=~/toolchains/gcc-arm-none-eabi-5_2-2015q4/bin/
Step 7 $ export CROSS_COMPILE=/path/to/gcc-arm-none-eabi-7-2017/bin/arm-none-eabi-
Step 8: $ make mx6sabreauto_config
Step 9: $ make -j8 u-boot.imx
See u-boot/board/freescale/mx6sabreauto/README on how to build and write u-boot to your sd-card
I could potentially help with some more here, but just contact me if you have any questions.
Hi Mattis,
that is not simple but it is possible. In my opinion you may
- Build and download u-boot, the bootloader will be necessary in any case.
- Build you application using Meta-toolchain
- Once you have the binary you need to put it in a known memory location.
- You may start the MCU and u-boot will run. You can use instruction bootaux in u-boot to jump to your application.
Attached you can find some baremetal examples for imx6. Please not that these examples are not official therefore they are NOT SUPPORTED.
You may also find interesting the following document to debug
https://www.nxp.com/docs/en/application-note/AN4553.pdf
Regards,
Carlos
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
bootaux is not availiable on the GitHub - Freescale/u-boot-fslc at patches-2015.01
How can I put this binary on a specific location, if we are considering that my SD-CARD already has U-boot and other files on it and is pre-partitioned?
# The disk layout used is:
# - ----- --------- -------------- --------------
# | | SPL | u-boot | boot | rootfs |
# - ----- --------- -------------- --------------
# ^ ^ ^ ^ ^
# | | | | |
# 0 1kiB 69kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
Thanks for your input. The instruction "bootaux", where can I find reference to this and other similar instructions?