How to program a bootloader file to an lpc17xx? - Page 1
Forum section: electronics / general

author: Mrwoodchuck
author_rank: Contributor
timestamp: May 26, 2016, 07:07:00 pm
content: Hi all,I have been working on a project i found online to make a super nintendo sd cart.The board is built, and everything looks good "voltage's, i can see the lpc1754 in chipscope using my xilinx platform usb"I have no clue how to program it. the instructions state using linux, openocd an a ft2232 usb-jtag adapter you make the boot loader..well i made the boot loader and have a .hex but I only have a xililnx platform cable and i know thats not ft2232.I also have a raspberry pi 3 which i saw could be used, but I have been unsuccessful in getting it to do anything.And I have an arduino uno, but I dont know if that would be any help.At this point I am going to assume I need a new cable to program this something with ft2232?Any help would be appreciated as I am super lost.Thanks,Don

author: nctnico
author_rank: Super Contributor
timestamp: May 26, 2016, 07:11:05 pm
content: I'd use a Windows machine (in a VM) and a tool called flashmagic to program the LPC17xx processor through the serial port. This may need extra lines on the reset and a pin to enter the bootloader (the LPC17xx comes with a preprogrammed bootloader) after reset.

author: Mrwoodchuck
author_rank: Contributor
timestamp: May 26, 2016, 07:40:29 pm
content: Thank you for the reply nctnico, I did see flashmagic but I was not sure what device to use with it?I have never done any programming, the closest thing I have done was using the arduino uno and nothing advanced just simple lcd, blink, and thermostat sketches.

author: nctnico
author_rank: Super Contributor
timestamp: May 26, 2016, 08:22:04 pm
content: You'll need something like this as a serial port programmer. I'm sure the schematics will be of some help to find an alternative (like a USB to serial port board):https://www.sparkfun.com/products/retired/714

author: Mrwoodchuck
author_rank: Contributor
timestamp: May 26, 2016, 10:36:12 pm
content: The xilinx usb platform cable, arduino uno, or raspberry pi wont work as a tool for this?That kinda sucks.. looks like I'm off to ebay then.Thank you for the much needed info!

author: nctnico
author_rank: Super Contributor
timestamp: May 26, 2016, 11:03:37 pm
content: Quote from: Mrwoodchuck on May 26, 2016, 10:36:12 pmNot easely. There are LPC1000/2000 serial port bootloader programmers for Linux but they are flaky (probably timing issues) so your best bet is to go with Flashmagic on Windows.

author: rstofer
author_rank: Super Contributor
timestamp: May 26, 2016, 11:54:06 pm
content: When you use FlashMagic, you are doing ISP = In System Programming. You use the internal bootloader to load the flash by way of the UART port. See Chapter 32 here:http://www.nxp.com/documents/user_manual/UM10360.pdfI hope you brought the UART pins out on your PCB. From your PC, you probably need a USB->Serial cable and, at the PCB, you need something to convert RS232 signal levels back to TTL/CMOS. There are more elegant solutions but this device will do the job as long as you can get control of the reset and P2.10.https://www.sparkfun.com/products/449The more elegant solutions control those two signals with the RS232 control signals. Here is a neat solution because it does away with the separate USB->RS232 cable:http://www.amazon.com/Mini-Programmer-Module-Download-UART/dp/B009W27PMIThe alternative is JTAG programming and that is a much faster way to get things done. However, when I tried OpenOCD several years ago, getting it set up was a nightmare. I finally got a JTAG gadget from Rowley to work with their IDE (CrossWorks) and this setup worked right out of the box. Nice!If I were using an LPC1768, I would buy an mbed (www.mbed.org) and just plug it into a daughter card with my peripherals. All you do is drag and drop the hex file onto the virtual drive created by the mbed. Clean and easy!https://developer.mbed.org/

author: Mrwoodchuck
author_rank: Contributor
timestamp: May 27, 2016, 08:24:28 pm
content: Ya, the pins that I am able to connect are tx0, rx0, td0, tdi, tms, /trst, tck, rx3, tx3, /rst, 5v, gnd, and 3.3v..I was having the same problem with jtag / openOCD it did not make any sense to me, and I am new to all of this so eah the essayist way seems to be the serial method.I bought a USB to TTL USB to Serial CH340 Module from ebay.eBay auction: #191602654648Hopefully this will work and I will be able to get this done.Thank you all for the input / help!