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

Memory Models

I have a small test program which continuously sends characters (ascii table) to the serial ports (ST uPSD3233). The program runs fine when the memory model is:

Memory Model: small: variables in DATA
Code ROM Size: Large: 64K program

But I get garbage when I change from "Memory Model: small: variables in DATA" to "Large: variables in XDATA".

Where should I be looking to fix the problem?

Thanks.

Parents
  • Thanks for all the replies. They have been really helpful especially since this is the first time I'm working on a project of this nature.

    After setting the right values for "start" and "size" options in the target dialog box for code and data I was able to get the small test program to work fine. In the BL51 Locate dialog box I simply selected the "Use memory layout from target dialog" option (I could not understand the other options in th BL51 dialog box and found nothing in the documentation so I left them vacant).

    However I get no output on the serial ports when I try to execute my real project which is much larger in size.

    Andrew Neil:
    You must both set the necessary registers to configure the SRAM to a certain address, and specify that address in the Tool options so that they address the SRAM appropriately!

    According to our hardware engineer I do not have to worry about this because after the reset the hardware comes up configured already with the SRAM mapped at the right location.

    I also looked at the map file and found the following:

    ACTIVE MEMORY CLASSES OF MODULE: FIRSTPROJ(SERIALIO)

    BASE        START       END         USED      MEMORY CLASS
    ==========================================================
    C:000000H   C:000000H   C:00FFFFH   009434H   CODE
    I:000000H   I:000000H   I:0000FFH   000001H   IDATA
    X:000000H   X:000000H   X:00FFFFH   000256H   XDATA
    I:000020H.0 I:000020H.0 I:00002FH.7 000001H.3 BIT
    I:000000H   I:000000H   I:00007FH   00000FH   DATA
    
    This seems to match fine with the values I am using.

    I don't have the ISD51 debugger so I thought I'd try to use the MON51 but it requries minimum 256K of RAM, this chip only has 8K.

Reply
  • Thanks for all the replies. They have been really helpful especially since this is the first time I'm working on a project of this nature.

    After setting the right values for "start" and "size" options in the target dialog box for code and data I was able to get the small test program to work fine. In the BL51 Locate dialog box I simply selected the "Use memory layout from target dialog" option (I could not understand the other options in th BL51 dialog box and found nothing in the documentation so I left them vacant).

    However I get no output on the serial ports when I try to execute my real project which is much larger in size.

    Andrew Neil:
    You must both set the necessary registers to configure the SRAM to a certain address, and specify that address in the Tool options so that they address the SRAM appropriately!

    According to our hardware engineer I do not have to worry about this because after the reset the hardware comes up configured already with the SRAM mapped at the right location.

    I also looked at the map file and found the following:

    ACTIVE MEMORY CLASSES OF MODULE: FIRSTPROJ(SERIALIO)

    BASE        START       END         USED      MEMORY CLASS
    ==========================================================
    C:000000H   C:000000H   C:00FFFFH   009434H   CODE
    I:000000H   I:000000H   I:0000FFH   000001H   IDATA
    X:000000H   X:000000H   X:00FFFFH   000256H   XDATA
    I:000020H.0 I:000020H.0 I:00002FH.7 000001H.3 BIT
    I:000000H   I:000000H   I:00007FH   00000FH   DATA
    
    This seems to match fine with the values I am using.

    I don't have the ISD51 debugger so I thought I'd try to use the MON51 but it requries minimum 256K of RAM, this chip only has 8K.

Children
No data