firware doesn't run after USB boot

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

firware doesn't run after USB boot

3,091 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Mon Nov 09 07:45:39 MST 2015
Hello everyone,

hope Monday is treating you well.
I am having a hard time getting the USB ISP to work on the lpc1549 LPCXpresso board. This is what I do:
[list]
  [*]generate the .bin file as described here
  [*]plug the board from the target socket while pressing the ISP0 button in order to recall the USB bootloader
  [*]a driver called CRP_DISABLD shows up: I delete the firmware.bin file inside it (it takes up all the space) and then copy my own .bin file
  [*]after a power cycle (unplug&plug) nothing really happens, and rebooting with both ISP asserted high falls back to the USB bootloader
[/list]

ps: in case it'd make any difference, i'm using a Linux machine.
Labels (1)
0 Kudos
Reply
11 Replies

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Nov 11 10:41:01 MST 2015
Hi miccio,
As suggested by other could you please check below?
1) Flash binary using SWD, remove the SWD, reset the board and check if  firmware works.
2) If step one is okay flash the firmware using SWD and see the result.
3) if step2 is not correct, compare the binaries as suggested by R2D2.

If step1 is not okay, could you please check if you are using a reset pin as GPIO output?
0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Nov 11 06:33:35 MST 2015

Quote: miccio
I'm not sure i understand what you mean by compare  :~ 



Compare these little funny bytes  :O

If there's no difference between the flash file and your original project bin file, there's no problem with flashing your MCU and you can start to check the hardware...
0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Wed Nov 11 04:07:54 MST 2015
I'm not sure i understand what you mean by compare  :~ 
when I reconnect the board after copying the bin file, a new file called firware.bin shows upand it has the same size as always (it fills up all the memory, that is)
0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Nov 10 09:06:24 MST 2015

Quote: miccio
@R2D2: I tried with the freeRTOS blinky example, 100% vanilla, only change was enabling post build steps



Did you compare the Flash bin-file with your project bin-file?
0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Tue Nov 10 08:55:40 MST 2015
@R2D2: I tried with the freeRTOS blinky example, 100% vanilla, only change was enabling post build steps

@starblue: whenever i do i get an error message on linux stating


Quote:

Error ejecting /dev/sdc: Command-line `eject "/dev/sdc"' exited with non-zero exit status 1: eject: unable to eject, last error: Invalid argument

0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Tue Nov 10 01:46:27 MST 2015
Did you unmount it before unplugging, to make sure the data was actually written?
0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Nov 09 12:30:50 MST 2015
Could be useful to post the project...
0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Mon Nov 09 12:28:02 MST 2015
I can successfully upload and run it through SWD, moreover I had no luck with the blinker example either :(
0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Nov 09 12:03:05 MST 2015
Are you sure your code is working?

Is it working if you flash it via SWD? Or UART? Or CAN?
0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Mon Nov 09 11:54:51 MST 2015
unfortunately not, here's my post-build steps:

arm-none-eabi-size "${BuildArtifactFileName}"
arm-none-eabi-objcopy -v -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin"
checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"


(it's basically the default stuff)
0 Kudos
Reply

2,960 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Nov 09 07:55:58 MST 2015
Forgotten Checksum  :quest:

https://www.lpcware.com/content/faq/lpcxpresso/image-checksums
0 Kudos
Reply