This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How I can change the starting address in monitor mode

Problem:
I would like to change Reset address (0x0000) to
another one (0x800000) in the MONITOR Mode, because in
our hardware RAM starts at this address.
I am able to load my program into RAM using bootstrap mode
and my MONITOR, but I am unable to run or debug my proram.

Thanks for help

Aram

  • In uVision2:

    1. In Project Options-Target Options: un-check the Use on-chip RAM and Use on-chip ROM check boxes.

    2. In Project Options-Target Options: under External Memory enter the appropriate ROM range and RAM range. ROM will probably be starting at 0x80000 (for a length of 0x8000) and RAM will probably start at 0x88000 (for a length of 0x8000).

    3. In Project Options-L166 Misc: enter 0x80000 for the Interrupt Vector Table Address.

    4. Be sure to include the START167.A66 startup file in your project.

    Rebuild your project and take a look at the MAP file. You should see everything in the correct place.

    I tried this with the HELLO example program. Following is the MAP file output from that build.

    MEMORY MAP OF MODULE:  Hello (HELLO)
    
    
    START     STOP      LENGTH    TYPE  RTYP  ALIGN  TGR  GRP  COMB  CLASS   SECTION NAME
    =====================================================================================
    00FA00H   00FBFFH   000200H   ---   ---   ---    ---  ---  ---   * SYSTEM STACK *
    00FC00H   00FC1FH   000020H   DATA  ---   BYTE   ---  ---  ---   *REG*   ?C_MAINREGISTERS
    080000H   080003H   000004H   ---   ---   ---    ---  ---  ---   * INTVECTOR TABLE *
    080004H   080005H   000002H   XDATA REL   WORD   ---  ---  GLOB  ---     ?C_INITSEC
    080006H   080045H   000040H   DATA  REL   WORD   ---    2  PUBL  NCONST  ?NC??PRNFMT
    080046H   080052H   00000DH   DATA  REL   BYTE   ---    2  PUBL  NCONST  ?NC?HELLO
    080054H   080171H   00011EH   CODE  REL   WORD   ---  ---  PRIV  ICODE   ?C_STARTUP_CODE
    080172H   080475H   000304H   CODE  REL   WORD   ---    1  PUBL  NCODE   ?C_LIB_CODE
    080476H   0804A7H   000032H   CODE  REL   WORD   ---    1  PRIV  NCODE   ?PR?PUTCHAR
    0804A8H   0804CDH   000026H   CODE  REL   WORD   ---    1  PUBL  NCODE   ?PR?HELLO
    088000H   0881FFH   000200H   DATA  REL   WORD   ---    3  PUBL  NDATA   ?C_USERSTACK
    

    Note that the system stack and the main register bank are located in on-chip memory. This is REQUIRED. This memory is accessed using DPP3 which must always be set to a value of 3 (so you can access the SFRs).

    Keil Support