Hi, I have some project where I store my entire program in the external sdram (by redirecting every section in the linker script to the sdram). When I download the program to the board, it doesn't work. When I run the program in the debugger tool, it works. Does anybody know an answer to this problem ? regards, Tom
external sdram and gdb tool
Started by ●November 26, 2003
Reply by ●November 26, 20032003-11-26
Hi Tom, How are you populating the SDRAM with your .elf file when not using the debugger? Perhaps you're doing this properly, but you didn't mention it here so I have to ask. When downloading the .bit file via iMPACT, the only .elf data that you can possibly have is that in the Block RAM. If you're not moving the .elf into SDRAM then that's the problem; you will need a bootloader of some sort to move the data from a static location (Flash, etc.) into SDRAM. If you are already loading the .elf into SDRAM, then use the XMD tool to check the validity of the .elf file in memory. What I typically do is run an object dump (either mb-objdump or powerpc-eabi-objdump) on the .elf file (I typically use the -S option) and pipe that out to a text file. Next, connect to the device via XMD (ppcconnect or mbconnect) and do mwr's from the base address of your SDRAM. If you do something like mwr 0xF0000000 20, it will dump the 20 addresses after 0xF0000000 (obviously change this to match your SDRAM base address) and you can check them against the .elf file. The boot section of the .elf is at the bottom of the file so look there to start. This will check that your bootloader is doing its job properly and that your system is able to read from the static location (Flash, etc.) properly (we already know that it can write to SDRAM properly because it works with the debugger). I hope this information helps. If not, please post a follow up or open a case with Support. Ryan Laity Xilinx Applications Tom wrote:> Hi, > > I have some project where I store my entire program in the external > sdram (by redirecting every section in the linker script to the > sdram). When I download the program to the board, it doesn't work. > When I run the program in the debugger tool, it works. Does anybody > know an answer to this problem ? > > regards, > > Tom
Reply by ●November 27, 20032003-11-27
Hi Ryan, I tried to connect with ppcconnect to the board, and then i downloaded the program. Then I started the processor and the program worked. ppcconnect dow ppc405_0/code/executable.elf con Correct me if I am wrong, but is this what the bootloader should do ? Could you be more specific about the bootloader? Thanks, Tom On Wed, 26 Nov 2003 10:01:29 -0700, Ryan Laity <ryan_dot_laity@x-i-l-i-n-x_pleasenospam_dot_com> wrote:>Hi Tom, > >How are you populating the SDRAM with your .elf file when not using the >debugger? Perhaps you're doing this properly, but you didn't mention it >here so I have to ask. When downloading the .bit file via iMPACT, the >only .elf data that you can possibly have is that in the Block RAM. If >you're not moving the .elf into SDRAM then that's the problem; you will >need a bootloader of some sort to move the data from a static location >(Flash, etc.) into SDRAM. > >If you are already loading the .elf into SDRAM, then use the XMD tool to >check the validity of the .elf file in memory. What I typically do is >run an object dump (either mb-objdump or powerpc-eabi-objdump) on the >.elf file (I typically use the -S option) and pipe that out to a text >file. Next, connect to the device via XMD (ppcconnect or mbconnect) and >do mwr's from the base address of your SDRAM. If you do something like >mwr 0xF0000000 20, it will dump the 20 addresses after 0xF0000000 >(obviously change this to match your SDRAM base address) and you can >check them against the .elf file. The boot section of the .elf is at >the bottom of the file so look there to start. This will check that >your bootloader is doing its job properly and that your system is able >to read from the static location (Flash, etc.) properly (we already know >that it can write to SDRAM properly because it works with the debugger). > >I hope this information helps. If not, please post a follow up or open >a case with Support. > > >Ryan Laity >Xilinx Applications > > >Tom wrote: > >> Hi, >> >> I have some project where I store my entire program in the external >> sdram (by redirecting every section in the linker script to the >> sdram). When I download the program to the board, it doesn't work. >> When I run the program in the debugger tool, it works. Does anybody >> know an answer to this problem ? >> >> regards, >> >> Tom
Reply by ●November 27, 20032003-11-27
Of course I downloaded the program first with XPS, and then I downloaded it a second time with xmd. I also checked the boot section: f1000ca0 <_boot0>: f1000ca0: 3c 00 f1 00 lis r0,-3840 f1000ca4: 60 00 00 68 ori r0,r0,104 f1000ca8: 7c 08 03 a6 mtlr r0 f1000cac: 4e 80 00 20 blr Disassembly of section .boot: f1000cb0 <_boot>: f1000cb0: 4b ff ff f0 b f1000ca0 <__stack> Tom On Thu, 27 Nov 2003 13:40:22 +0100, Tom <t_t_1232000@yahoo.com> wrote:>Hi Ryan, > >I tried to connect with ppcconnect to the board, and then i downloaded >the program. Then I started the processor and the program worked. > >ppcconnect >dow ppc405_0/code/executable.elf >con > >Correct me if I am wrong, but is this what the bootloader should do ? >Could you be more specific about the bootloader? > >Thanks, > >Tom > > >On Wed, 26 Nov 2003 10:01:29 -0700, Ryan Laity ><ryan_dot_laity@x-i-l-i-n-x_pleasenospam_dot_com> wrote: > >>Hi Tom, >> >>How are you populating the SDRAM with your .elf file when not using the >>debugger? Perhaps you're doing this properly, but you didn't mention it >>here so I have to ask. When downloading the .bit file via iMPACT, the >>only .elf data that you can possibly have is that in the Block RAM. If >>you're not moving the .elf into SDRAM then that's the problem; you will >>need a bootloader of some sort to move the data from a static location >>(Flash, etc.) into SDRAM. >> >>If you are already loading the .elf into SDRAM, then use the XMD tool to >>check the validity of the .elf file in memory. What I typically do is >>run an object dump (either mb-objdump or powerpc-eabi-objdump) on the >>.elf file (I typically use the -S option) and pipe that out to a text >>file. Next, connect to the device via XMD (ppcconnect or mbconnect) and >>do mwr's from the base address of your SDRAM. If you do something like >>mwr 0xF0000000 20, it will dump the 20 addresses after 0xF0000000 >>(obviously change this to match your SDRAM base address) and you can >>check them against the .elf file. The boot section of the .elf is at >>the bottom of the file so look there to start. This will check that >>your bootloader is doing its job properly and that your system is able >>to read from the static location (Flash, etc.) properly (we already know >>that it can write to SDRAM properly because it works with the debugger). >> >>I hope this information helps. If not, please post a follow up or open >>a case with Support. >> >> >>Ryan Laity >>Xilinx Applications >> >> >>Tom wrote: >> >>> Hi, >>> >>> I have some project where I store my entire program in the external >>> sdram (by redirecting every section in the linker script to the >>> sdram). When I download the program to the board, it doesn't work. >>> When I run the program in the debugger tool, it works. Does anybody >>> know an answer to this problem ? >>> >>> regards, >>> >>> Tom