[SOLVED] JLink/Ozone SDRAM issue on Cortex-A9

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] JLink/Ozone SDRAM issue on Cortex-A9

    Hello-


    I'm working with an Altera Cyclone V SoC with a Cortex A9 core. In our application, we have an external SDRAM chip mapped into memory location 0x00100000-0xC0000000 on the SoC. I have a bootloader program that is downloaded to the On-Chip RAM (0xFFFF0000-0xFFFFFFFF) on the SoC.This bootloader runs first in order to initialize the SDRAM (among other things). Once this bootloader gets to its stopping point, the SDRAM can be loaded with the application code. This sequence works great when I run it in the ARM-DS5 environment with a USB Blaster II programmer.


    I'm investigating whether I can use the Jlink programmer with Ozone to accomplish the same thing. I have it mostly working with my Jlink but I am still running into an issue. Here's a description of my problem:


    From Ozone, using a .jdebug script I'm able to load the bootloader and run it.Then when bootloader reaches its stopping point the .jdebug script detects this and attempts to load the application to the SDRAM (using the File.Load() command).Every time it goes to load the application code, I see the error shown in ozone_error_1.png.

    Immediately after that, I see the error shown in ozone_error_2.png.

    Idon’t understand why it is trying to do a 'flash download' to programSDRAM? The memory range listed on the'flash download' dialog is clearly the SDRAM memory space. Is there something that I have to do to getJlink to recognize that region as SDRAM and not flash?
    After these errors occur, I see the following errors reported in my console:

    File.Load ("./Debug/sel2245-42.elf");
    Debug.ReadIntoInstCache: updated instruction information within 2 code ranges (0x00100000-0x00113468)
    Timeout while restoring target, core does not stop. (PC = 0xFFFF0148, CPSR = 0xA000007F, LR = 0xFFFF01C9)!
    Timeout while preparing target, core does not stop. (PC = 0xFFFF01B8, CPSR = 0x4000007F, LR = 0xFFFF01C9)!
    Failed to initialize RAMCodeTimeout while restoring target, core does not stop. (PC = 0xFFFF0160, CPSR = 0x6000007F, LR = 0xFFFF01C9)!Timeout while preparing target, core does not stop. (PC = 0xFFFF01BC, CPSR = 0x4000007F, LR = 0xFFFF01C9)!
    Failed to initialize RAMCode

    Download failed: J-Link reports an unspecified download error


    Thank you in advance for any help you can provide!

    -Joe

    P.S. I have attached my .jdebug file for reference.
    Images
    • ozone_error_1.png

      9.25 kB, 523×193, viewed 185 times
    • ozone_error_2.png

      6.8 kB, 430×245, viewed 238 times
    Files
  • I made a discovery regarding this issue: The reason the jlink tools are treating the SDRAM area like flash is the fact that in the JLinkDevices.xml file in C:\Program Files (x86)\SEGGER\Jlink, the following profile is setup for the Cyclone V:

    <Device>
    <ChipInfo Vendor="Altera" Name="Cyclone V" Core="JLINK_CORE_CORTEX_A9" WorkRAMAddr="0xFFFF0000" WorkRAMSize="0x00010000" />
    <FlashBankInfo Name="QSPI Flash" BaseAddr="0x00000000" MaxSize="0x02000000" Loader="Devices/Altera/Cyclone_V/Altera_Cyclone_V_QSPI.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    </Device>

    This causes the jlink to think that 0x00000000 through 0x02000000 is all flash memory, which is not the case in my application. I changed this to be just:

    <Device>
    <ChipInfo Vendor="Altera" Name="Cyclone V" Core="JLINK_CORE_CORTEX_A9"/>
    </Device>


    This essentially tells the jlink that there is no flash region on the SoC… which is true in my case. Not sure this is the right fix but it causes my device to be programmable as simply RAM and not Flash.

    The post was edited 1 time, last by hewillincrease: typos ().

  • Hello,

    Thank you for your inquiry.
    That would indeed be the correct fix.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.