code loading through USB

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

code loading through USB

834 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Mon Mar 24 23:16:39 MST 2014
Hi all,

I am looking for an example that illustates loading of code through the USB  b emulating a virtual COM on  lpc435x platform.

Can anyone point to an example that does this on lpc platforms?

Thanks in advance
pra18
Labels (1)
0 Kudos
6 Replies

787 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Sat Apr 12 02:06:11 MST 2014
I was trying to understand how a code loader can be realized on lpc435x with the standard usblib api. Probably a Usb IAP that may use USB CDC class as a virtual COM and might use Ymodem/ Xmodem transfers.

The lpc USBLIB differs a lot from other USB libraries like that from the ST Micro which I used earlier. To figure out right Api from these libs is slightly complex.

I feel It is high time that we have a IAP using USB CDC kind of app.note example for lpc435x using the standard USBLIB.
0 Kudos

787 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drs on Fri Apr 11 16:28:01 MST 2014
Those examples are used by those tool chains to burn a program to internal flash. They are run when you tell the IDE to download your program to the device. The IDE sends this driver a block of data and an address and the driver uses IAP commands to write that block of data to that address.

Perhaps you can elaborate more on how you want to use IAP and a USB virtual serial class together. Do you want to use a terminal program on the PC to send an image to the board over USB and burn that image to internal flash?
0 Kudos

787 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Tue Apr 08 00:27:39 MST 2014
Thank you for the reply.

I am trying to find an IAP example that uses USB virtual specifically and how it  can be used for send receive for IAP read/writes . The example I think here uses the UART.

Also would like to know which of the API in the usblib can be used to map /do the reads/writes in this case.

Regards,
0 Kudos

787 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drs on Fri Apr 04 10:16:14 MST 2014
A good source for an IAP example is in the flash driver source code in your compiler's installation.

If you are using IAR then there is an example in the file arm\src\flashloader\NXP\FlashNXPLPC18xx\FlashNXPLPC18xx.c. This code will work on the LPC43xx.

If you are using Keil then the example is in \Keil\ARM\Flash\LPC18xx43xx_IAP\

Of course you will not be able to run out of the same flash bank that you want to update, so you will need to run out of some other memory, like internal RAM or the other internal flash bank if your part has two of these.
0 Kudos

787 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Thu Mar 27 01:15:39 MST 2014
Hello ,

Thanks for the response. I have the the VCOM  project and it is running on my board. I would like to adapt this project for code loading functionality. As you said, it is the right starting point but I would like to know how it can be done  and what are the APIs that can be used.

Any example for IAP or similar  on a lpc43xx that is written in order to understand how we use the usblib /rom related library to achieve such a functionality ?


Thanks in advance ,
pra18

0 Kudos

787 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drs on Wed Mar 26 16:39:44 MST 2014
There is a CDC example in the latest version of LPCOpen Platform for this part (http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc43xx-packages) called cdc_vcom. This would be a good starting point for this.
0 Kudos