Re: [Openocd-development] I'd like to change the workspace from 0x2000000 to 0x6000000 of stm32.cfg

2010-04-20 Thread Andreas Fritiofson
On Tue, Apr 20, 2010 at 2:22 AM, JY Koh ko...@uni-inc.co.kr wrote:
 Hi All,



 I have a STM32F103ZE custom board.

 I have been using OpenOCD with Amontec JTAGkey2 for debugging.

 It works fine when I use internal SRAM (64K) as workspace.

 In order to run a little big program I add external SRAM (1M bytes) on FSMC
 (CS1)

 So I’d like to use this external SRAM as workspace.

 What should I change in target configuration ?

 I change workspace from 0x200 to 0x600. It doesn’t work.

 Please let me know if there are something to change.



 Regards,

 JY Koh


OpenOCD won't set up the FSMC for you so you have to do that
somewhere, preferrably in the reset init handler. But I'm not
convinced that there are any benefits over having it in internal SRAM.
What is the problem?

/Andreas
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] I'd like to change the workspace from 0x2000000 to 0x6000000 of stm32.cfg

2010-04-20 Thread JY Koh
Hi Andreas

Thanks a lot.

My board has Ethernet and LCD interface so that my program is too big to be
accommodated into internal SRAM. 
For this reason, I added external SRAM (1M Bytes) and I'd like to run my
program here.

JY Koh


-Original Message-
From: andr...@fritiofson.net [mailto:andr...@fritiofson.net] On Behalf Of
Andreas Fritiofson
Sent: Tuesday, April 20, 2010 4:28 PM
To: ko...@uni-inc.co.kr
Cc: openocd-development@lists.berlios.de
Subject: Re: [Openocd-development] I'd like to change the workspace from
0x200 to 0x600 of stm32.cfg

On Tue, Apr 20, 2010 at 2:22 AM, JY Koh ko...@uni-inc.co.kr wrote:
 Hi All,



 I have a STM32F103ZE custom board.

 I have been using OpenOCD with Amontec JTAGkey2 for debugging.

 It works fine when I use internal SRAM (64K) as workspace.

 In order to run a little big program I add external SRAM (1M bytes) on
FSMC
 (CS1)

 So I'd like to use this external SRAM as workspace.

 What should I change in target configuration ?

 I change workspace from 0x200 to 0x600. It doesn't work.

 Please let me know if there are something to change.



 Regards,

 JY Koh


OpenOCD won't set up the FSMC for you so you have to do that
somewhere, preferrably in the reset init handler. But I'm not
convinced that there are any benefits over having it in internal SRAM.
What is the problem?

/Andreas






___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] I'd like to change the workspace from 0x2000000 to 0x6000000 of stm32.cfg

2010-04-20 Thread Andreas Fritiofson
On Tue, Apr 20, 2010 at 1:10 PM, JY Koh ko...@uni-inc.co.kr wrote:
 Hi Andreas

 Thanks a lot.

 My board has Ethernet and LCD interface so that my program is too big to be
 accommodated into internal SRAM.
 For this reason, I added external SRAM (1M Bytes) and I'd like to run my
 program here.


The working area (which I suspect you are talking about when you say
workspace) has nothing to do with where your program runs from. It is
an area for OpenOCD's internal use, for example for downloading flash
algorithms for execution on the target and as buffer space for data
during flashing. Best leave it at its default location.

If you want to load and debug your program running from external SRAM,
simply tell the linker to place your code there. You still have to set
up the FSMC in the reset init handler for GDB to be able to load the
executable into external memory.

Another solution is to run (and debug) your program from internal
flash. The hardware breakpoints are often sufficient, and the STM32 is
notoriously slow at executing code from external memory. Besides, you
still have to make the code fit in flash if you want it to run without
the debugger.

/Andreas
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] I'd like to change the workspace from 0x2000000 to 0x6000000 of stm32.cfg

2010-04-20 Thread JY Koh
Hi Andreas,

I got what you mean.
I'll try and update you.

Thanks.

-Original Message-
From: andr...@fritiofson.net [mailto:andr...@fritiofson.net] On Behalf Of
Andreas Fritiofson
Sent: Wednesday, April 21, 2010 3:43 AM
To: ko...@uni-inc.co.kr
Cc: openocd-development@lists.berlios.de
Subject: Re: [Openocd-development] I'd like to change the workspace from
0x200 to 0x600 of stm32.cfg

On Tue, Apr 20, 2010 at 1:10 PM, JY Koh ko...@uni-inc.co.kr wrote:
 Hi Andreas

 Thanks a lot.

 My board has Ethernet and LCD interface so that my program is too big to
be
 accommodated into internal SRAM.
 For this reason, I added external SRAM (1M Bytes) and I'd like to run my
 program here.


The working area (which I suspect you are talking about when you say
workspace) has nothing to do with where your program runs from. It is
an area for OpenOCD's internal use, for example for downloading flash
algorithms for execution on the target and as buffer space for data
during flashing. Best leave it at its default location.

If you want to load and debug your program running from external SRAM,
simply tell the linker to place your code there. You still have to set
up the FSMC in the reset init handler for GDB to be able to load the
executable into external memory.

Another solution is to run (and debug) your program from internal
flash. The hardware breakpoints are often sufficient, and the STM32 is
notoriously slow at executing code from external memory. Besides, you
still have to make the code fit in flash if you want it to run without
the debugger.

/Andreas






___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development