2013/3/11 Bryan Lambrecht
<bryan.l...@gmail.com>
So I am trying to flash a new chip with the boot loader (prototype) and I have the Olimex-Jtag-Tiny-H dongle. However I am having a difficult time getting everything to work in windows (downloading ubuntu now just in case).
I have the Jtag and OCD set up and look like it is working correctly, but eclips is not cooperating with me right now. However I did notice that it looks like I might be able to just flash the chip with just the openOCD program using the release booloader .bin. From what I can tell I need to modify the lpc1758.cfg file to include the commands to flash the chip.
I just have experience on Linux Ubuntu and on that case, I would:
- run OpenCOD with this command (this is the same used on Eclispe): "sudo openocd -f openocd_v0.4.0-scripts/olimex-jtag-tiny.cfg -f openocd_v0.4.0-scripts/lpc1758.cfg"
- use Telnet and connect to OpenOCD, and then use the following commands (this is the same used on Eclispe):
reset
sleep 100
halt
sleep 100
flash write_image erase unlock ./FLASH_RUN/project.elf
sleep 100
exit
I'm not quite sure how to setup this file, and don't want to do something stupid like write the bootloader to the wrong segment in memory or something and brick the chip. So I was hoping some one has done this before (with out eclips) and has the lpc1758.cfg file I can snag, or can point me in the right direction.
IMO, you will never brick LPC175x - you will always be able to flash it.
"flash write_image" line is flashing the "project.elf" to 0 address, where the bootloader should be flashed/from where LPC175x boots.
After bootloader verifies if SDCard have "firmware.bin" file, it simple jumps to address where firmware starts, which is (on firmware "main.c"):
#define USER_FLASH_START 0x10000 /* For USB bootloader */
--
Jorge Pinto
IEUA - Universidade de Aveiro
Portugal
Confidencialidade: Este e-mail, assim como respectivos anexos, é confidencial e não pode ser revelado ou utilizado por terceiros não autorizados. Se o recebeu por engano, solicitamos que não o utilize para nenhum fim, notifique o remetente e proceda à sua destruição.
Confidentiality notice: This e-mail, as well as existing files, is confidential and may not be disclosed to or used by any other person than the addresse unless when authorized. If you have received this e-mail by mistake, we request not to make any use whatsoever of its contents, notify us and proceed to its destruction.