Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

DS-5 debugger "run" or "start" option lead HPS to reset

Hi,

I have 2 boards with Cyclone V SoC. One is the Arrow SoCkit and the other is our custom one. There are DDR3 SDRAM installed in Arrow and LPDDR2 SDRAM installed in custom board. I've made preloaders for both boadrs. HPS boots from FPGA portion of the devices. Both HPS started normally, I see preloaders' info in terminals. Then I try to load simple application to SRDAM and execute it via DS-5 debugger. With Arrow board it's alright, but with custom board I've got some issues. Actually the application is loaded but when I try "start" or "run" command in debugger the HPS fails to reset.

"Helloworld" example running in HPS OCRAM works for both boards. In this example I've also tried to read/write some addresses in SDRAM (for DDR3 and LPDDR2) and it's ok. I wonder to know how to fix it.

Thanks.

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    It seems to me I've fixed this issue :)

    The pitfall is linker script: *.ld. The default linker script by Altera from Quartus directory assumed there are 1024 Mb of memory installed on the board. But there are only 512 in our custom board so debugger probably doesn't allow to start application which was linked for 1Gb SDRAM. I've customized linker script for myself:

    MEMORY
    {
      boot_rom (rx) : ORIGIN = 0xfffd0000, LENGTH = 64K
      oc_ram (rwx) : ORIGIN = 0xffff0000, LENGTH = 64K
      /* Need to have 64bytes available before start of program, to store the mkimage header */
      ram (rwx) : ORIGIN = 0x100000 + 0x40, LENGTH = 511M - 0x40
    }

    and it starts work! The real problem is that it's not obvious at all. Maybe for ARM guru, but not for RTL designer! The lack of programming documentation gathered in UG is the major issue I think...

    --- Quote End ---

    Hi, I am working on the same issue as well, but wasn't able to find documentation to explain the memory parameter. The example provided by Altera was a simple Hello World program that I managed to get it to work, but once I included the GPIO and QSPI features into the program, the UART console does not print out message. I realize the binary output file is larger because of added in features, so does the mkimage header require a larger available memory before start of program? I just wonder if you know anything that can help resolve my issue?