Programming the LPC1857 using another microcontroller via SWD

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programming the LPC1857 using another microcontroller via SWD

6,674 Views
fabiano1
Contributor III

I need to program the LPC1857 via SWD using another microcontroller. I cannot use UART for this, it has to be via SWD.

I have no doubts about the SWD protocol, so much so that I can already reset JTAG-TO-SWD, read the LPC1857 IDCode and perform other transactions through the SWD.

Using the NXP LPC-link, I programed LPC1857. During programming, I perform the communication sniffer. For this program I use a known .hex.

Using the data obtained in the sniffer, I copied and saved everything that the NXP LPC-Link sent to the LPC1857 until the start of sending the .hex.

Using the documents: UM10430 (LPC1857 reference manual), Cortex: tm: -M3 - Technical Reference Manual and CoreSight: tm: Components - Technical Reference Manual (where you have the information about the SWD), I tried to understand the values obtained in the sniffer, but I couldn't find the following addresses in any of these documents:

- 0xE000ED88
- 0xE00FFFBC
- 0xE00FF000
- 0xE000EFBC
- 0xE0001FBC
- 0xE0002FBC
- 0xE0000FBC
- 0xE0040FBC
- 0xE0041FBC

I know that the values listed above are addresses, as they are written in the TAR register of the SWD.

Some of these values can be found in the documentation for Cotex-M4, Cotex-M7 and Cortex-M33, but as the LPC1857 is a Cortex-M3, I imagine that I cannot use this information found in these documents.

I need a document that explains how to record the LPC1857 via SWD, or at least a documentation that has an explanation of the addresses listed above.

Thank you.

Tags (2)
25 Replies

458 Views
fabiano1
Contributor III

Hello John Zhao, thank you very much for the answer.

I saw that within the Flash_Algo project, there are two projects: flash_algo.py and generete_blob.py. I didn't understand how to use this software to generate the blob.

What values should I assign to the parameters of flash_algo.py?
The arguments are: description, input and template.

What values should I assign to the parameters of generate_blob.py?
The arguments are: description, elf_path and --blob_start.

Thank you very much for the support and I am waiting for the answer.

0 Kudos

458 Views
johnzhao
Contributor I

really....it is simple...but the author not say the detail

you must use python 2.7   and get the FLM file  for example  STM32F4xx_1024.FLM     

then

>python generate_blobs.py  STM32F4xx_1024.FLM   

all done

458 Views
fabiano1
Contributor III

Hello John Zhao, how are you?

Could you answer my friend Vinicius Cardoso de Castro's question?

I need that answer too, thanks in advance!

0 Kudos

458 Views
viniciuscastro
Contributor I

Hello, John Zhao.

How did you get this STM32F4xx_1024.FLM ?
I am asking because we need the LPC1857 FLM.

0 Kudos

458 Views
converse
Senior Contributor V

Sorry, I do not have any time to help you solve your problems - I have enough of my own! However, all of the information, and source, needed for you to do it yourself, is provided in the repository.

0 Kudos