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.
Drew Davis: " there are some chip-specific configuration registers you have to set to control where the SRAM shows up." That's precisely the kind of thing I was thinking of when I said that the options you specify to the tools only inform them about your system - they do not generate any code necessary to configure your system! 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!
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