Anyone have an OpenOCD board config for the MCIMX6SLEVK Evaluation Board

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Anyone have an OpenOCD board config for the MCIMX6SLEVK Evaluation Board

跳至解决方案
2,816 次查看
nathanpalmer
Contributor IV

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

标签 (2)
标记 (4)
0 项奖励
回复
1 解答
2,024 次查看
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 项奖励
回复
7 回复数
2,024 次查看
wenmingfeng
Contributor III

Can I used it for imx6 duallite?

Thanks!

wenming

0 项奖励
回复
2,024 次查看
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 项奖励
回复
2,024 次查看
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 ....

2,024 次查看
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 项奖励
回复
2,024 次查看
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 项奖励
回复
2,025 次查看
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 项奖励
回复
2,024 次查看
nathanpalmer
Contributor IV

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

0 项奖励
回复