boundarydevices / imx_usb_loader

USB & UART loader for i.MX5/6/7/8 series

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"jump" does not seem to work on i.MX6ULL

yashi opened this issue · comments

This is not really a bug report but more like a question.

I have an i.MX 6ULL EVK with me and trying to use imx_usb with it. I cloned it and build it fine but jump option doesn't seem to work. What I mean by "doesn't work" is that, my JTAG-ICE says that the PC (process counter) is stuck at 0x25A0 after the jump.

Without "jump 0x908000" at my file work line, my JTAG-ICE shows me that CPU is running fine at ROM code address. The --verify also works. imx_usb says "Verify success" and wih my JTAG-ICE I can see the contents of the OCRAM is what I specified as a file. I even dumped USB transaction data with #define DEBUG in imx_usb.c. The data seems to be OK.

One thing I've noticed is that while ROM code is executing, CPU seems to be in THUMB mode. But my jump address has ARM code. (I'm using customized u-Boot SPL). Does anyone know how jump command in the ROM code works?

If I modified CPSR (to ARM mode) and PC with my JTAG-ICE to jump to OCRAM after I loaded my code with imx_usb (this is without "jump" option), the code seems to work. So, the code itself is OK (if execution mode is right), I suppose.

Does anyone here have successful experience with "jump" on i.MX6ULL?

Thanks

OK, I've figured out. The ROM code expects DCD in the downloaded image. I have even implemented SKIP_DCD_HEADER command but it doesn't seems to change its behavior. But, using mkimage in the U-Boot and generated ./SPL, which has the following header, works fine!

tools/mkimage -l SPL
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    8192 Bytes = 8.00 KiB = 0.01 MiB
Load Address: 00907420
Entry Point:  00908000

I'm closing this.