none
Problem loading nk.bin to SD card to boot IMX51 EVK RRS feed

  • Question

  • Hi,

    I am facing problem in loading nk.bin file to SD card to boot IMX51 EVK. The target details are as follows,

    OS::Windows Embedded Compact

    Hardware::Freescale IMX51 EVK

    BSP::Freescale's WINCE700 BSP.

    basically i want to debug a driver provided by freescale for IMX51 so i am performing a build  in Freescale_i_MX51_EVK_ARMV7_Debug mode but the nk.bin file is too large and i am unable to load it on the SD card. it displays the following error on the hyperterminal window.

    BL_IMAGE_TYPE_BIN

    INFO: OEMMultiBINNotify (dwNumRegions = 1, dwRegionStart = 0x9faa0000).
    INFO: OEMVerifyMemory (CA = 0x9faa0000, PA = 0x1ffa0000, length = 0x894091c)
    ERROR: Invalid address range.
    !OEMVERIFYMEMORY: Invalid image
    INFO: OEMReportError Reason 0xfffffff7

    .

    .

    .

    After doing some research i got to know that if i change the config.bib file(C:\WINCE700\platform\iMX51_EVK\FILES) in the bsp i could load the nk.bin file on the target. so i changed the RAMSIZE, ROMSIZE and NKSIZE. my altered config.bib file has the following now.. the .bib file snippet is shown below,

    IF IMGSMALLNK !
        ;#define NK_SIZE     05E00000
        ;#define RAM_START   86000000
        ;Modified by James
        #define NK_SIZE     08C00000
        #define RAM_START   88E00000	
    
    IF IMGFLASH
        IF IMGEBOOT
            #define NK_START    90040000
            ;#define NK_SIZE     03FC0000
            ;Modified by james
            #define NK_SIZE     08C00000
            #define RAM_START   80200000
    
     Name        Address     Size        Type
                        ;NK          $(NK_START)  $(NK_SIZE)  RAMIMAGE
                        ;Modified by James
                        NK          $(NK_START)   08C00000    RAMIMAGE
                        RAM         $(RAM_START) $(RAM_SIZE) RAM
    
    IF IMGFLASH !
        AUTOSIZE=ON
        ROMSTART=80200000
        ;ROMSIZE=$(NK_SIZE)	
        ;modified by James
        ROMSIZE=08C00000	
        ROMWIDTH=32 
    
    IF IMGFLASH
        IF IMGEBOOT
            ;ROMSIZE=03F80000
            ;Modified by James
            ROMSIZE=08C00000
            ROMSTART=90080000
    

    Am i missing any step? can i load a Nk.bin file of size 136mb? can i work in Freescale_i_MX51_EVK_ARMV7_Debug mode because all others work on  Freescale_i_MX51_EVK_ARMV7_release mode. My ram size on the target is 256MB. please guide me in solving this. Your answers are appreciable!!!

    Thanks in advance.


    Monday, January 21, 2013 6:29 AM

All replies

  • Hi James,

    You can use Release configurations to reduce the image size.

    For your debug process you can use KITL.

    Just check the below link for the initial knowledge of KITL,

    http://www.google.co.in/url?sa=t&rct=j&q=KITL+wince&source=web&cd=5&cad=rja&ved=0CE4QFjAE&url=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2FD%2FB%2FB%2FDBB8961E-67D2-4E71-AE43-223E0304C5F7%2FDebugginWindowsEmbeddedCE-Hobrla.pdf&ei=6eX8UOKCCs6qrAeMzYCoAg&usg=AFQjCNFeVbVcAU1bEJ3Uyi5sDOu49HIYkQ&bvm=bv.41248874,d.bmk.

    More information is available on net.

    With Regards

    nadini



    Monday, January 21, 2013 6:59 AM
  • Thanks nadini.. thank you so much for the link. currently i am using COMPILE_DEBUG=1 setting to debug the driver but i have one question in my mind. can u tell me why eboot.nb0 file does not form in Freescale_i_MX51_EVK_ARMV7_Debug mode? because i can find both eboot.nb0 and NK.nb0 file in both Freescale_i_MX51_EVK_ARMV7_Checked and Freescale_i_MX51_EVK_ARMV7_Release mode but when i build my eboot source files it won't create eboot.nb0 file in the release directory. what is that i have to change in order to create eboot.nb0 file.

    Regards,

    James

    Monday, January 21, 2013 9:33 AM
  • Hi,
     
    It also because of the eboot.bib file of your BSP.So check the configuration on the bib file.But in practice we normally don�??t use the debug version for the bootloader.
     
    Regards,
    Prabu [eMVP]
    Monday, January 21, 2013 12:47 PM
  • James:

    Check the sources file for your eboot.   It is possible that it skips the build if building for debug becuase the size would become too large for the space availalbe for eboot.

    Bruce


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com

    Monday, January 21, 2013 1:32 PM
    Moderator
  • Bruce is right.We usually do the same on our BSPs to avoid building it on debug version.
     
    Regards,
    Prabu [eMVP]
    Monday, January 21, 2013 1:43 PM
  • There is also

    #define IMAGE_BOOT_NKIMAGE_SIZE

    in

    iMX51-EVK\SRC\INC\ image_cfg.h

    image_cfg.inc

    which needs to changed so eboot can properly recognized bigger nk.bin (in either downloading, flashing and loading). It's 96 MB by deafult (without IMGSMALLNK declared) so it can't do anything with image that you're trying to load as it's recognized as being to big.

    Monday, January 21, 2013 2:08 PM
  • Hi James,

    If you are changing config.bib, make sure that you are changine OEMAddressTable also -reflecting the same changes. The config.bib is used during creation of nk.bin (by Makimage.exe-> Romimage.exe) and later when system is booting up, kernel uses the OEMAddressTable to setup virtual memory.


    - Chandra

    Thursday, January 24, 2013 7:13 AM
  • thanks to Bruce, Prabhu, pawelZ and chandra for your valuable inputs. I felt that was a long procedure to change eboot.bib , config.bib, header file,img_cfg.h and OEMAdressTable to just debug a driver code so i enabled compile_debug=1 in the tool and was able to debug the code using break points and successfully fixed the bug in the driver.

    Anyways thanks a lot for your time..

    regards,

    James

    • Proposed as answer by deepak_ Friday, February 14, 2014 1:33 PM
    Monday, January 28, 2013 6:03 PM