Hi,
I download the USB Secondary ISP Bootloader example for LPC2148 to use for Keil MCB2140 board at www.standardics.nxp.com/.../an10711.zip
The bootloader works as an USB Mass Storage to upload the user application into flash by copy and replace the firmware.bin. It works fine on window PC when I copy my binary file to replace firmware.bin. After I reset the board, it will jump to the user application location and run the user application.
But it does not work on Linux, I use opensuse 10.3, when I copy binary file to replace firmware.bin. Sometime, it did not allow to delete the firmware.bin and it never run after I reset.
Can anyone show me how to fix it?
Hi!
I just read the same APN and got two questions. Perhaps you can reply ??
1) How did you get a *.bin file to prgramm the LPC2xxx??
2) Do you know how to switch the USB-Modifications if you need the USB-Module for you're own Communication??
Because, if the PC recognized the LPC2xxx (with the KEIL specified VID & PID) as a Mass-Storage-Device once, how will the PC know that the same USB-Connection is (when the *.bin file is programmed) a normal HID now ??? ( I use the VID & PID-Numbers for VISA. VISA is a LabVIEW specified Driver. So I believe this is Impossible to do, but I'm not sure )
you can convert axf file to bin file by fromelf.exe tool from keil. It's locate at Keil/ARM/BIN31 folder. the command is: fromelf --bin -o outfile.bin infile.axf
To switch the usb mode from mass storage to hid you need to modify the usbdesc.c and usbcfg.h file. You can open the example of usbhid and usbmem of MCB2140 to see the different.
USB Secondary ISP Bootloader for lpc214x didn't work on linux because the write flash address is different between window and linux, for linux it's shift to the right some byte, not exactly at 0x2000. So we need to modify the write_flash function of sbl_iap.c to make sure it write to flash at 0x2000 or the address we want.