In LPC1777, Is it possible to download entire code in external Flash memory and boot from that.

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

In LPC1777, Is it possible to download entire code in external Flash memory and boot from that.

1,111 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anandana on Mon Jun 02 06:46:05 MST 2014
Hi,
         I am using LPC1777 controller, it has inbuilt memory of 512KB.  but my code size is more than 512kb. So i am planning to use external 2MB sst flash to download the code. In keil setting i have configured  for offchip start address and size. But the code is not running. Is there any other setting i need to make or In LPC1777, is it possible to download the code in external memory and boot from that. I fit is possible please guide me.

Regards
Anand
Labels (1)
0 Kudos
10 Replies

852 Views
priyankb
Contributor III

Hi,

I have the same problem. I am using custom board with LPC4088. I am using custom USB bootloader present in internal flash & putting my user application on external flash(EMC). My only problem is that i am not able to jump from bootloader(internal Flash) to user code(External Flash). Has anyone done this, please help.

0 Kudos

852 Views
soledad
NXP Employee
NXP Employee

Hi,

Please check the following link:

Execute code from SPIFI 


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

852 Views
priyankb
Contributor III

Hi,

I read that thread, but didn't help me. For what I am doing do you think I need a flash driver? When I debug the bootloader code I can see the PC going to locations in external flash bss_init() after which it goes into hard fault. If comment bss_init() it immediately return back to bootloader code.

I think I am missing something in the startup code of user application. Do you have any startup code(ResetISR()) of user application with similar situation as mine.

Regards

Priyank.

0 Kudos

852 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Sat Jun 14 10:37:27 MST 2014
Unfortunately I don't have any experience in making bootloaders.
However, I've written a fairly good amount of Cortex-M assembly, and I've also written my own startup-code, which I use for most of my projects.

A bootloader is just a normal firmware 'program' that runs on the microcontroller.
It's the first program that is executed.
-So instead of executing your normal code, you write such a bootloader.
The LPC still have its own ROM bootloader, which is executed before your bootloader.
Your bootloader should set up the external memories (flash and sdram), then either execute the code in the external flash memory directly (if possible), or copy that code from the external flash memory to your SDRAM, and then jump to that code.

-But I think it would be a good idea if NXP can confirm that it can be done the way I've mentioned.
0 Kudos

852 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anandana on Fri Jun 13 21:15:11 MST 2014
Hi Pacman

          If it is possible by modifying boot loader, Please help us how we can do that.   We are not that experienced in assembly programming. Please guide us, we spent lot of time to modify the code for LPC 1777 and to download to external flash. If possible please share any boot loader sample program.

          NXP Team : We need your support for modifying Boot loader. Please help us.

   
        


0 Kudos

852 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Fri Jun 13 13:17:36 MST 2014
Not having tried the LPC1777, I would say that in theory, I believe it's possible to write your own bootloader, which copies your code from the external flash to external memory and then jumps to it.

NXP - wouldn't this be possible ?

-And perhaps it would be possible to directly jump to your code in the external memory, from your bootloader.
0 Kudos

852 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by xianghuiwang on Fri Jun 13 11:05:22 MST 2014
Hi, anandana,

Sorry that our current lpc177x_8x and lpc407x_8x devices do not support booting from external flash. We will correct the user manual to remove the boot choice notation. You could use the lpc18xx/43xx parts to boot from external memory.

Thanks much,



0 Kudos

852 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anandana on Tue Jun 10 05:57:58 MST 2014
Hi,

        Today successfully we are able to download the code to external flash. But it is always booting from onchip flash even though we selected external flash address as a start up. So please guide us what settings we need to make to boot from external flash.

             FYI: D14 and D15 pins are pulled high to boot from 16 bit external Flash as per LPC1777 user manual.

Regards
Anandan A
0 Kudos

852 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anandana on Mon Jun 09 21:13:48 MST 2014
Hi Xiangh,

               Thanks for your reply and I am waiting for your response. We almost modified the code for LPC1777. But we couldnt download to flash. We have added SST39vf1601 2MB Flash programming algorithm to keil and we made the settings according to that. we are using chip select 1 for external flash. We modified Prog_Ext_Init.ini file also(refer the images). Please help us how we can proceed?

Regards
Anandan A
              
0 Kudos

852 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by xianghuiwang on Fri Jun 06 18:07:05 MST 2014
Hi, Anand,

We are in the process to validate this capability. The user manual also need to be updated to clarify this capability.

Thanks for your patience.

regards,
0 Kudos