This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

No JLink algorithm for cortex sram

We have surprisingly problem with projects designated for load to RAM.
It includes our projects as well as examples come with Atmel cortex-m3 software package.
Flash project are loaded correctly as I’ve chose proper loader in Option->Debug (J-LINK) ->Settings -> Flash Download.
But what to do with SRAM? How to define loader for SRAM range…and do we have to do something like that?

Keil build output:

linking...
Program Size: Code=1596 RO-data=224 RW-data=12 ZI-data=2104
FromELF: creating hex file...
".\sram\sram.axf" - 0 Error(s), 2 Warning(s).
Load "C:\\mares\\Workspace\\g8_loader\\sram\\sram.axf"
* JLink Info: Device "UNSPECIFIED" selected (0 KB flash, 0 KB RAM).
Set JLink Project File to "C:\mares\Workspace\g8_loader\JLinkSettings.ini"
* JLink Info: Device "UNSPECIFIED" selected (0 KB flash, 0 KB RAM).

JLink info:
------------
DLL: V4.76e, compiled Sep 20 2013 16:06:28
Firmware: J-Link ARM V8 compiled Nov 25 2013 19:20:08
Hardware: V8.00
S/N : 270676280
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFULL

* JLink Info: TotalIRLen = 4, IRPrint = 0x01
* JLink Info: Found Cortex-M3 r2p0, Little endian.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
* JLink Info: TPIU fitted.
ROMTableAddr = 0xE00FF003

Target info:
------------
Device: ATSAM3S1A
VTarget = 3.222V
State of Pins:
TCK: 1, TDI: 0, TDO: 0, TMS: 0, TRES: 1, TRST: 1
Hardware-Breakpoints: 6
Software-Breakpoints: 8192
Watchpoints: 4
JTAG speed: 50 kHz

No Algorithm found for: 20000000H - 20000727H
Erase skipped!
Error: Flash Download failed - "Cortex-M3"

Parents Reply Children
  • The programming algorithms are normally a bit of program code copied into RAM, that takes a pointer to downloaded data in RAM and either directly reprogram a flash block or call some IAP routine supplied by the chip manufacturer.

    This is obviously not needed when the end goal isn't to move code into flash but to run the application directly from RAM. The JTAG debugger can move the data directly to RAM without frist copying any programming code into RAM - quite obviously :p

  • Thank you for hint but initialization script seems to be ok.
    In debug setting we use ".\resources\mdk\sam3s-ek-sram.ini" containing:

    //---------------------------
    _WDWORD(0x400e1400, 0xA5000004); // peripheral reset RSTC_CR

    LOAD sram\\sram.axf INCREMENTAL
    SP = *((unsigned int *)0x20000000);
    PC = *((unsigned int *)0x20000004);
    //----------------------------

    So why "No Algorithm found for: 20000000H - 20000727H" message while SRAM loader should be native for debuger. Can it be jLink (or jLink driver) problem?

    Thank you for any help.

  • Your probably still have the "Update Target before Debugging" checked in the Options->Utilities pane configuring the flash commands. Needs to be uncheck.

  • Nice shot. Thank you, it was exactly the reason.
    Unchecked it debug sram project as i expected.