Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Logic PD support staff and engineers participate, Logic PD does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Logic PD engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Logic PD product download, please subscribe to the TDG Forum of interest.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 25 Jan 2014 10:23 AM by  Oleg Kuryan
i.MX31 SOM-LV JTAG programming
 10 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Richard Hendricks
New Member
New Member
Posts:52


--
23 Jan 2014 09:52 AM
    Dear support team, 

    For some service reasons we need to program several units i.MX31 SOM-LV with 
    NAND and NOR flash on board. Could you help me with information 
    for JTAG programmer, like BDSL files and IDs or RAMCodes for Flasher ARM 
    (NAND512W3A2DN6 and NOR M28W160CB)? 
    Thank you very much for any useful information in advance. 

    BR 
    Oleg Kuryan
    Richard Hendricks
    New Member
    New Member
    Posts:52


    --
    23 Jan 2014 10:09 AM

    Oleg,

      Is LogicLoader still present on the cards, or has it been corrupted?  Connect a serial port to the debug serial port and hold the Q key down.  If LogicLoader is still present, you can use that to update the software according to the instructions in this app note:

    http://support.logicpd.com/DesktopM...tryId=1227

    If LogicLoader is not present any more, you will need a BDI2000 from Abatron.  Unfortunately they are end-of-lifed.  It is possible these steps will work with a BDI3000, but we have not tested that against the i.MX31 SOM-LV.

    Download the latest version of LoLo from our downloads page here

    http://support.logicpd.com/DesktopM...tryId=1560

    Setup BDI2000 with ARM11 firmware and i.MX31 operation (see attached bdiimx31.cfg at bottom).   Will require a TFTP server and ethernet connection to the BDI. For the TFTP server use this script.

    REM tftp.bat

    ipconfig
    tftpsrv w

    REM end of file

     

    Connect baseboard to Ethernet and PC over UART.  Startup TFTP server using tftp.bat file to make sure server is write-enabled.

    Connect BDI2000 to baseboard JTAG connector.

     

    Boot board

    telnet to the BDI2000

    Enter these commands at the BDI2000 prompt:

    halt

    load 1016717_boot.elf elf

    go

    (wait for a few seconds, boot.elf initializes the SDRAM)

    halt

    load  1016717_lolo_RAM.elf elf

    go

    (at this point the debug serial port will show the LoLo banner screen)

    At the losh> prompt type

    update

    In Teraterm, use File, Send File, select Binary, and send 1016717_lolo.upd

    LoLo will burn the NOR version of itself onto the memory 

    disconnect everything from the baseboard, except for the debug serial port, and reboot.

    Use logicloader to install your custom software

     

     

     

    ; *-------------------------------------------------------------------------*
    ; * file bdiimx31.cfg
    ; * brief JTAG configuration script for Abatron BDI 2000 and the
    ; *             IMX31 card engine.
    ; * 
    ; * © Copyright 2006, Logic Product Development, Inc. All Rights Reserved.
    ; *
    ; * NOTICE:
    ; *  This file contains source code, ideas, techniques, and information
    ; *  (the Information) which are Proprietary and Confidential Information
    ; *  of Logic Product Development, Inc.  This Information may not be used
    ; *  by or disclosed to any third party except under written license, and
    ; *  shall be subject to the limitations prescribed under license.
    ; *
    ; *-------------------------------------------------------------------------*


    ; bdiGDB configuration for ARM IMX31
    ; --------------------------------------------------
    ;
    [INIT]
    WCP15   0x4001      0x00f00000  ;CPACC: allow CP10 and CP11 access
    WCP10   0x00e8      0x40000000  ;FPEXC: enable VFP11 coprocessor
    ;

    [TARGET]
    CPUTYPE     ARM1136
    CLOCK       3                   ;JTAG clock (0=Adaptive,1=16MHz,2=8MHz,3=4MHz)
    POWERUP     100                ;start delay after power-up detected in ms
    WAKEUP      400                ;delay time (ms) after reset deassert
    ENDIAN      LITTLE              ;memory model (LITTLE | BIG)
    VECTOR      CATCH 0x1f          ;catch D_Abort, P_Abort, SWI, Undef and Reset
    BREAKMODE   HARD                ;SOFT or HARD
    DCC         7                   ;DCC I/O via TCP port 7
    SCANPRED    2 9                 ;no JTAG devices before the ARM1136
    SCANSUCC    1 4                 ;the ETMBUF after the ARM1136 core


    [HOST]
    ;IP          151.120.25.119
    ;FILE        E:\cygwin\home\demo\arm11\fibo.x
    ;FORMAT      ELF
    ;LOAD        MANUAL      ;load file MANUAL or AUTO after reset
    PROMPT      ARM1136>

    [FLASH]
    WORKSPACE   0x1FFFC000          ;Workspace in target RAM for fast programming algorithm
    CHIPTYPE    I28BX16           ;Flash type
    CHIPSIZE    0x200000           ;The size of one flash chip in bytes
    BUSWIDTH    16                  ;The width of the flash memory bus in bits (8 | 16 | 32)
    ;FILE        $arm1136.cfg
    ;FORMAT      BIN 0x00010000

    [REGS]

    ;end of file

    Oleg Kuryan
    New Member
    New Member
    Posts:8


    --
    23 Jan 2014 02:23 PM
    Thank you for that reply. LogicLoader is present.
    But I have no SD/MMC interface available on my board. USB and UART only.
    How can I dump of memory files? Can I mount USB Flash Card or perform dump through UART?
    Richard Hendricks
    New Member
    New Member
    Posts:52


    --
    23 Jan 2014 02:45 PM
    Do you have access to an Ethernet interface? You can download or upload an image over Ethernet. Using a serial port would be extremely slow. LogicLoader does not support USB.
    Oleg Kuryan
    New Member
    New Member
    Posts:8


    --
    24 Jan 2014 02:33 AM
    Unfortunately I have only UART and JTAG on my board.
    It would be very good to know how to perform flash programming in my case (via UART for example).
    Oleg Kuryan
    New Member
    New Member
    Posts:8


    --
    24 Jan 2014 08:35 AM
    Now I found a way for Ethernet connection. But how to use it for saving/writing?
    Richard Hendricks
    New Member
    New Member
    Posts:52


    --
    24 Jan 2014 11:39 AM
    Oleg,
    Having access to Ethernet will allow you to pull images and burn them back.

    You will need to setup a TFTP server with Write enabled.

    To extract NOR flash, including LoLo and the config block, replace IP with your IP address and run a TFTP server with [w]rite option enabled. LoLo can take up the first 0x80000, and 0x80000 to 0x90000 is the config block.

    IP=192.168.120.61; ifconfig sm0 dhcp;
    dd of:/tftp/$IP\:NOR.raw if:/dev/flash0 count:9 obs:65536 ibs:65536; md5sum 0xa0000000 0x90000; md5sum /tftp/$IP\:NOR.raw


    ======

    To extract the NAND flash, replace IP with your IP address and run a TFTP server with [w]rite option enabled.

    losh> IP=192.168.120.61; ifconfig sm0 dhcp;
    losh> dd of:/tftp/$IP\:NAND.raw if:/dev/nand0 count:130720 obs:528 ibs:528 skip:0 skip_bad:1;
    losh> md5sum /tftp/$IP\:NAND.raw

    To extract NOR flash, including LoLo and the config block, use this command. LoLo can take up the first 0x80000, and 0x80000 to 0x90000 is the config block.

    losh> dd of:/tftp/$IP\:NOR.raw if:/dev/flash0 count:9 obs:65536 ibs:65536; md5sum 0xa0000000 0x90000; md5sum /tftp/$IP\:NOR.raw



    To burn the flash, follow these commands
    To write the NOR flash, replace IP with your IP address and run a TFTP server.

    IP=192.168.120.61; ifconfig sm0 dhcp;
    load raw 0xa0000000 0x90000 /tftp/$IP\:NOR.raw; burn
    yconfirm
    md5sum 0xa0000000 0x90000; md5sum /tftp/$IP\:NOR.raw

    =====

    To write the NAND flash, replace IP with your IP address and run a TFTP server

    IP=192.168.120.61; ifconfig sm0 dhcp;
    md5sum /tftp/$IP\:NAND.raw
    dd if:/tftp/$IP\:NAND.raw of:/dev/nand0 count:130720 obs:528 ibs:528 seek:0 skip_bad:1;
    Oleg Kuryan
    New Member
    New Member
    Posts:8


    --
    24 Jan 2014 01:50 PM
    Thank you very much Richard.
    But I faced with another problem. I have very slow speed on Ethernet connection during upload/download. Average speed is about 4 Kb/sec. On this speed I even can not perform MD5 check. I used different TFTP servers. Result is the same. In this case I think the serial connection is much faster.
    But I don't find any information how to use it for programming.
    Richard Hendricks
    New Member
    New Member
    Posts:52


    --
    24 Jan 2014 04:54 PM
    Oleg,
    Are you setting up a static IP address for the i.mx31 and the host PC, with a direct-connect ethernet cable? 4kb/s is a very slow download speed. Do you Ethernet magnetics on the Ethernet port?

    Setting up serial port download would require extensive time, and we would need a support contract to do further work.

    http://www.logicpd.com/support/supp...-packages/
    Richard Hendricks
    New Member
    New Member
    Posts:52


    --
    24 Jan 2014 04:57 PM
    Another possibility would be to remove the i.MX31 cards from your system and put them into a LITEKIT for extraction/reprogramming. They are currently end-of-lifed from us, but it looks like Mouser might have one in stock.

    http://www.mouser.com/ProductDetail...4vDUuy8%3d
    Oleg Kuryan
    New Member
    New Member
    Posts:8


    --
    25 Jan 2014 10:23 AM
    Richard,

    The "speed problem" has been solved by replacing of bad (shortcuted inside) magnetic transformer. Now it about 300 kBit/sec.
    In my case I used the following commands for programming:
    dd if:/dev/nand0 of:/tftp/192.168.1.100:NAND0.IMG count:128512 ibs:528 obs:528 skip:0 skip_bad:1;
    erase B0 B4096 /dev/nand0;
    dd if:/tftp/192.168.1.100:NAND0.IMG of:/dev/nand0 count:128512 ibs:528 obs:528

    By the way, I didn't solve all of my problems with unit. All of them get stuck with message: Uncompressing Linux..............
    I am not sure does it SW or HW problem. I will find 100% working SW in two days for check it.
    But how to test HW ? RAM for example. Does exist of special test FW for it?
    How to check NAND md5 on SOM-LV?
    You are not authorized to post a reply.