none
How can I make my steploder smaller than 4Kb RRS feed

  • Question

  • HI everyone

    My macro chip need 4K steploder to copy EBOOT from nand to DDR while power on. I am Build our Windows CE 6.0 BSP but meet some questions.

    My steploader.bib configs as following:

    MEMORY
    ;---------------------------------------------------------------------
    ;  NAME       ADDRESS       SIZE       TYPE
    ;---------------------------------------------------------------------
      STEPLDR      00000000      00002000    RAMIMAGE
      RAM        800F0000      0000C000    RAM
      STACK       800FC000      00004000    RESERVED
    
    CONFIG
      COMPRESSION = OFF
      PROFILE = OFF
      KERNELFIXUPS = OFF
     
      ROMSTART = 000010000
      ROMWIDTH = 32
      ROMSIZE = 00001000
    
    MODULES
    ;  Name     Path               Merory Type
    ;-----------------------------------------------------------------------
      nk.exe   $(...)               STEPLDR
    

    When build complete, Create STEPLDR.nb0 4K size. but I found ,not all data build in STEPLDR.nb0.  

    stepldr.map:

    Preferred load address is 00010000

      ...
      ...
    Preferred load address is 00010000
    
    Start         length      Name          Class
    ...
    ...
    ...
    001:00000268     000005f8H    .text           CODE
    001:00000860     00000000H    .edata          CODE
    002:00000000     00000048H    .pdata          DATA
    
      ....
      ....
    

    I found the .pdata at STEPLDR.nb1. After I load the STEPLDR.nb0 at nandflash. Its not work correctly while chip poweron.

    Please help me! How config it can make .pdata build in STEPLDR.nb0. thanks!

    Best Regards!

    Tuesday, March 8, 2011 6:47 AM

All replies

  • Firstly, ROMSTART should match to the starting address of RAMIMAGE, that is 00000000 in this case.
    And the ROMIMAGE always create a ROM header in the first 4KB so you will need to use hex editor or debug.com to trim the first 4KB.
    Note that in such kind of image, it should not access any global variable and therefore the code should be carefully written in ASM only.

    Tuesday, March 8, 2011 8:55 PM
  • Thanks.

    Making ROMSTART match to 00001000 can trim the first 4KB. So STPLDR.nb0 is just the usefull image.  Maybe there are global variable in my code.

    Wednesday, March 9, 2011 5:39 AM
  • Not only global variable, any absolute address (e.g. branch to a fixed address) can be a problem.

    Wednesday, March 9, 2011 9:54 PM