Monday, December 11th 2017, 6:06pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Prasad

Beginner

Date of registration: Dec 17th 2009

Posts: 1

1

Thursday, December 17th 2009, 10:04am

[ANSWERED] Using breakpoints in external flash

Hello,

I am using STM32F103ZE controller in my project. Some portion of code is running from external flash. I am using IAR + Jlink environment for development.

I can set the breakpoint for the code which is running from internal flash area but unable to set breakpoints for external flash area. Please let me know how can this be achieved?

Can 'FlashBP' license be used for setting software breakpoints in external flash?

Thanks,
Prasad

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,514

2

Friday, January 8th 2010, 11:08am

Hi Prasad,

setting flash breakpoints in external memory is currently not possible.
Flash programming support/flash breakpoint support for external flash devices
will be implemented in the near future, but unfortunately I can not give you
a specific schedule right know.

Best regards
Alex

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,514

3

Wednesday, May 19th 2010, 12:19pm

Hi Prasad,

For clarification:
We can set breakpoints in external flash memory, but only hardware breakpoints.
This means, that when debugging in external flash on a Cortex-M3 device, you are limited to 6 breakpoints.

Currently the J-Link DLL does not have support for programming external NOR flash
and so also flash breakpoints (providing an unlimited number of breakpoints) in external NOR flash are not supported right now.


Best regards
Alex

Date of registration: Sep 4th 2012

Posts: 5

4

Tuesday, September 4th 2012, 2:24pm

Hello,

have the J-Link DLL now (2012) support for programming external NOR flash?

My problem is the same. But Keil / ARM support explain me that a Cortex M3 doesn't support BP above a 1GB adresses (0x4000 0000). Look at
https://silver.arm.com/download/download.tm?pv=1111932

ARMv7-M Architecture Reference Manual -> Debug Architecture -> Flash Patch and Breakpoint
unit -> FPB unit operation

The problem: My controler a NXP LPC 1778 are all addresses for extern memory starts at 0x8000 0000 for chip select 0 end end at 0x9C00 0000 for chip select 3. So there are no Hardware BP available. So I hope for Software BP by J-Link!
Thank you

John

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,514

5

Wednesday, September 5th 2012, 8:35am

Hi John,

The current DLL (V4.52c, http://www.segger.com/jlink-software.html) supports direct download into external CFI-NOR flash memory as well as software breakpoints in CFI-NOR flash.
What needs to be done to use this feature is explained in the J-Link User Guide (UM08001), chapter "Flash breakpoints" section "7.4 Setup & compatibility with various debuggers".
http://www.segger.com/cms/admin/uploads/…01_JLinkARM.pdf

The flash breakpoints feature can be used free of charge for evaluation purposes.

Please note that when using this feature you need to make sure that the debugger has already performed the init sequence for the external memory interface of the MCU/CPU,
since this is debugger's / user's responsibility. The DLL expects the external memory interface to be already initialized when perfoming the CFI detection.


Best regards
Alex

Date of registration: Sep 4th 2012

Posts: 5

6

Wednesday, September 5th 2012, 9:34am

Hi Alex,

I have a J-Trace for ARM Cortex-M3 debugger with software BPs (V4.52c and Keil uVision 4.53). The init-sequence work, so the code that I want is on external NOR-Flash at address 0x8000 0000 and it executes. Single step over this code is no problem. BPs set in the internal flash area is no problem and unlimited. Only if I want set a BP on a external Flash address following message occur:


This is the only BP in my Project (I checked it with STRG-B and in the J-Link Control panel -> Breakpoints).
So what is wrong?

Date of registration: Sep 4th 2012

Posts: 5

7

Wednesday, September 5th 2012, 4:29pm

Hello,

what I forget: When I press Ok or cancel (it doesn't matter) it appears a second window:

I hope you can do something with this information?
Best regards

John

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,514

8

Wednesday, September 5th 2012, 4:35pm

Hi John,

This error is not generated by J-Link.
It comes directly from uVision (or more precise from the uVision <-> J-Link interface DLL created by Keil).
We will have a look at it.


Best regards
Alex

Date of registration: Sep 4th 2012

Posts: 5

9

Thursday, September 6th 2012, 10:51am

Hi Alex,

I think there is a logical problem:
For download the code to the ext. memory j-link need a Programming Algorithm. This Algorithm need RAM of my controller. This is ok because in the download process the RAM is not used of my code and I can set the address and size in the settings of uVision.

But if I want later set or clear a softwarebreakpoints in my ext. memory I think j-link need this Algorithm still. But now my program used RAM. How does j-link know which storage area in RAM is unused? Use j-link still the settings of the start address and size of "Flash Donwload" settings of uVision? ?(
Best Regards

John

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,514

10

Thursday, September 6th 2012, 12:39pm

Hi John,

I think some clarification is needed here:
J-Link does not use and does not care about what is configured as flash algorithm in uVision.
The whole "software breakpoints in flash" is handled inside the J-Link DLL and debugger independent.

Yes, some RAM is used to update the software breakpoints in flash memory since the flash programming algorithm uses some.
BUT: J-Link will automatically handle this and save the RAM contents before programming is performed and restores them as soon as it is done with flash programming.


Best regards
Alex

Date of registration: Sep 4th 2012

Posts: 5

11

Thursday, September 6th 2012, 1:49pm

Hi Alex,

thanks for the explanation. So the RAM "problem" is handeld very nice and seems no problem.
But with the flash algorithm I understand something wrong or my settings are not correct.
In the follwing setting windows I have choose the algorithm for my NOR-Flash:

If I don't do this or I choose a wrong one the flash download will be fail.
So do you mean another flash programming algorithm or I miss some settings?
Thanks for support

John