cancel
Showing results for 
Search instead for 
Did you mean: 

keil uvision5 - how to run code from internal sram

andjelko
Associate II
Posted on February 26, 2015 at 11:26

hello,

first sorry for my bad english.

Currently i am working on project that require a lot of debugging.I am using keil uvision5 and stm32f4 and would like to run code from internal sram instead of flash.

How to setup target options to do this?I have dedicate first 64kb ram(starting at 0x20000000) to irom1, shrinked ram that much...

I have found example on keil web site (apnt230) that has 2 targets(one for ram and one for flash) but cannot find where is the catch.

error:No Algorithm found for: 20000000H - 20000343H

scatter file:

R_IROM1 0x20000000 0x00010000  {    ; load region size_region

  ER_IROM1 0x20000000 0x00010000  {  ; load address = execution address

   *.o (RESET, +First)

   *(InRoot$$Sections)

   .ANY (+RO)

  }

  RW_IRAM1 0x20010000 0x00010000  {  ; RW data

   .ANY (+RW +ZI)

  }

}

greetings from Croatia.

Andjelko.

#stm32f4-discover #keil-uvision5
1 REPLY 1
Posted on February 26, 2015 at 14:28

No Algorithm found for: 20000000H - 20000343H

It's not flash, you must disable the ''download to target'' options, and use a debugger script to load your code to ram. DbgRAM.ini

/*----------------------------------------------------------------------------
Setup() configure PC & SP for RAM Debug
*----------------------------------------------------------------------------*/
FUNC void Setup (void) {
SP = _RDWORD(0x20000000); // Setup Stack Pointer
PC = _RDWORD(0x20000004); // Setup Program Counter
_WDWORD(0xE000ED08, 0x20000000); // Setup Vector Table Offset Register
}
LOAD %L INCREMENTAL // load the application
Setup(); // Setup for Running
g, main

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..