I am trying to compile and download standalone program on a custom MPC8309 development board. Uboot was ported successfully.Facing the problems during execution of the code.
I have written simple C code to write a letter to a 4 character display (same operations was done using MM command and it worked)
volatile unsigned int *SET = (volatile unsigned int *)0xe0000c00;
volatile unsigned int *DISP = (volatile unsigned int *)0xe0000c08;
*SET = 0xf7ff0000;
used the command ./ltib -m shell
LTIB> gcc -o test test.c (This generated test.exe)
LTIB> readelf -a test (Noted down start address 0x10000284)
Then I converted elf to bin using objcopy -O binary test test.bin.
I used loadb command from uboot, dumped the file using hyperterminal in kermit mode
Uboot returned start address as 0x02000000. I typed go 0x2000000. This lead to self reset of the system.
Please let me know what is wrong? Also I want to know how to determine the memory range occupied by uboot in DRAM and changing the relocatable address in C file