EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

executing program from external SRAM of EAs MCB2478

Started by Oliver Krause January 5, 2016
Hi guys,
I have a problem and allthought I desperately tried to solve it there is
no resolution in sight. So I really hope you can help me.

My setup:
- embedded artists MCB2478
- Keil ULINK 2 JTAG adaptor
- workstation with uVision 5

I have to program my prog onto external memory to preserve the flash ROM
of the microcontroller. I found a Q&A about this topic and an example for
a controller that is pretty close to what I use, but whatever I have tried
it doesn't work at all.

The Q&A "ULINK: DEBUG PROGRAMS IN OFF-CHIP RAM" can be found on
http://www.keil.com/support/docs/2915.htm. I adjust all the settings under
"Project - Options for Target" as given and created an initialization file
according to what the article says. The result is "Error: Flash Download
failed - ARM7TDMI" as soon as I hit the download button.

Also there is an example for the MCB2470 which should start the Blinky
program out of the external SDRAM. It can be found under
Keil_v5ARMBoardsKeilMCB2470Blinky. I compared the "Project - Options for
Target" settings with what is statet in the Q&A Answer from above and its
nearly the same. I also toke a closer look on the initialization file and
compared it with the initialization of the SDRAM of another program I've
already created and which works fine on my MCB2478. Both are literally the
same (except one is in c and the other written with uVision debug
functions of course). But I get the same result as above: it compiles
fine, but if I try to download I receive "Error: Flash Download failed -
ARM7TDMI".

I'm also a little bit confused by the download button hover text which
says "Download code to flash memory" and by the fact that there are only
programming algorithms for on-chip flash. Seems like it's not intended to
program something onto external RAM with uVision.
---------------------------------------
Posted through http://www.EmbeddedRelated.com
On Tue, 05 Jan 2016 07:21:31 -0600, Oliver Krause wrote:

> The result is "Error: Flash Download failed - ARM7TDMI" as soon > as I hit the download button.
Did you try this with ULINK 2 options set to "SWD" (not "JTAG")? Cheers!
>Did you try this with ULINK 2 options set to "SWD" (not "JTAG")?
Nope. There is no way to do so because Serial Wire is only available with Cortex-M but not with my ARM7TDMI. Cheers Oli --------------------------------------- Posted through http://www.EmbeddedRelated.com
Op Tue, 05 Jan 2016 14:21:31 +0100 schreef Oliver Krause  
<110318@embeddedrelated>:
> I have to program my prog onto external memory to preserve the flash ROM > of the microcontroller.
Why? -- (Remove the obvious prefix to reply privately.) Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
>Op Tue, 05 Jan 2016 14:21:31 +0100 schreef Oliver Krause ><110318@embeddedrelated>: >> I have to program my prog onto external memory to preserve the flash
ROM
>> of the microcontroller. > >Why?
Because of the limited durability of the flash and the limitation of the Debug Break Point count. Cheers Oli --------------------------------------- Posted through http://www.EmbeddedRelated.com
Op Wed, 06 Jan 2016 14:36:14 +0100 schreef Oliver Krause  
<110318@embeddedrelated>:
>> Op Tue, 05 Jan 2016 14:21:31 +0100 schreef Oliver Krause >> <110318@embeddedrelated>: >>> I have to program my prog onto external memory to preserve the flash >>> ROM of the microcontroller. >> >> Why? > > Because of the limited durability of the flash
Normally it's not worth it to spend time on flash conservation. Good flash-programmers have the option to not program the same data twice.
> and the limitation of the > Debug Break Point count.
Good debuggers can do software breakpoints in flash. -- (Remove the obvious prefix to reply privately.) Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
>Op Wed, 06 Jan 2016 14:36:14 +0100 schreef Oliver Krause ><110318@embeddedrelated>: >>> Op Tue, 05 Jan 2016 14:21:31 +0100 schreef Oliver Krause >>> <110318@embeddedrelated>: >>>> I have to program my prog onto external memory to preserve the flash >>>> ROM of the microcontroller. >>> >>> Why? >> >> Because of the limited durability of the flash > >Normally it's not worth it to spend time on flash conservation. Good >flash-programmers have the option to not program the same data twice. > >> and the limitation of the >> Debug Break Point count. > >Good debuggers can do software breakpoints in flash. > > > >-- >(Remove the obvious prefix to reply privately.) >Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
Yes, true. But since my current project will become a lab course for students on my university I'm neither expecting good flash-programmers nor good debuggers. ^^ Cheers Oli --------------------------------------- Posted through http://www.EmbeddedRelated.com

The 2024 Embedded Online Conference