lpcware

NXP 3250 Serial Boot Loader Program for SPI M25PxxFlash

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by trichloramine on Tue Nov 04 12:39:24 MST 2014
I have written a 2 stage Boot Loader that uses the Serial Port on UART 5. It was written for Serial (SPI) Flash - specifically the M25Pxx Flash and work-alikes.

The PC program is written in Visual Studio, C#.

All three images of the boot loader was created with the IAR compiler in C++. After loading the target binary, no part of the loader remains in memory.

There are three pieces to the loader.

Loader.bin
LoadLow.bin
and
LoadHigh.bin

Loader.bin is sent by the PC program after negotiating the handshake with the ARM internal UART 5 serial boot loader.

It then allows the upload of LoadLow, and LoadHigh from the PC, and burns the images into the first sector of the Flash.

The program proper can then be uploaded via the same PC program and burned into the second sector of the flash.

Once the binary image of the program has been burned into flash, the processor may be reset.

The LoadLow portion of the loader is then read by NXP's internal ROM loader in the area BELOW the 0xE000 boundary of NXP's internal ROM loader's data area.

The Load Low portion then loads the special LoadHigh image over itself consisting only of an interrupt table, and  a tiny program at the upper limit of RAM.

the last thing LoadLow does is to transfer control to the LoadHigh image, which then loads your application over itself from Sector 1 into RAM, and transfers execution to it.

There is no residual memory used, and control is in the Application.

If you are interested in this program, please contact me.

Outcomes