WEC2013 OAL startup issue on imx6x board RRS feed

  • Question

  • Hi all,

    I am working on imx6Q board to bring up WEC2013 on it. I have working WEC7 BSP for the same board.

    I did changes to WEC7 BSP by referring following link,

    The nk.nb0 is not working. Its hanging at KernelStart function in ":\WINCE800\platform\iMX6Q_SABREAuto\SRC\OAL\OALLIB\startup.s" file.

    I think there is OEMAdressTable changes in WEC 2013 .

    I am using following OEM address table :


       DCD     0xA1000000, 0x0C0000,   0x2100000,  0x00C00     ; 32M reserved for WEIM, last 1M reserved for SPI ,0xC0000=(CSP_BASE_MEM_PA_EIM_CS0+0x04000000)>>8
       DCD     0xA3400000, 0x000000,   0x2C00000,  0x00C00     ; 44 MB I/O space ,0x0000 =CSP_BASE_MEM_PA_ROM >> 8
       DCD     0x00000000, 0x000000,   0x0000000,  0x00000     ; end of table

    ;  CE7 Table format: cached address, physical address, size

    ;  CE_NEW_MAPPING_TABLE EQU    0x87654321  from kxarm.h

            DCD     0x87654321, g_oalCE7DeviceTable,  0   ; Flag to use new CE7 mapping scheme
            DCD     0x80000000, 0x10000000,   2     ; ContextRestore   (VA Range: 0x0x80000000-0x0x80100000)
            DCD     0x81000000, 0x10200000, 510     ; SDRAM   (VA Range: 0x81000000-0xA1000000)
            DCD     0x00000000, 0x00000000,   0     ; end of table

    What could be the possible reason for hanging at KernelStart function?

    Above OEMAddresstable has any syntax problem?

    How i can debug this issue?

    Thanks & regards,



    Saturday, July 27, 2013 12:59 PM

