STR711 global variables don't work

Hi,

I have a problem with global variables in one of my first ARM7 projects.

I declared a variable upside main()

u16 test;

but the output to my UART-terminal-program of the following c-code is 0x62000908:0

  test = 42;
  sprintf(buffer,"%p:%i",&test,test);
  UART_StringSend(UART0, buffer);

Is there a problem with the ram-address? Where could I find the reason for this error? If I declare test inside main() it works!

I have uploaded the Project on my Server: [Download

It’s a sample-code is from [here](Loading...)](http://munske.de/Temp/STR711-UART.rar)

Your linker script puts the variable into bank 1 external memory.

Does this bank exist and is it enabled?

I have no external memory installed in hardware.

Where do I have to change the linker script to make it work? Could you please post the lines that I should change?

In file STR71x-ROM.ld change >XDATA to >DATA for section .data and .bss.

That’s in line 131 and 147.

Thank you very much!

For beginners it’s very difficult to find the solution for those problems because an ARM7 is much more complex than an avr for example - it seems to take long time to get exposed with this Mikrocontroller, but the sparkfun-community is a big help for me!