Anyone have an OpenOCD board config for the MCIMX6SLEVK Evaluation Board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Anyone have an OpenOCD board config for the MCIMX6SLEVK Evaluation Board

Jump to solution
2,077 Views
nathanpalmer
Contributor IV

Has anyone created this already?   I need the proper SDRAM, FLASH, etc. configurations.

Labels (2)
0 Kudos
1 Solution
1,285 Views
fabio_estevam
NXP Employee
NXP Employee

You can use the DCD settings we use in U-boot and convert it to a OpenOCD init script:

http://git.denx.de/?p=u-boot.git;a=blob;f=board/freescale/mx6slevk/imximage.cfg;h=16ea5976250bff9524...

Regards,

Fabio Estevam

View solution in original post

0 Kudos
7 Replies
1,285 Views
wenmingfeng
Contributor III

Can I used it for imx6 duallite?

Thanks!

wenming

0 Kudos
1,285 Views
nathanpalmer
Contributor IV

UPDATE:  I was able to do lots of debugging using the DCD settings from u-boot as suggested.  However, I have recently created an image that the iMX6SL ROM loads from SPI NOR FLASH at boot time (Internal Boot Mode) and this has broken my OpenOCD setup.   It seems that if the CPU boots from internal boot mode (as opposed to Serial Downloader) then OpenOCD will not reset-init.  It seems to be failing at the SDRAM configuration code but it is hard to say for sure.

Note that the code that I am loading from internal boot has been:

     - a working u-boot.imx image

     - a "dummy" executable that just loops at the reset vector

     - a u-boot image that executes up to _main() and then busy waits

All of the above cases prevent OpenOCD from attaching.  Any ideas about JTAG/OpenOCD configuration when the iMX6SL is in "Internal Boot" mode?

0 Kudos
1,285 Views
nathanpalmer
Contributor IV

Got it.   The SDRAM Chips must be reset at initialization because the internal boot ROM may have already initialized the RAM.  The DCD code from U-BOOT does not do this.

Added to reset-init :

        ... Clocks, etc. 


        ### DISABLE SDRAM CS 0/1, Resets the DDR Chips
        ## This is necessary for RAM that may have already been enabled with a DCD load
        ## before the HALT command stopped execution
        mww phys 0x021b0000 0x03110000

        ... Start Memory Configuration ....

1,285 Views
MarekVasut
Senior Contributor I

Try simple:

$ openocd -s tcl -f scripts/interface/<if>.cfg -f scripts/target/imx6.cfg

The problem here is it will only work with one core, not all 2/4 on D/Q.

0 Kudos
1,285 Views
nathanpalmer
Contributor IV

Thanks, but the problem is getting all of the "poke" mmw  commands  to initialize the SDRAM, Clocks, FLASH banks, drive strengths, etc for the particular board MCIMX6SL-EVK.   I can dig through the schematic and data sheet but I had hoped that Freescale or a user had already done this and could provide the configuration.

As for the multiple cores, this is a Solo Lite board.

0 Kudos
1,286 Views
fabio_estevam
NXP Employee
NXP Employee

You can use the DCD settings we use in U-boot and convert it to a OpenOCD init script:

http://git.denx.de/?p=u-boot.git;a=blob;f=board/freescale/mx6slevk/imximage.cfg;h=16ea5976250bff9524...

Regards,

Fabio Estevam

0 Kudos
1,285 Views
nathanpalmer
Contributor IV

Awesome.  That will do! Why didn't I think to check das u-boot?

0 Kudos