All replies

  • if you feel that your address table entries are correct then you have to check in which area the addresstable is defined.

    you have to move non-code symbols such as OEMAddresstable to the DATAAREA instead of the TEXTAREA so that the assembler doesn't set the LSB of the non-code symbols.

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best

    Monday, July 29, 2013 4:43 AM
  • Hi,

    Thanks for the reply.

    I am declaring OEMAddress table as  RODATAAREA. It is still hanging in kernel start function.

    What else i need to verify ?

    With Regards,



    Monday, July 29, 2013 6:09 AM
  • can you try with Debug build to get more info?

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best

    Monday, July 29, 2013 6:45 AM
  • With Debug mode also not getting any prints on hyperterminal (info ) .


    Monday, July 29, 2013 9:00 AM
  • My old WEC 7 OEM table is as follows,

        DCD 0x81000000, 0x10000000, 384   ; RAM image mapping
        DCD 0x9B000000, 0x00C00000, 33            ; 32M reserved for WEIM,
        DCD 0x9D400000,0x00000000 , 44                             ; 44 MB I/O space
        DCD 0x00000000, 0x00000000, 0                                       ; Terminate table

    How can i convert this to support WEC 2013 OEMaddress table syntax?


    • Edited by Kavya D.C Monday, July 29, 2013 10:24 AM grammer problem
    Monday, July 29, 2013 10:22 AM
  • if your addresstable is working in WEC7, you can use it. only thing you have to keep it in RODATAAREA

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best

    Monday, July 29, 2013 10:41 AM
  • The above address table works fine in WEC7 but with WEC 2013 its  hanging. I have declared OEMaddress table as RODATAAREA.
    Any idea about reason for hanging after jumping to kernel start function?


    Monday, July 29, 2013 11:21 AM
  • just post the startup.s code here. let us see.

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best

    Monday, July 29, 2013 11:41 AM
  • I have attached the startup.s code . In that g_oalAddressTable refers to the table above. Please check and say me what else changes i need to do? Thanks in advance.




    • Edited by Kavya D.C Thursday, August 1, 2013 5:33 AM confidential data
    Tuesday, July 30, 2013 7:48 AM
  • how do you know your code execute up to kernelStart? Do you have any LED blinking for debugging?

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best

    Tuesday, July 30, 2013 8:46 AM
  • No. I am dumping character in startup.s file to debug port for debugging purpose. That is printing on hyperterminal.


    Tuesday, July 30, 2013 8:58 AM
  • Are you sure that the address table is in RODATAAREA? Did you confirm by taking dump of the oal.exe? you can take dump by using dumpbin /DISASM  oal.exe > oal.txt

     There you can see the address table entries. LSB should not set for these entries.

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best

    Tuesday, July 30, 2013 9:16 AM
  • I could not see any LSB bit set in the OALtable of OAL.exe . And its entries are as follows,

     00018DBA: 0000      movs        r0,r0
      00018DBC: 0000      movs        r0,r0
      00018DBE: 8100      strh        r0,[r0,#8]
      00018DC0: 0000      movs        r0,r0
      00018DC2: 1000      asrs        r0,r0,#0x20
      00018DC4: 0180      lsls        r0,r0,#6
      00018DC6: 0000      movs        r0,r0
      00018DC8: 0000      movs        r0,r0
      00018DCA: 9B00      ldr         r3,[sp]
      00018DCC: 0000      movs        r0,r0
      00018DCE: 0C00      lsrs        r0,r0,#0x10
      00018DD0: 0021      movs        r1,r4
      00018DD2: 0000      movs        r0,r0
      00018DD4: 0000      movs        r0,r0
      00018DD6: 9D40      ldr         r5,[sp,#0x100]
      00018DD8: 0000      movs        r0,r0
      00018DDA: 0000      movs        r0,r0
      00018DDC: 002C      movs        r4,r5
      00018DDE: 0000      movs        r0,r0
      00018DE0: 0000      movs        r0,r0
      00018DE2: 0000      movs        r0,r0
      00018DE4: 0000      movs        r0,r0
      00018DE6: 0000      movs        r0,r0
      00018DE8: 0000      movs        r0,r0
      00018DEA: 0000      movs        r0,r0
      00018DEC: 0000      movs        r0,r0
      00018DEE: A100      adr         r1,00018DF0
      00018DF0: 0000      movs        r0,r0
      00018DF2: 000C      movs        r4,r1
      00018DF4: 0000      movs        r0,r0
      00018DF6: 0210      lsls        r0,r2,#8
      00018DF8: 0C00      lsrs        r0,r0,#0x10
      00018DFA: 0000      movs        r0,r0
      00018DFC: 0000      movs        r0,r0
      00018DFE: A340      adr         r3,00018F00
      00018E00: 0000      movs        r0,r0
      00018E02: 0000      movs        r0,r0
      00018E04: 0000      movs        r0,r0
      00018E06: 02C0      lsls        r0,r0,#0xB
      00018E08: 0C00      lsrs        r0,r0,#0x10
      00018E0A: 0000      movs        r0,r0
      00018E0C: 0000      movs        r0,r0
      00018E0E: 0000      movs        r0,r0
      00018E10: 0000      movs        r0,r0
      00018E12: 0000      movs        r0,r0
      00018E14: 0000      movs        r0,r0
      00018E16: 0000      movs        r0,r0
      00018E18: 0000      movs        r0,r0
      00018E1A: 0000      movs        r0,r0
      00018E1C: 4321      orrs        r1,r1,r4
      00018E1E: 8765      strh        r5,[r4,#0x3A]
      00018E20: 8DED      ldrh        r5,[r5,#0x2E]
      00018E22: 0001      movs        r1,r0
      00018E24: 0000      movs        r0,r0
      00018E26: 0000      movs        r0,r0
      00018E28: 0000      movs        r0,r0
      00018E2A: 8000      strh        r0,[r0]
      00018E2C: 0000      movs        r0,r0
      00018E2E: 1000      asrs        r0,r0,#0x20
      00018E30: 0002      movs        r2,r0
      00018E32: 0000      movs        r0,r0
      00018E34: 0000      movs        r0,r0
      00018E36: 8100      strh        r0,[r0,#8]
      00018E38: 0000      movs        r0,r0
      00018E3A: 1020      asrs        r0,r4,#0x20
      00018E3C: 01FE      lsls        r6,r7,#7
      00018E3E: 0000      movs        r0,r0
      00018E40: 0000      movs        r0,r0
      00018E42: 0000      movs        r0,r0
      00018E44: 0000      movs        r0,r0
      00018E46: 0000      movs        r0,r0
      00018E48: 0000      movs        r0,r0
      00018E4A: 0000      movs        r0,r0
      00018E4C: 0000      movs        r0,r0
      00018E4E: 0202      lsls        r2,r0,#8
      00018E50: 2000      movs        r0,#0
      00018E52: 00A0      lsls        r0,r4,#2
      00018E54: C000      ?stm        r0!,{}
      00018E56: 0207      lsls        r7,r0,#8
      00018E58: C000      ?stm        r0!,{}
      00018E5A: 0217      lsls        r7,r2,#8
      00018E5C: 8000      strh        r0,[r0]
      00018E5E: 020C      lsls        r4,r1,#8
      00018E60: 8030      strh        r0,[r6]
      00018E62: 020C      lsls        r4,r1,#8
      00018E64: 8010      strh        r0,[r2]
      00018E66: 020C      lsls        r4,r1,#8
      00018E68: 4000      ands        r0,r0,r0
      00018E6A: 020C      lsls        r4,r1,#8
      00018E6C: 0000      movs        r0,r0
      00018E6E: 020E      lsls        r6,r1,#8
      00018E70: 8000      strh        r0,[r0]
      00018E72: 021B      lsls        r3,r3,#8
      00018E74: 0001      movs        r1,r0
      00018E76: 0002      movs        r2,r0
      00018E78: 0202      lsls        r2,r0,#8
      00018E7A: 1600      asrs        r0,r0,#0x18
      00018E7C: 2082      movs        r0,#0x82
      00018E7E: 1600      asrs        r0,r0,#0x18
      00018E80: 1000      asrs        r0,r0,#0x20
      00018E82: 00A0      lsls        r0,r4,#2
      00018E84: 1180      asrs        r0,r0,#6
      00018E86: 00A0      lsls        r0,r4,#2
      00018E88: 1080      asrs        r0,r0,#2
      00018E8A: 00A0      lsls        r0,r4,#2
      00018E8C: 1C00      adds        r0,r0,#0
      00018E8E: 00A0      lsls        r0,r4,#2
      00018E90: 1400      asrs        r0,r0,#0x10
      00018E92: 00A0      lsls        r0,r4,#2
      00018E94: 1800      adds        r0,r0,r0
      00018E96: 00A0      lsls        r0,r4,#2
      00018E98: 0100      lsls        r0,r0,#4
      00018E9A: 00A0      lsls        r0,r4,#2
      00018E9C: C000      ?stm        r0!,{}
      00018E9E: 020C      lsls        r4,r1,#8
      00018EA0: 8AAD      ldrh        r5,[r5,#0x14]
      00018EA2: 0001      movs        r1,r0

    There is start address changes in the WEC2013 compare to WEC7.

    In WEC7 the nk.bin details are as follows:

    ViewBin... nk.bin
    Image Start = 0x80200000, length = 0x04786EA4
            Start address = 0x80201000
    Checking record #51 for potential TOC (ROMOFFSET = 0xFC750404)
    Checking record #225 for potential TOC (ROMOFFSET = 0xFE7553DC)
    Checking record #252 for potential TOC (ROMOFFSET = 0xFEB46408)
    Checking record #367 for potential TOC (ROMOFFSET = 0x00000000)
    Found pTOC  = 0x843afba4
    ROMOFFSET = 0x00000000

    In WEC2013 the nk.bin details are as as follows:

    ViewBin... nk.bin
    Image Start = 0x80200000, length = 0x027E2824
            Start address = 0x80208AAD
    Checking record #232 for potential TOC (ROMOFFSET = 0x00000000)
    Found pTOC  = 0x829dfe74
    ROMOFFSET = 0x00000000

    Why there is difference in the start address ? Is it a expected behavior? Or this is a bug?


    Tuesday, July 30, 2013 11:26 AM
  • Start address change is expected in WEC2013 and it is not a bug. Addresstable entries are also good.

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best

    Tuesday, July 30, 2013 11:50 AM
  • Thanks for the support vinoth.

    Now I am porting bootloader for WEC 2013.  Bootloader is not working when i build in WEC 2013.

    I am not getting any prints when i run eboot.nb0.

    Any major changes to be done in bootloader?


    Monday, August 12, 2013 11:08 AM
  • Just go through this article.

    if you still have any specific question, you can ask.

    if you have debug LED in your board, write some assembly code to enable it after the StartUp entry ( entry point of your boot loader)

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best

    Monday, August 12, 2013 12:38 PM
  • The instruction " orr     r2, r9, r2, LSR #18" is valid or i need to rewrite it as follows?

    LSR r2, r2, #18

    orr r2,r9 ,r2

    I am using dumping character method to debug bootloader. Its not entering my bootloader startup entry.

    What could be the problem? how i can debug this issue?

    Thanks & Regards,



    • Edited by Kavya D.C Tuesday, August 13, 2013 6:56 AM missing
    Tuesday, August 13, 2013 6:53 AM
  • Hi Kavya

    The best approach for this issue will be to use a JTAG debugger. It was really helpful for us at Adeneo during the development of our WEC2013 BSP for SABRE LITE and SABRE SDB.


    Adeneo-Embedded Dev Team
    Thursday, October 3, 2013 6:12 PM
  • Hi Kavya,

      did you manage to solve this issue?

    Best regards, Igor

    Thursday, July 9, 2015 12:45 PM