Using DFUSec to run program from IRAM

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

Using DFUSec to run program from IRAM

345 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by twiceferrel on Wed Dec 05 13:47:43 MST 2012
I'm using an LPC-4350-DB1 board from diolan.com to test things.

Using the DFUSec tool from this website, I can load and run a program (just blinking an LED to test) using the "HDR/RAW modes" tab. However, when I use the "Program mode" and give it the 'dfusecp_emiram.bin.hdr' programming algorithm included as an example with the DFUSec tool, and my binary (with a header) added as the file to run, the file seems to be downloaded properly, but doesn't run on my device.

I'd give specifics about the parameters I'm using with the tool, but I've tried tons of different combinations and nothing seems to work. The DFUSec Tool says (for example):

**Attempting to process programming step 0**
Download Complete.
Waiting up to 4s for device detection after initial download
Device detected: Starting programming API
Inserting checksum at 32-bit offset 7 in image
Target program buffer size = 2048 bytes
Size of image to send = 4964 bytes

And then Host St and BoardSt both say "Programming operation successful".

I expect my program should run after being loaded with the IRAM programming algorithm. Am I missing something?

Thank you very much!

-Beryl
Labels (1)
0 Kudos
2 Replies

311 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by twiceferrel on Wed Dec 05 21:47:40 MST 2012
Thanks Wellsk!

My ultimate goal is to program an external SPIFI flash device and I wanted to confirm that I understood the DFU process. It wasn't clear to me from what was written about the IRAM programming algorithm (http://www.lpcware.com/content/project/dfu-download-programming-utility-and-security-lpcdfusec-tool/...) that what had been loaded wasn't then executed.

Thank you for the quick and elucidating response!

-Beryl
0 Kudos

311 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Wed Dec 05 14:13:00 MST 2012
>dfusecp_emiram.bin.hdr
This specific programming algorithm is only a reference algorithm using IRAM. The v1.05 release of the DFU Utility (formerly DFUSec) won't start a program once you've downloaded and/or programmed it, except with the RAW/HDR mode.
RAW/HDR mode actually transfers the image to IRAM at address 0x10000000 and then executes it starting at address 0x10000000.
PROG mode only programs an image into memory (IRAM, SPI FLASH, intrnal FLASH, or ?), but doesn't execute it. Once the image is programmed, the board is reset to start the programmed image. This won't work with IRAM through. Basically, the IRAM algorithm is a 'write only' implementation of a programming algorithm that gets erased on each power cycle or reset, so it's not too useful.

A v1.10 release of the DFU Utility is being wrapped up now that will allow developers to download one or more images into multiple IRAM locations (via multiple steps) and then execute those images without resetting the board. It sounds like this is the capability you need. I would expect this to be released soon. (You can subscribe to the http://www.lpcware.com/content/project/dfu-download-programming-utility-and-security-lpcdfusec-tool page to get an email once this has been updated.)
0 Kudos