MCUXpresso SDK 2.10 for RT1064 now includes eIQ projects for all eIQ inference engines and so this Knowledge Base article is now depreciated. The instructions are being left up however in case any users using older versions of the SDK before i.MX RT1064 eIQ was fully supported need these steps in the future. Users with a i.MX RT1064 EVK should just use SDK 2.10 or later which has all the eIQ projects natively for i.MX RT1064.
1. Import an i.MX RT1060 project into the SDK. For this example, we'll use the Label Image demo.
2. Right click on the project in the workspace and select Properties.
3. Open the C/C++ Build -> MCU Settings page
4. Change the "Location" of the BOARD_FLASH parameter to 0x70000000 which is where the flash is located on the RT1064. Also adjust the size to be 0x400000. You will need to type it out.
5. Then you need to change the "Driver" parameter so the debugger knows to use the flash algorithm for the RT1064 board. Click on that field and you will see a "..." icon come up. Click on it.
6. Change the Flash driver to MIMXRT1064.cfx
7. Click on OK to close the dialog box, then click on Apply and Close to close the Properties dialog box.
8. Next we need to modify the MPU settings for the new flash address.
9. Open up board.c file. Modify the lines below to change the memory address and the memory size on lines 322 and 323 to start at 0x70000000 and for a 4MB region size.
9. Next, modify the clock settings code to ensure that FlexSPI2 is enabled. The clock setup code in the RT1060 SDK disables FlexSPI2, so we need to comment out that code in order to run the example on the RT1064. Open up clock_config.c file and comment out lines 264, 266, and 268.
10. Finally, open the fsl_flexpi_nor_boot.h file and modify the FLASH_BASE define to use FlexSPI2_AMBA_BASE on line 103
11. Compile and debug the project like normal and this project will now run on the RT1064 board.
Updated July 2021 for SDK 2.10 release.
Apart from re-configuring the project, are there any concerns about proper function with the RT1064?
All the eIQ demos work the same as on the RT1060 with these changes.
The board layout is pretty much the same ,and the RT1060 and RT1064 are very similar devices except that RT1064 has internal memory at a different address location than the external memory on the RT1060 board, which is what these changes take account for.
Hi Anthony,
question regarding "In the original RT1060 SDK this willl be on lines 352 and 353. In the eIQ Update files, it will be on lines 362 and 363."
What you mean eIQ Update files? Where can I find them?
One more thing: I believe size of BOARD_FLASH is not correct, in the picture there is 0x4000000, I believe this is only typo and should be 0x400000 (4MB, size of internal Flash memory).
Hi Marcin,
The eIQ Update file is the updated code that adds camera and LCD support to the Label Image examples. It will be part of the next SDK release at the end of the year, but in the meantime can be found here: https://community.nxp.com/docs/DOC-343827
And yes, that is a typo. I've updated the post to be 0x400000.
-Anthony
Hi Anthony,
great, thank you very much for support.
One more question: I am comparing eIQ Update files (available at link you have provided above eIQ Transfer Learning Lab with i.MX RT), i.e. file called clock_config.c, and I see that the original one from RT1060 SDK has the same code as the file from eIQ Update files.
Below is the original file from RT1060 SDK:
And clock_config.c from eIQ Update files:
So the question is: should the lines 251 & 253 & 255 be commented when I am using original clock_config.c file from RT1060 SDK?
In the guide you mentioned that it is not neccesary, however this piece of code is the same for both original and eIQ Update files.
Hi Marcin,
I just double checked and re-downloaded the 2.6.2 RT1060 SDK, and that code is not in the original clock_config.c files for the eIQ projects. Perhaps you overwrote the original files?
If running on the RT1060, no changes are needed in either set of code (original SDK nor the eIQ Update code) to run the demos.
If running on the RT1064, the Flexspi2 clocks need to be enabled, which is why in the eIQ update release, the code that is disabling them needs to be commented out.
-Anthony
Hi Anthony,
The first difference is that I am using SDK_2.6.0_EVK-MIMXRT1060 (with added all available software components).
So I downloaded also newer version i.e. SDK_2.6.2_EVK-MIMXRT1060, and have made comparison between clock_config.c files:
Indeed, there are some changes between clock_config.c from SDK 2.6.0 and 2.6.2, however I do not see any differences between SDK 2.6.0 and eIQ Update files, the piece of code looks the same. And it causes my doubts as you wrote earlier that:
"If running on the RT1060, no changes are needed in either set of code to run the demos. The Flexspi2 clock can be either be disabled (clock bits are not touched, as done in the original SDK) or it can be enabled (as done in the eIQ update release)."
So it means for me that clock_config.c from eIQ Update by default should have lines 251 & 253 & 255 commented as follows to enable FlexSpi2:
You wrote also:
"If running on the RT1064, the Flexspi2 clocks need to be disabled, which is why in the eIQ update release, that code needs to be commented out."
but in the initial guide there is something different ;-)
"Finally, if using the eIQ Update files, we will need to modify the clock settings so that Flexspi2 is no longer disabled since it is used by the RT1064."
Could you please double-check.
Hi Marcin,
You're right, I got that flipped. I'll update the previous post. The key point is that on the RT1064, FlexSPI2 needs to be enabled in order for the code to work properly because the internal flash is using that port.
The default code in eIQ Update.exe is disabling FlexSPI2 which is why the modification is necessary when running on RT1064. The code was already released before it was ported to RT1064, so the instructions reflect the need to update that in the eIQ Update.exe files.
-Anthony
Hi Anthony,
seems to be clear now, thanks for support!
If I were you, I would change a bit this point in the initial guide:
"9. Finally, if using the eIQ Update files, we will need to modify the clock settings so that Flexspi2 is no longer disabled since it is used by the RT1064. This step is not necessary if using the original RT1060 SDK."
as it caused my all doubts ;-)
I would change it to (for example):
"9. Finally we will need to modify the clock settings so that Flexspi2 is no longer disabled since it is used by the RT1064 (the code that is disabling them needs to be commented out)."
I believe in this point you do not need to add any extra notes about running the demos on i.MXRT1060-EVK (they should run out-of-the-box, as they are prepared for that platform). And this guide strictly refers to changes need to be made to run the demos on i.MXRT1064-EVK.
Anthony, thanks again for your great support!
Noted and modified to make clearer. Thanks for the feedback, and please let us know in this eIQ community area any other questions or comments, as we're looking for feedback on our eIQ solution.