Flashing u-boot.bin file on imx6ull nand flash using jlink

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

Flashing u-boot.bin file on imx6ull nand flash using jlink

4,558 Views
jeangardyvalent
Contributor II

Hi guys, i'm using a custom board designed as an imx6ull and i want to flash uboot in the nand flash memory by using a segger jlink. First of all to connect to target, i use the device MCIMX6Y1 defined in jlink. i try to load u-boot.bin binary in the flash memory but i always have write issue. I'm not sure of how to do this... I try to write the binary at this address 0x87800000 but it doesn't work. How can i access to nand flash memory? what is the start address of this memory? has anyone already burned uboot in nand flash memory using JTAG? Can somebody explain me the steps to have an uboot loading on nand flash?

I set the dip switches to serial downloader and NAND boot device.

I also tried to use and imx6ullevk board and was not able to connect to the target using the JTAG... I read on segger wiki (IMX6ULL-EVK - SEGGER - Support Wiki ) that we have to disolder some resistors to be able to use the JTAG but it depends on the board revision. So i checked mine and i have those values : 700-28616 REV A1 and SCH-28616 REV C2. The only difference is that i have SCH-28616 REV C2 and on the wiki they said SCH-28616 REV C1... So i guess for my board, i don't have to do this. So why i can't connect to the reference board? Do i have to disolder those resistors?

Thank you for your support

Labels (2)
8 Replies

2,443 Views
jeangardyvalent
Contributor II

Hi Regan,

Thank you for your answer about the board revision. I'm not using the same mfgtools version as you, mine is L4.9.11_1.0.0-ga_mfg-tools.

Best resgards

Jean

2,443 Views
srishan
Contributor III

Dear Jean,


Even am using L4.9.11_1.0.0-ga_mfg-tools , if you have successfully flashed  onto NAND flash using L4.9.11_1.0.0-ga_mfg-tools, could you please provide guidance on the same?

L4.9.11_1.0.0-ga_mfg-tools tools issue for flashing on Nand flash onto I.mX6ULL EVK board 

As am stuck with this from past 3 days

0 Kudos

2,443 Views
jeangardyvalent
Contributor II

Hi Igor,

I used the linux-cvbs.sh script to create the appropriate script for my board. After that i execute this script (mfgtool2-yocto-mx-evk-nand.vbs.sh) and i have an error that i don't understand the meaning. This my error logs :

./mfgtool2-yocto-mx-evk-nand.vbs.sh                                          
Your Options:
sxuboot: sabreauto
sxdtb: sabreauto
6uluboot: 14x14evk
6uldtb: 14x14-evk
board: sabreauto
nand: nand
nanddtb: gpmi-weim
part_uboot: 0
part_kernel: 1
part_dtb: 2
part_rootfs: 4
Ready to flash.
init op Failed code# 24

Is that means something to you? i used the micro usb OTG to connect the board to my computer, "lsub" command detects the board and display the following result :

  Bus 001 Device 016: ID 15a2:0080 Freescale Semiconductor, Inc. 

Do i have to use other port than usb to program the flash? Can i only do this by using the usb?

There's a log file generated after launching the above script. This file content is :

DLL version: 2.3.4
Thu Nov  9 17:02:18 2017
   Start new logging
ModuleID[2] LevelID[1]: Error: Invalid device name: MX6SLL
ModuleID[2] LevelID[1]: Parse ucl script failed, error code: 24
DLL version: 2.3.4
Thu Nov  9 17:08:37 2017
   Start new logging
ModuleID[2] LevelID[1]: Error: Invalid device name: MX6SLL
ModuleID[2] LevelID[1]: Parse ucl script failed, error code: 24

Instead of choosing MX6ULL as device, the script choose MX6SLL and i don't know why... Do you have an explanation for that error?

Best regards

Jean

0 Kudos

2,443 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jean

for some reason it detects device as MX6SLL,

in ucl2.xml it should detect correct device using:

<STATE name="BootStrap" dev="MX6ULL" vid="15A2" pid="0080"/>

Best regards
igor

0 Kudos

2,443 Views
djregan
Contributor III

Hi Jean,

You and I have the exact same IMX6ULL revisions. I was unable to get my Segger JLink Plus JTAG to connect to the EVK until I removed the resistors that are shared between JTAG and U1401 (the CODEC). Segger JLink is able to connect now and Segger JFlash is able to load code into the QSPI Flash (U303 on the EVK) without issue. Attached is a picture of the resistors that need to be removed from the Carrier Module (shown just to the left of U1401).

IMX6ULL_EVK_remove_Codec_Resistors.JPG

Igor's point on the use of NAND flash and the need to manage the bad block tables makes sense. If we can get the Mfg-tool to work correctly on the MX6ULL -> then it could be the best way to go for flashing efforts. I am new to Mfg-tool too. And, have some active unanswered questions too for different issues I am having with this tool (BTW... I am attempting to use L4.1.15_2.0.0-ga_mfg-tools, now). What version of Mfg Tools are you using?

0 Kudos

2,443 Views
jeangardyvalent
Contributor II

Hi Igor,

Thank you for your quick answer. As mentioned, i downloaded the mfgtools and tried to use the mfgtoolcli binary on linux to program uboot in nand flash. I don't have enough information about that tool and the help is really poor so i still stuck on this point. I can't figure out how to use this tool to program the nand flash. Do you confirm that JTAG can't be used to program the flash memory? The only way to do this is to use the OTG port of the board? I also try to use the given executable (Mfgtoolexe) for windows and i was not able to program the flash... Maybe i've done something wrong but i don't know what is it. That tool uses the configurations files cfg.ini and ucl2.xml to know how to proceed and look for resources in the "firmware" folder. I modify the cfg.ini and use "Nand Flash" for list name and "MX6ULL" for the board to select the "MX6ULL" device in the xml file but it doesn't work. Can you please provide an example of how to use the mfgtoolcli on linux to program the nand flash for the imx6ull? Is the mfgtoolexe has been test on windows 10? I'm working on linux and really need an example of how to do this on linux. I use buildroot to generate a custom uboot, rootfs and dtb files for my board. I already use linux "dd" command to write my image on an sd card and its works. But now i want to use to same genarated files and write everything to nand flash.

Best regards

Jean

0 Kudos

2,443 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jean

no need to change the cfg.ini, general steps is to run appropriate *.vbs file:

for example mfgtool2-yocto-mx-evk-nand.vbs (it has "6uluboot=14x14evk"), ucl2.xml

uses these parameter when executing commands. For nand it is necessary to use kobs-ng

and for its usage one can look at ucl2:   <LIST name="NAND Flash" desc="Choose NAND as media"> 

Best regards
igor

0 Kudos

2,443 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jean

for programming uboot in nand flash memory recommended to use mfg tools from

i.MX 6 / i.MX 7 Series Software and Development Tool|NXP 

as it correctly writes fcb to nand, I am afraid it is not possible with jtag.

For using j-link one can look at AN5229 ARM DS-5 Development Studio Debug

i.MX6UL-EVK sect.7. J-LINK Debug
https://www.nxp.com/docs/en/application-note/AN5229.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos