-1

We have an NXP chip (LPC1778) and we need a way to program the firmware via FTDI over USB. We are interested in a way to do this via command line on Linux. We are able to do this via flashmagic on Windows. Any advice is greatly appreciated. Thanks!

For reference we are able to program it over the serial port using this utility:

lpc21isp -wipe -control -verify -debug2 /path/to/hexfile.hex /dev/ttyS0 57600 12000

I am new to embedded programming and FTDI technology.

Utilities suggested by Clifford:

BACKGROUND

Just for those that are interested, we want to issue terminal commands to a board via serial AND program it via that same port. Our DTR and RTS pins are connected to the boards reset button and the RST is connected to the NMI. When connect using the java RXTX library it asserts those lines and we end up resetting the board which is not desired. We were hoping that if we could program using the USB port/FTDI bridge we could avoid resetting the board but it seems we would still need to use those lines to put the NXP chip into programming mode regardless so this might not be a valid solution.

simgineer
  • 1,754
  • 2
  • 22
  • 49
  • How could you think someone can aswer you? What have you tried? Are you using u-boot or something else? Edit your post describing your scenario and what you aim for... – LPs Sep 10 '15 at 06:32
  • 1
    @LPs : I agree that the question seems vague if you have no experience with NXP microcontrollers, and it does contain superfluous and confusing information. However it is still answerable if you understand that NXP devices include a primary bootloader in mask-ROM, which is what FlashMagic uses. – Clifford Sep 11 '15 at 09:27

1 Answers1

3

The use of "USB FTDI" or FlashMagic is irrelevant. The FTDI is simply a USB-UART bridge to provide a serial port.

The NXP parts themselves include a serial bootloader that uses a specific ISP protocol for in-system programming. Your part's data sheet may detail the ISP protocol, although details and app-notes seem to be hard to locate. However Google "NXP linux ISP programmer" and you will find at least two solutions: mxli and nxpprog.

Not all NXP part's ISP are the same. Some present as a USB drive that you simply copy the binary file to. That however is no applicable over a serial interface (USB or otherwise).

Clifford
  • 88,407
  • 13
  • 85
  • 165
  • In case you happen to know I was wondering that without the RTS/NMI and DTR/reset lines in the serial port how do we put the board into ISP mode. Is there an equivalent signal in the USB/FTDI method? No worries if not and thank you for this answer. :) – simgineer Sep 11 '15 at 20:22
  • 1
    @simgineer : I know nothing; I Googled it! However I do know that the FTDI chip includes RTS and DTR lines on its UART output and that the CDC/ACM USB device class defines commands that can assert these lines, at the application level you simply need to use the appropriate device API to do that as you would a real UART - on Linux `ioctl()` I believe. Of course the DRT and RTS on the FTDI must be physically connected to appropriate pins on the microcontroller. – Clifford Sep 12 '15 at 08:11