-
-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for i.MXRT6xx #1753
Comments
There's a lot to unpack here, and particularly as support for your target has not been explicitly added and we didn't even know it was i.MXRT-like. The big switch-case to which you refer is designed as a "try this, then this, then this" type of piece of logic w/ the target-specific probe routines doing identification to extract a positive identification because the ROM table information on which the Cortex-M architecture implementation has to make decisions is insufficient. Therefore, do not replace routine calls in that switch-case, only add to them (otherwise you are removing support for an existing part!): case JEP106_MANUFACTURER_NXP:
- if ((target->cpuid & CORTEX_CPUID_PARTNO_MASK) == CORTEX_M33)
+ if ((target->cpuid & CORTEX_CPUID_PARTNO_MASK) == CORTEX_M33) {
PROBE(lpc55xx_probe);
+ PROBE(imxrt_probe);
+ }
else
DEBUG_WARN("Unhandled NXP device\n");
break; The CMSIS-DAP does not provide a way for us to read the Vtgt voltage, which is why it's displayed as "(null)", this is normal and to be expected. As for the TARGETID - that is the actual value read from the DP register. NXP screwed up - it's not particularly uncommon for vendors to so yes, that's the actual and real part number they shipped. Likewise they've shipped duff ROM tables - they've made the exact same mistake in the outer most AP ROM Table, and the next one in is ARM's pre-made table for the Cortex-M33 core (this is why it's got ARM's JEP-106 and sane values, they've not mucked with that table thankfully). With regards to |
I suspect you may have misunderstood me which is my bad. When I say RT6xx I mean the I.MXRT6xx series. It is advertised as the I.MX RT600 by NXP. Having stepped through |
Ah, yeah, that Yes, This is not a target that has been tested against, so it's not surprising there are issues, especially when it's showing entirely broken ROM tables and part identification. It sounds like the SRC (System Reset Controller) might well be at a different address which is why the issue. This is where those two boot registers are located. In the i.MXRT1060 reference manual, you will find them defined in §21.6, pg 1273 as |
I am looking through UM11147 and I'm not able to see what you're referring to. Which document are you using? |
IMXRT1060RM - note it will require you to log into the NXP website to download. All the information you need is in the reference manuals, not the user guides. |
I see. To me it looks like the I.MX RT6xx works slightly differently compared to the 1060. Here is the correct document for this controller. |
So, taking a read of that user manual.. it looks like the i.MXRT600 is an i.MXRT in name only vs basically all the rest of the series - its entire architecture is vastly different. The only reason it has a compatible Flash controller is that it's using the Freescale Flash SPI controller (FlexSPI). Nothing else about how this device works or is laid out is otherwise the same. SYSCON has Determining the boot mode appears to require reading PIO1_{15,17} manually and hoping they're still in boot state. This device, unlike the rest, does not implement a boot-time latch for these 3 pins states. See §41.3, table 995, pg1090. This will include having to figure out the GPIO name to register mappings from §9.5, pg318. |
One alternative might be to read the OTP fuses of the boot config though I don't know whether that would solve every case |
Would you rather have this in a separate file or together with the rest of the imxrt implementations. Due to some discussion revolving implementing support for the I.MXRT6xx and I.MXRT5xx in probe-rs I suspect that they both behave similarly but with different address spaces ect. |
Hey, I was trying to use blackmagic along with an OrbTrace Mini on an NXP RT685 evk and I encountered a few issues preventing me from doing so. I know the I.MXRT series from NXP are different from most other controllers so I didnt expect it to be plug-n-play if I'm being honest but this ended up just not working.
The first issue is that of recognizing that it was supposed to use the I.MXRT interface whatsoever. In the
designer_code
switch statement incortexm_probe()
the NXP JEP106 code only maps to an LPC55xx controller (assuming the controller even is an M33). I am not sure what values to check for to differentiate between the LPC and the I.MXRT controller in here but they shouldn't be treated the same. Since I know my target is an I.MXRT controller I just replaced the LPC call with the I.MXRT call. After doing that the log after running with-tv1
looks like this:The line
Target voltage: (null) Volt
screams at me that something is wrong, but I have not had the time to look into it.The second issue seems to be that the part number is incorrect as I doubt NXP would just set it to the extremely error-prone value of 0. However since I know my target I just add that to the valid part ids in
imxrt_probe()
.The last issue I experienced is that after the
imxrt_ident_device()
call which detects the system correctly theboot_mode
failes with the following printout:All subsequent calls also print out the same error.
I am not sure why this fails and the same call in
imxrt_ident_device()
doesn't although I suspect that it has to do with the address that is accessed.The text was updated successfully, but these errors were encountered: