EmbeddedRelated.com
Forums
Memfault Beyond the Launch

LPC1768 Cortex-M3 Flash Patch

Started by citykid_x December 9, 2009
I have been working with an LPC1768 within Keil uVision 4 and have been trying to figure out how to use the Cortex-M3 "Flash Patch" feature to map a contstant value to RAM. I can't seem to find any information on how to do that.

That is an incredibly useful debugging feature!

There are all sorts of press releases describing the Cortex FPB unit and its features but how do you access the flash patch feature from within Keil uVision?

Has anyone had any luck with this feature?

An Engineer's Guide to the LPC2100 Series

Hello citykid_x,

Wednesday, December 9, 2009, 9:32:40 PM, you wrote:

c> I have been working with an LPC1768 within Keil uVision 4 and have
c> been trying to figure out how to use the Cortex-M3 "Flash Patch"
c> feature to map a contstant value to RAM. I can't seem to find any information on how to do that.
c> That is an incredibly useful debugging feature!
c> There are all sorts of press releases describing the Cortex FPB
c> unit and its features but how do you access the flash patch feature from within Keil uVision?
c> Has anyone had any luck with this feature?

It is described in detail in the ARMv7-M Architecture Reference
Manual[1] (DDI 0403), section C1.11, and (tersely) in the Cortex-M3 TRM[2] (DDI0337)

[1] https://silver.arm.com/browse/AR580 (needs free registration)
[2] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337g/BABJEBBC.html

--
WBR,
Igor mailto:s...@mail.ru

Hi Igor,

Have you used this feature?

I am aware of the "programmers model", I was wondering if there was some convenient way to take advantage of this feature in the uVision environment.

Basically to tell the debugger that I want a particular constant (operand) mapped to ram.

uVision should be able to do the FPB setup etc... and just let the user specify what instruction or operand they want temporarily mapped to ram for development purposes.

Maybe its not implemented???

--- In l..., Igor Skochinsky wrote:
>
> Hello citykid_x,
>
> Wednesday, December 9, 2009, 9:32:40 PM, you wrote:
>
> c> I have been working with an LPC1768 within Keil uVision 4 and have
> c> been trying to figure out how to use the Cortex-M3 "Flash Patch"
> c> feature to map a contstant value to RAM. I can't seem to find any information on how to do that.
> c> That is an incredibly useful debugging feature!
> c> There are all sorts of press releases describing the Cortex FPB
> c> unit and its features but how do you access the flash patch feature from within Keil uVision?
> c> Has anyone had any luck with this feature?
>
> It is described in detail in the ARMv7-M Architecture Reference
> Manual[1] (DDI 0403), section C1.11, and (tersely) in the Cortex-M3 TRM[2] (DDI0337)
>
> [1] https://silver.arm.com/browse/AR580 (needs free registration)
> [2] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337g/BABJEBBC.html
>
> --
> WBR,
> Igor mailto:skochinsky@...
>

Hello citykid_x,

Thursday, December 10, 2009, 12:14:51 AM, you wrote:

c> Hi Igor,
c> Have you used this feature?
c> I am aware of the "programmers model", I was wondering if there
c> was some convenient way to take advantage of this feature in the uVision environment.
c> Basically to tell the debugger that I want a particular constant (operand) mapped to ram.
c> uVision should be able to do the FPB setup etc... and just let the
c> user specify what instruction or operand they want temporarily
c> mapped to ram for development purposes.
c> Maybe its not implemented???

I'm only familiar with it as a debugging feature in OpenOCD. I haven't
tried using it from an application.
I didn't find anything about it in uVision IDE menus. I think you should be
able to do it by using memory view and editing the register values
manually. Not very convenient but doable. Or you can try writing a
debug macro to use from debug command line.

--
WBR,
Igor mailto:s...@mail.ru

Hi:

From the LPC1768 User Manual:

"A Flash Patch and Breakpoint (FPB) is included. The FPB can generate hardware breakpoints and remap specific addresses in code space to SRAM as a temporary method of altering non-volatile code. The FPB include 2 literal comparators and 6 instruction comparators."

Note that this is used to create an equivalent to a "software breakpoint".

Why don't you just use a regular RAM variable, that you can update from the uVision Debugger, instead or a remapped constant to RAM? uVision let you put a breakpoint and then change the value of the variable, and continue the execution with the new value.

Regards,

Alex

--- In l..., "citykid_x" wrote:
>
> Hi Igor,
>
> Have you used this feature?
>
> I am aware of the "programmers model", I was wondering if there was some convenient way to take advantage of this feature in the uVision environment.
>
> Basically to tell the debugger that I want a particular constant (operand) mapped to ram.
>
> uVision should be able to do the FPB setup etc... and just let the user specify what instruction or operand they want temporarily mapped to ram for development purposes.
>
> Maybe its not implemented???
>
> --- In l..., Igor Skochinsky wrote:
> >
> > Hello citykid_x,
> >
> > Wednesday, December 9, 2009, 9:32:40 PM, you wrote:
> >
> > c> I have been working with an LPC1768 within Keil uVision 4 and have
> > c> been trying to figure out how to use the Cortex-M3 "Flash Patch"
> > c> feature to map a contstant value to RAM. I can't seem to find any information on how to do that.
> > c> That is an incredibly useful debugging feature!
> > c> There are all sorts of press releases describing the Cortex FPB
> > c> unit and its features but how do you access the flash patch feature from within Keil uVision?
> > c> Has anyone had any luck with this feature?
> >
> > It is described in detail in the ARMv7-M Architecture Reference
> > Manual[1] (DDI 0403), section C1.11, and (tersely) in the Cortex-M3 TRM[2] (DDI0337)
> >
> > [1] https://silver.arm.com/browse/AR580 (needs free registration)
> > [2] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337g/BABJEBBC.html
> >
> > --
> > WBR,
> > Igor mailto:skochinsky@
>


Memfault Beyond the Launch