Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2015-06-01 11:24:51

recrudesce
Member
Registered: 2015-06-01
Posts: 8

Flashing Issues

Hey,
I have a PM3, which has been working fine.  However, I went to flash the device and it ended up in a boot loop.  I've fixed the boot loop issue, and can interact with the device using the proxmark3 client, however nothing works - sometimes hw version shows a result, sometimes it does not.

So, I am trying to flash the device with the latest firmware, but this ALWAYS happens.

me@nix:~/Downloads/proxmark3/client$ ./flasher /dev/ttyACM0 ../armsrc/obj/fullimage.elf 
Loading ELF file '../armsrc/obj/fullimage.elf'...
Loading usable ELF segments:
0: V 0x00102000 P 0x00102000 (0x0000a4bc->0x0000a4bc) [R  ] @0xb4
1: V 0x00110000 P 0x00110000 (0x00014cbc->0x00014cbc) [R X] @0xa570
2: V 0x00200000 P 0x00124cc0 (0x000029d8->0x000029d8) [RWX] @0x1f230
Note: Extending previous segment from 0x14cbc to 0x17698 bytes
Note: 0x4-byte hole created

Waiting for Proxmark to appear on /dev/ttyACM0. Found.
Entering bootloader...
(Press and release the button only to abort)
Waiting for Proxmark to reappear on /dev/ttyACM0...... Found.

Flashing...
Writing segments for file: ../armsrc/obj/fullimage.elf
 0x00102000..0x0010c4bb [0xa4bc / 83 blocks]................Error: Unexpected reply 0x00fe (expected ACK)
 ERROR
Error writing block 16 of 83

I tried to revive it with a BusPirate, but get this

recrudesce@senketsu:~/Downloads/pm3$ openocd -f at91sam7s512-buspirate.cfg 
Open On-Chip Debugger 0.10.0-dev-00001-g70a14db (2015-06-01-09:36)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
adapter speed: 6000 kHz
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: sam7x.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Info : TAP auto0.tap does not have IDCODE
Info : TAP auto1.tap does not have IDCODE
Info : TAP auto2.tap does not have IDCODE
Info : TAP auto3.tap does not have IDCODE
Info : TAP auto4.tap does not have IDCODE
Info : TAP auto5.tap does not have IDCODE
Info : TAP auto6.tap does not have IDCODE
Info : TAP auto7.tap does not have IDCODE
Info : TAP auto8.tap does not have IDCODE
Info : TAP auto9.tap does not have IDCODE
Info : TAP auto10.tap does not have IDCODE
Info : TAP auto11.tap does not have IDCODE
Info : TAP auto12.tap does not have IDCODE
Info : TAP auto13.tap does not have IDCODE
Info : TAP auto14.tap does not have IDCODE
Info : TAP auto15.tap does not have IDCODE
Info : TAP auto16.tap does not have IDCODE
Info : TAP auto17.tap does not have IDCODE
Info : TAP auto18.tap does not have IDCODE
Info : TAP auto19.tap does not have IDCODE
Warn : Unexpected idcode after end of chain: 52 0x00000000
Warn : Unexpected idcode after end of chain: 84 0x00000000
Warn : Unexpected idcode after end of chain: 116 0x00000000
Warn : Unexpected idcode after end of chain: 148 0x00000000
Warn : Unexpected idcode after end of chain: 180 0x00000000
Warn : Unexpected idcode after end of chain: 212 0x00000000
Warn : Unexpected idcode after end of chain: 244 0x00000000
Warn : Unexpected idcode after end of chain: 276 0x00000000
Warn : Unexpected idcode after end of chain: 308 0x00000000
Warn : Unexpected idcode after end of chain: 340 0x00000000
Warn : Unexpected idcode after end of chain: 372 0x00000000
Warn : Unexpected idcode after end of chain: 404 0x00000000
Warn : Unexpected idcode after end of chain: 436 0x00000000
Warn : Unexpected idcode after end of chain: 468 0x00000000
Warn : Unexpected idcode after end of chain: 500 0x00000000
Warn : Unexpected idcode after end of chain: 532 0x00000000
Warn : Unexpected idcode after end of chain: 564 0x00000000
Warn : Unexpected idcode after end of chain: 596 0x00000000
Warn : Unexpected idcode after end of chain: 628 0x00000000
Error: double-check your JTAG setup (interface, speed, ...)
Error: Trying to use configured scan chain anyway...
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x00000000"
Error: auto0.tap: IR capture error; saw 0x0000 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Info : sam7x.cpu: hardware has 2 breakpoint/watchpoint units
^CInfo : Shutting down buspirate.
Info : Buspirate switched to normal mode

and when I try and halt it

me@nix:~/Downloads/code$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> halt
Halt timed out, wake up GDB.
timed out while waiting for target halted

> exit

Basically I need help - can anyone spend some time with me to assist in fixing the unit either via JTAG or similar ?

Thanks smile
rec

Offline

#2 2015-06-01 16:33:27

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Flashing Issues

did you flash the bootrom?

Offline

#3 2015-06-01 17:22:13

recrudesce
Member
Registered: 2015-06-01
Posts: 8

Re: Flashing Issues

Yeah, the bootrom flashed fine.

Offline

#4 2015-06-01 17:36:17

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Flashing Issues

What version of code are you attempting to flash?  The sizes don't look right.

Offline

#5 2015-06-01 17:53:59

recrudesce
Member
Registered: 2015-06-01
Posts: 8

Re: Flashing Issues

I cloned the latest git repo.

Offline

#6 2015-06-01 18:22:20

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Flashing Issues

Then you cloned the wrong one.   Should be 300+ blocks.  And only 2 elf segments

Offline

#7 2015-06-01 18:24:54

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Flashing Issues

Or you could have a compile issue

Offline

#8 2015-06-01 18:34:57

recrudesce
Member
Registered: 2015-06-01
Posts: 8

Re: Flashing Issues

Interesting.  I'll clone it again and compile and provide the whole output.

Would using the x86_x64 devARMKit be a problem ?

Offline

#9 2015-06-04 11:04:44

recrudesce
Member
Registered: 2015-06-01
Posts: 8

Re: Flashing Issues

OK, I cloned again, and built it on a Kali box this time

me@nix:~/Downloads/proxmark3/client$ ./flasher /dev/ttyACM0 ../armsrc/obj/fullimage.elf 
Loading ELF file '../armsrc/obj/fullimage.elf'...
Loading usable ELF segments:
0: V 0x00102000 P 0x00102000 (0x0002e24e->0x0002e24e) [R X] @0x98
1: V 0x00200000 P 0x0013024e (0x00002960->0x00002960) [RWX] @0x2e2e8
Note: Extending previous segment from 0x2e24e to 0x30bae bytes

Waiting for Proxmark to appear on /dev/ttyACM0. Found.
Entering bootloader...
(Press and release the button only to abort)
Waiting for Proxmark to reappear on /dev/ttyACM0...... Found.

Flashing...
Writing segments for file: ../armsrc/obj/fullimage.elf
 0x00102000..0x00132bad [0x30bae / 390 blocks]................Error: Unexpected reply 0x00fe (expected ACK)
 ERROR
Error writing block 16 of 390
me@nix:~/Downloads/proxmark3/client$ 

Still the same issue.

Offline

#10 2015-06-04 12:25:49

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: Flashing Issues

There seems to be a problem with block 16; if even bus pirate failed it seems to be a corrupted/broken flash memory address.
You can try to erase the chip with a JTag otherwise I suggest you to change the flash with a new one (I am not sure if block16 should be inside the ARM of the FPGA).

If you think it is a compile issue try those compiled files, they are working for me (they are from a piwi's recent test branch).

Last edited by asper (2015-06-04 12:29:09)

Offline

#11 2015-06-04 12:26:43

recrudesce
Member
Registered: 2015-06-01
Posts: 8

Re: Flashing Issues

OK, it seems I can talk to the device via JTAG.  But here's some interesting things I've experienced.

1: I cannot halt the device

Open On-Chip Debugger
> halt
Halt timed out, wake up GDB.
timed out while waiting for target halted

2: It seems the flash banks are 0 length

Open On-Chip Debugger
> flash  banks
#0 : sam7x512.flash.0 (at91sam7) at 0x00000000, size 0x00000000, buswidth 0, chipwidth 0
#1 : sam7x512.flash.1 (at91sam7) at 0x00000000, size 0x00000000, buswidth 0, chipwidth 0

Here's what OpenOCD says at startup

Open On-Chip Debugger 0.9.0 (2015-06-04-11:27)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : TAP sam7x.cpu does not have IDCODE
Error: sam7x.cpu: IR capture error; saw 0x0e not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Info : sam7x.cpu: hardware has 2 breakpoint/watchpoint units

Offline

#12 2015-06-04 14:11:57

recrudesce
Member
Registered: 2015-06-01
Posts: 8

Re: Flashing Issues

Tried that, exactly the same error message.  I can't get JTAG working - I've wired it up exactly as per every documentation and diagram I can find, and I can't flash the device with the firmware.  Brilliant - so now I have a dead and completely useless $300 piece of PCB.

Offline

#13 2015-07-01 20:39:50

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

I have exactly the same issue hmm
I get this for the version v2.1.0:

$ ./flasher /dev/ttyACM0  -b ../bootrom/obj/bootrom.elf
Loading ELF file '../bootrom/obj/bootrom.elf'...
Loading usable ELF segments:
0: V 0x00100000 P 0x00100000 (0x00000200->0x00000200) [R X] @0x94
1: V 0x00200000 P 0x00100200 (0x00000b60->0x00000b60) [RWX] @0x298

Waiting for Proxmark to appear on /dev/ttyACM0. Found.
Entering bootloader...
(Press and release the button only to abort)
Waiting for Proxmark to reappear on /dev/ttyACM0...... Found.

Flashing...
Writing segments for file: ../bootrom/obj/bootrom.elf
 0x00100000..0x001001ff [0x200 / 1 blocks]. OK
 0x00100200..0x00100d5f [0xb60 / 6 blocks]...... OK

Resetting hardware...
All done.

Have a nice day!

Fair enough wink

$ ./flasher  /dev/ttyACM0 ../armsrc/obj/fullimage.elf
Loading ELF file '../armsrc/obj/fullimage.elf'...
Loading usable ELF segments:
0: V 0x00102000 P 0x00102000 (0x0002e247->0x0002e247) [R X] @0x98
1: V 0x00200000 P 0x00130248 (0x00002c40->0x00002c40) [RWX] @0x2e2e0
Note: Extending previous segment from 0x2e247 to 0x30e88 bytes
Note: 0x1-byte hole created

Waiting for Proxmark to appear on /dev/ttyACM0. Found.
Entering bootloader...
(Press and release the button only to abort)
Waiting for Proxmark to reappear on /dev/ttyACM0...... Found.

Flashing...
Writing segments for file: ../armsrc/obj/fullimage.elf
 0x00102000..0x00132e87 [0x30e88 / 392 blocks]................Error: Unexpected reply 0x00fe (expected ACK)
 ERROR
Error writing block 16 of 392

I've tried to flash while pushing the button and without pushing it sad


For the last version (commit: 475aefa), I get this similar error:

$./flasher  /dev/ttyACM0 
Loading ELF file '../armsrc/obj/fullimage.elf'...
Loading usable ELF segments:
0: V 0x00102000 P 0x00102000 (0x00023ff8->0x00023ff8) [R X] @0x94
1: V 0x00200000 P 0x00125ff8 (0x000019a0->0x000019a0) [RW ] @0x2408c
Note: Extending previous segment from 0x23ff8 to 0x25998 bytes

Waiting for Proxmark to appear on /dev/ttyACM0. Found.

Flashing...
Writing segments for file: ../armsrc/obj/fullimage.elf
 0x00102000..0x00127997 [0x25998 / 301 blocks]................Error: Unexpected reply 
 ERROR
Error writing block 16 of 301

Offline

#14 2015-07-01 22:22:14

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: Flashing Issues

For your sake, I really hope you did a "make clean && make all" .. otherwise your bootrom might not know the layout of the new fullimage...

Offline

#15 2015-07-02 04:41:35

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Flashing Issues

Strange that both of you got stopped at block 16...  It also seems like both are running linux?

Last edited by marshmellow (2015-07-02 04:46:09)

Offline

#16 2015-07-02 04:48:27

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Flashing Issues

Btw, make clean && make all should be run from the pm3 directory not the client Dir.  (Just saying the obvious just to get it out of the way smile. )

Offline

#17 2015-07-10 13:25:24

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

iceman wrote:

For your sake, I really hope you did a "make clean && make all" .. otherwise your bootrom might not know the layout of the new fullimage...

I'm pretty sure I did "make clean; make all" before flashing.
By any chance, if I've forgotten just one time, could that explain the errors I get?
For the record, I tried again with the versions and with a "make clean; make all" and got the same error.


marshmellow wrote:

Strange that both of you got stopped at block 16...  It also seems like both are running linux?

Indeed:

Linux version 3.5.0-54-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #81~precise1-Ubuntu SMP Tue Jul 15 04:02:22 UTC 2014

Do you recommend to try flashing from another machine with a different OS?
Do I really need to by a bus Pirate?

Thanks for your help, I'm really stuck here  sad

Offline

#18 2015-07-10 13:37:24

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Flashing Issues

It seems like a hw issue, but it is strange that two ppl would have exactly the same memory location error.   Where did you get your pm3 from?   You could try a windows os and flasher.  You could use aspers precompiled environment from his thread.

Offline

#19 2015-07-10 13:53:53

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

marshmellow wrote:

It seems like a hw issue, but it is strange that two ppl would have exactly the same memory location error.   Where did you get your pm3 from?   You could try a windows os and flasher.  You could use aspers precompiled environment from his thread.

Erf, that sounds bad ...
By "aspers precompiled environment" do you mean this one:

asper wrote:

If you think it is a compile issue try URL compiled files, they are working for me (they are from a piwi's recent test branch).

Unfortunately, the file is no longer online, I cannot test this hmm

Offline

#20 2015-07-10 14:05:06

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Flashing Issues

Sorry I meant the one in this thread. http://www.proxmark.org/forum/viewtopic.php?id=1562

Offline

#21 2015-07-10 14:34:22

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

@Lucheti Look like both proxmarks boxes need as least JTAG or fully gone ... $30 for the components stock. You can keep the antennas and the power cable. How do you think?

Offline

#22 2015-07-10 16:58:35

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

only joking. Sorry $30 is too much.

1/ Have you upgrade anything in linux recently. After the previous successful flasing? Have you check again Linux installation page, that said disabling of modem manger did not work any more.

2/ If you run < apt-get autoremove && apt-get update && apt-get upgrade > I show me the report I would feel safer... linux is nice but get broken very easily by stupid small change too.

3/ Could you unplug COM port , run
< dmesg | grep 'USB' > and put the content in pastebin

4/ do 3/ with proxmark plugged in

5/ do 3/ again after flashing failure; here pls do also <vi  /lib/udev/rules.d/77-mm-usb-device-blacklist.rules>

6/ could you make clean && make all flash-all and past all the content on pastebin.

7/ after all that still failure, could you flashing using the elf files built by Asper in 2.1.1

Last edited by ntk (2015-07-10 17:44:03)

Offline

#23 2015-07-11 00:05:47

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

Sorry I cannot post links ...

ntk wrote:

1/ Have you upgrade anything in linux recently. After the previous successful flasing? Have you check again URL, that said disabling of modem manger did not work any more.

Yes I did. But, after this last upgrade, the client was working well.
For the record, I needed to to do 'sudo udevadm control --reload-rules'.

ntk wrote:

2/ If you run < apt-get autoremove && apt-get update && apt-get upgrade > I show me the report I would feel safer... linux is nice but get broken very easily by stupid small change too.

I did not perform an upgrade before flashing (I only do this once or twice a week). I will try again to flash now that everything is updated. I let you know when I'll have finished.
Meanwhile: here is what I get when doing an update+upgrade (no broken dependency):

cture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
ntk wrote:

3/ Could you unplug COM port , run
< dmesg | grep 'USB' > and put the content in pastebin

Sorry, I do not see the difference with step 4.

When I Unplug&Plug PM3:

$ dmesg | grep 'USB'
[115333.146580] usb 2-2: USB disconnect, device number 58
[115338.819891] usb 2-2: new full-speed USB device number 60 using xhci_hcd
[115339.283643] hub 2-0:1.0: unable to enumerate USB device on port 2
[115339.555484] usb 2-2: new full-speed USB device number 62 using xhci_hcd
ntk wrote:

5/ do 3/ again after flashing failure; here pls do also <vi  /lib/udev/rules.d/77-mm-usb-device-blacklist.rules>

Weird, on google. com/p/proxmark3/wiki/Linux, another file is mentioned: /etc/udev/rules.d/77-mm-usb-device-blacklist.rules


I will do remaining steps and let you know wink

Offline

#24 2015-07-11 00:18:35

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

ntk wrote:

5/ do 3/ again after flashing failure; here pls do also <vi  /lib/udev/rules.d/77-mm-usb-device-blacklist.rules>

After doing udevadm, when flashing fullimage:

[117051.654256] usb 2-2: new full-speed USB device number 66 using xhci_hcd
[117056.872923] usb 2-2: New USB device found, idVendor=2d2d, idProduct=504d
[117056.872934] usb 2-2: New USB device strings: Mfr=1, Product=0, SerialNumber=0
[117056.874668] cdc_acm 2-2:1.0: ttyACM0: USB ACM device

After that, when plug and unplug:

[117117.317801] hub 2-0:1.0: unable to enumerate USB device on port 2
[117118.037291] usb 2-2: new full-speed USB device number 68 using xhci_hcd

Offline

#25 2015-07-11 00:27:11

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

Ok, after upgrading my whole system, I decided to try again a completely fresh flash.
I used: proxmark3 v2.1.0, devkitARM_r41-x86_64-linux. And again:

➜  lucca@lucca-XPS : FRESH/proxmark3-2.1.0/client  ./flasher  /dev/ttyACM0 ../armsrc/obj/fullimage.elf
Loading ELF file '../armsrc/obj/fullimage.elf'...
Loading usable ELF segments:
0: V 0x00102000 P 0x00102000 (0x0002e247->0x0002e247) [R X] @0x98
1: V 0x00200000 P 0x00130248 (0x00002c40->0x00002c40) [RWX] @0x2e2e0
Note: Extending previous segment from 0x2e247 to 0x30e88 bytes
Note: 0x1-byte hole created

Waiting for Proxmark to appear on /dev/ttyACM0. Found.
Entering bootloader...
(Press and release the button only to abort)
Waiting for Proxmark to reappear on /dev/ttyACM0...... Found.

Flashing...
Writing segments for file: ../armsrc/obj/fullimage.elf
 0x00102000..0x00132e87 [0x30e88 / 392 blocks]................Error: Unexpected reply 0x00fe (expected ACK)
 ERROR
Error writing block 16 of 392

Offline

#26 2015-07-11 00:30:22

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

ntk wrote:

6/ could you make clean && make all flash-all and past all the content on pastebin.

Ok, i also tried that one:

➜  lucca@lucca-XPS : Proxmark/FRESH/proxmark3-2.1.0  make all flash-all
make -C bootrom all
make[1]: Entering directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/bootrom'
perl ../tools/mkversion.pl .. > version.c || cp ../common/default_version.c version.c 
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
arm-none-eabi-gcc -c -I../include -I../common -Wall -Werror -pedantic -std=c99 -I. -Os -mthumb -mthumb-interwork -o obj/version.o version.c 
arm-none-eabi-gcc -nostartfiles -nodefaultlibs -Wl,-gc-sections -n -Wl,-T,ldscript-flash,-Map,obj/bootrom.map -o obj/bootrom.elf obj/version.o obj/ram-reset.o
arm-none-eabi-objcopy -Osrec --srec-forceS3 --strip-debug --no-change-warnings --change-addresses -0x100000 --change-start 0 --change-section-address .bss+0 -
make[1]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/bootrom'
make -C armsrc all
make[1]: Entering directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/armsrc'
perl ../tools/mkversion.pl .. > version.c || cp ../common/default_version.c version.c 
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
arm-none-eabi-gcc -c -I../include -I../common -Wall -Werror -pedantic -std=c99 -DWITH_LF -DWITH_ISO15693 -DWITH_ISO14443a -DWITH_ISO14443b -DWITH_ICLASS -DWITon.c 
arm-none-eabi-gcc -nostartfiles -nodefaultlibs -Wl,-gc-sections -n -Wl,-T,ldscript,-Map,obj/fullimage.map -o obj/fullimage.elf obj/version.o obj/fpga_lf.o objdc.o obj/cmd.o obj/fpgaloader.o obj/legicrf.o obj/lfdemod.o obj/epa.o obj/iso14443a.o obj/mifareutil.o obj/mifarecmd.o obj/mifaresniff.o obj/iso14443b.o obj/c -lgcc
arm-none-eabi-objcopy -F elf32-littlearm obj/fullimage.elf obj/osimage.elf
arm-none-eabi-objcopy -Osrec --srec-forceS3 --strip-debug --no-change-warnings --change-addresses -0x100000 --change-start 0 --change-section-address .bss+0 -
make[1]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/armsrc'
make -C client all
make[1]: Entering directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/client'
Compiling liblua, using platform linux
cd ../liblua && make linux
make[2]: Entering directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/liblua'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[3]: Entering directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/liblua'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/liblua'
make[2]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/liblua'
make[1]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/client'
make -C recovery all
make[1]: Entering directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/recovery'
arm-none-eabi-objcopy --gap-fill=0xff --pad-to 0x00102000 -O binary ../bootrom/obj/bootrom.elf bootrom.bin
arm-none-eabi-objcopy --gap-fill=0xff -O binary ../armsrc/obj/fullimage.elf fullimage.bin
cat bootrom.bin fullimage.bin > proxmark3_recovery.bin
make[1]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/recovery'
make -C bootrom obj/bootrom.elf
make[1]: Entering directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/bootrom'
perl ../tools/mkversion.pl .. > version.c || cp ../common/default_version.c version.c 
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
arm-none-eabi-gcc -c -I../include -I../common -Wall -Werror -pedantic -std=c99 -I. -Os -mthumb -mthumb-interwork -o obj/version.o version.c 
arm-none-eabi-gcc -nostartfiles -nodefaultlibs -Wl,-gc-sections -n -Wl,-T,ldscript-flash,-Map,obj/bootrom.map -o obj/bootrom.elf obj/version.o obj/ram-reset.o
make[1]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/bootrom'
make -C armsrc obj/osimage.elf
make[1]: Entering directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/armsrc'
perl ../tools/mkversion.pl .. > version.c || cp ../common/default_version.c version.c 
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
arm-none-eabi-gcc -c -I../include -I../common -Wall -Werror -pedantic -std=c99 -DWITH_LF -DWITH_ISO15693 -DWITH_ISO14443a -DWITH_ISO14443b -DWITH_ICLASS -DWITon.c 
arm-none-eabi-gcc -nostartfiles -nodefaultlibs -Wl,-gc-sections -n -Wl,-T,ldscript,-Map,obj/fullimage.map -o obj/fullimage.elf obj/version.o obj/fpga_lf.o objdc.o obj/cmd.o obj/fpgaloader.o obj/legicrf.o obj/lfdemod.o obj/epa.o obj/iso14443a.o obj/mifareutil.o obj/mifarecmd.o obj/mifaresniff.o obj/iso14443b.o obj/c -lgcc
arm-none-eabi-objcopy -F elf32-littlearm obj/fullimage.elf obj/osimage.elf
make[1]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/armsrc'
make -C client flasher
make[1]: Entering directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/client'
make[1]: 'flasher' is up to date.
make[1]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/client'
client/flasher /dev/ttyACM0 -b bootrom/obj/bootrom.elf armsrc/obj/osimage.elf
Loading ELF file 'bootrom/obj/bootrom.elf'...
Loading usable ELF segments:
0: V 0x00100000 P 0x00100000 (0x00000200->0x00000200) [R X] @0x94
1: V 0x00200000 P 0x00100200 (0x00000b60->0x00000b60) [RWX] @0x298

Loading ELF file 'armsrc/obj/osimage.elf'...
Loading usable ELF segments:
0: V 0x00102000 P 0x00102000 (0x0002e247->0x0002e247) [R X] @0x98
1: V 0x00200000 P 0x00130248 (0x00002c40->0x00002c40) [RWX] @0x2e2e0
Note: Extending previous segment from 0x2e247 to 0x30e88 bytes
Note: 0x1-byte hole created

Waiting for Proxmark to appear on /dev/ttyACM0......... Found.
Entering bootloader...
(Press and release the button only to abort)
Waiting for Proxmark to reappear on /dev/ttyACM0...... Found.

Flashing...
Writing segments for file: bootrom/obj/bootrom.elf
 0x00100000..0x001001ff [0x200 / 1 blocks]. OK
 0x00100200..0x00100d5f [0xb60 / 6 blocks]...... OK

Writing segments for file: armsrc/obj/osimage.elf
 0x00102000..0x00132e87 [0x30e88 / 392 blocks]................Error: Unexpected reply 0x00fe (expected ACK)
 ERROR
Error writing block 16 of 392
Makefile:47: recipe for target 'flash-all' failed
make: *** [flash-all] Error 255

Offline

#27 2015-07-11 01:07:03

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

do not cheat my friend.

make clean!

Offline

#28 2015-07-11 01:14:47

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

because you have problem with the flashing now and run in to danger to sell your beloved proxmark3 as a letter's lever, I am nervous already with my $30 offer...

SO

I would just use a plain normal git release, and forget any fancy tricks I have built in to my PM3 software.

and also just use standard ARMdevelop SW every one uses

because we have to many unknown factors here.


...

Offline

#29 2015-07-11 01:15:20

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

ntk wrote:

7/ after all that still failure, could you flashing using the elf files built by Asper in 2.1.1

I did this (with the v2.1.0 though since I did not find the v2.1.1) and again:

Error writing block 16 of 391

Offline

#30 2015-07-11 01:17:50

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

ntk wrote:

do not cheat my friend.
make clean!

Ok, 'make clean; make all flash-all' gives the same result in the end...

Offline

#31 2015-07-11 01:18:42

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

Yes, you linux man, you know exactly what I search for "no broken dependency"

don't worry about the difference  /lib/udev/rules.d/ or /lib/udev/rules.d/ it depens on the retros you chose eg. Ubuntu, Kali, Back track, Mint etc just search for the file and make the modification.


this part I was looking for and I should see it all the time proxmark is plugged in, not only after or while flashing
[59751.659024] usb 2-1.2: New USB device found, idVendor=2d2d, idProduct=504d
[59751.659035] usb 2-1.2: New USB device strings: Mfr=1, Product=0, SerialNumber=0
[59751.659041] usb 2-1.2: Manufacturer: proxmark.org
[59751.659767] cdc_acm 2-1.2:1.0: This device cannot do calls on its own. It is not a modem

you use xhci_hcd, not ehci-pci humm, are you sure you have always used those driver? I remember something in my ubuntu happened where I had to black list those new advanced driver ... I could not remember which one, xhci or ehci it was few years ago when I use linux.

Since that incident, (lnux kept disconnecting from network, reported ATA HD drive read/write error, and slow down system, keyboard stick, until broken part has found, not even related to HD or keyboard) since then I was very afraid to upgrade and don't run after every new linux release, but stick to one LTS retros, keep system "old" but stable as long as possible... I agreed linux is free and what I did seems to be egoistic, but my life is short I really have not much time to game my system with new release

Particularly when I plan to do some works when I need something soon, I don't care of upgrade what ever people are crazy for them, if it not really bring excellent performance

Could you check one for me, "Do press the button when start flashing and hold until flasher finds your device" you may need to do it several times, plug un plug PM3, check device make sure it recognised again before you send flash command.

I dont know why, but I must hold it and run the flasher once it fails to flash, that is not normal because normally when I use make flash-all I don't need to hold the button.... But one bright beautiful day suddenly that flash-all will report flash err, then we have to go back to the technique  "hold the button, until flasher has found PM3". Pls don't ask why.

Pls do clean and make all then pastebin the report, Holiman or Rule or people using your linux distro could throw a look into  and may find something strange ... unknown ...or wierd!

what is it you use Kali? which version? pls leave infos there too.

I do not like the word  "fatal" in the compile report, but hey I don't use linux, those folks are totally different...

Good luck.

Last edited by ntk (2015-07-11 01:32:57)

Offline

#32 2015-07-11 14:50:39

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: Flashing Issues

but did you flash the bootrom first?  and then the fullimage?  I don't see that in your logs

Offline

#33 2015-07-11 15:44:18

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

There is a reason why I ask you to follow strict order. Two machines, with similar fault is impossible to point to same HW fault. There si something common in both yours machine. that is why I am asking for eliminate possible factors

Please don't cheat or you can advertise for two letter levers.

linux folks are different but can not be that different. That is why I have ask to send the full clean compilation report.


fatal  is unknown

[== Undefined ==]

perl ../tools/mkversion.pl .. > version.c || cp ../common/default_version.c version.c 
fatal: Not a git repository (or any of the parent directories): .git

this order is also strange

[== Undefined ==]

make[1]: 'flasher' is up to date.

make[1]: Leaving directory '/home/lucca/Boulot/LSV/HACK/Proxmark/FRESH/proxmark3-2.1.0/client'
Loading ELF file 'bootrom/obj/bootrom.elf'...

this is weird...

[== Undefined ==]


Loading ELF file 'armsrc/obj/osimage.elf'...

Note: 0x1-byte hole created

Flashing...
Writing segments for file: bootrom/obj/bootrom.elf
0x00100000..0x001001ff [0x200 / 1 blocks]. OK
0x00100200..0x00100d5f [0xb60 / 6 blocks]...... OK


and I believe the consequence ...

[== Undefined ==]

Writing segments for file: armsrc/obj/osimage.elf
 0x00102000..0x00132e87 [0x30e88 / 392 blocks]................Error: Unexpected reply 0x00fe (expected ACK)
 ERROR
Error writing block 16 of 392
Makefile:47: recipe for target 'flash-all' failed

Could you just take the trunk of the Git SW and follow strict "make clean all flash-all" and paste the report again.

lutcheti please do that. It looks like someone has touched the build environment or you, Lutcheti and recrudesce,I guess if he uses linux, are on the same strange path.

Last edited by ntk (2015-07-11 15:49:42)

Offline

#34 2015-07-11 16:05:50

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: Flashing Issues

its strange since the latest code doesn't use a "osimage.elf"  ...   Maybe he didnt clone the pm3 master?

Offline

#35 2015-07-11 17:09:28

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

iceman wrote:

its strange since the latest code doesn't use a "osimage.elf"  ...   Maybe he didnt clone the pm3 master?

No I did download the archive 2.1.0 from Github (here: https://github. com/Proxmark/proxmark3/releases) explaining why I got

fatal: Not a git repository (or any of the parent directories): .git

Offline

#36 2015-07-11 17:47:08

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

ntk wrote:

Could you just take the trunk of the Git SW and follow strict "make clean all flash-all" and paste the report again.

lutcheti please do that. It looks like someone has touched the build environment or you, Lutcheti and recrudesce,I guess if he uses linux, are on the same strange path.

Ok, I cloned the main repo and did a 'make clean all flash-all' and got the same error: http://pastebin. com/Enz1YSBJ

The same (without cleaning) while pushing the button of the PM3: http://pastebin. com/k5CAQpNT

Offline

#37 2015-07-11 17:50:15

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

ntk wrote:

Yes, you linux man, you know exactly what I search for "no broken dependency"

I do not like the word  "fatal" in the compile report, but hey I don't use linux, those folks are totally different...

Concerning those linux-related sarcasms (?), remind that I also tested the asper's stand-alone version on Windows (v.2.1.0) and got exactly the same error (at block 16 as well).

Anyway, thanks for helping  smile
I'm really stuck hmm

Offline

#38 2015-07-11 17:53:03

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

My distro:

Linux version 3.5.0-54-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #81~precise1-Ubuntu SMP Tue Jul 15 04:02:22 UTC 2014
ntk wrote:

you use xhci_hcd, not ehci-pci humm, are you sure you have always used those driver? I remember something in my ubuntu happened where I had to black list those new advanced driver ... I could not remember which one, xhci or ehci it was few years ago when I use linux.

Yes, i did not modify those drivers and it used to work: I succeeded to flash the PM3 a few  months ago and the client was working well.

Offline

#39 2015-07-11 18:47:16

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

Ubuntu 4.6.3... where in the world are you!!! You are worse than me they are on ubuntu 14.4 LTS now.

If you are sure you use it since long time. then it is OK. You got to be sure though, that is why you use linux.

Because with new release those drivers if modified then it happened secretly, done by the new linux distro, it try the best for you even when it breaks all bridge behind it, while you install a new release... That why you got to keep your eye open when you install thing on your PC. That is expected on linux. Express and automatic installation not for linuxian  Unless you have a HW so un-linux you have to do a lot of magic to get it work on linux, most the driver are chosen for you. You would try to interfer to stop the modification when it already works best for you. That mean you can use reposit, synaptic to stop linux upgrade changed without your knowledge.

But that is different thing. Reg your problem please take SW frm Git trunk rebuild with all allures
"make clean && make all flash-all >> report" and paste the whole report in pastebin. I think you could get your PM back today

I believe I see already what is wrong.

Do it, Help me and let hope we'll win.

PS: please be sure to take zip from trunk of GIT, top of tree. Don't rely on any tool, do it by hand.
unzip in a new directory
do make clean make build make flash make report

Last edited by ntk (2015-07-11 18:55:12)

Offline

#40 2015-07-11 19:48:43

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

two persons, in two different places, flashing two different PM3, and got stuck exactly at block16 that is no coincident ... something is common in your two PCs

Offline

#41 2015-07-11 20:19:47

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

Can you shout out loud...Is there some one near you who can try the flash and test his build for you. If you really past the report you would see differences:  size of elf; block, address when it start to write etc

we need to clear this doubt, to kill each unknown factor, The build environment is the easiest if doesn't matched here how can we trust anything else

Unless the more experienced, older experts on this web site here tell you "Size doesn't matter, colour yes" I feel uneasy when I see those block and number... It looks like we don't play with the same ball.


In case something like this happen to me ... Is there any one in England playing with proxmark3 too. I am London, South West. I use window 7. We should have something like a list for people who want to connect to each other.

Offline

#42 2015-07-11 20:49:20

jump
Contributor
Registered: 2015-04-29
Posts: 57

Re: Flashing Issues

Provided that the error appears in both Linux and Windows, that rules out a lot of things related to the OS (tool chain, drivers, etc.).

I would suggest to try from another computer with another USB cable (that might sound silly but I've read many stories about faulty USB cables that lead to very strange bugs) and in your case, always try to flash both bootrom and the image in case you got corruption on the wire in your previous attempts.
If you want to be sure, I can send you the files (with corresponding sha256 hashes) compiled on my computer. I successfully flashed my own PM3 and at least 3 others for friends.

If that doesn't work, that tends to point the PM3 as the culprit. Your computer looks like to be configured in French. If you're close to Paris, you may consider going to the hacker space in Nanterre (called Electrolab) where people can help you flashing the PM3 with a JTAG adapter (unless you have the hardware and feel comfortable doing that).

And for the record ntk, you might read more carefully before yelling at people smile
4.6 is the version of GCC that compiled the kernel, not the release of the OS. He is running Ubuntu Precise which is the 12.04 LTS. Yes it's from 2012 and it starts being a bit old but this version is supported for 5 years. Nothing wrong here.

Offline

#43 2015-07-11 21:43:34

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

you said you flash few months ago and you remember it was working, a lot of things could have changed since on the machine, Lutcheti.

Here is the report of my build just for comparison. I am on window OP, use MinGW so it is a little different then your environment. Your friends on linux could help to confirm if your build environment is up-to-dated.

compile_report

Is there any reason that blocks, size, starting addresses are different?

Offline

#44 2015-07-11 22:08:30

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

You are the man jump. Ah, that "precise" reading mistake, I stop using linux 3 yrs ago and it still scares me to death today

Not wanting to yell at any one I just want to lighten up the atmosphere a nible, Lutcheti is allready depressive enough, situation is depressing enough two of us nearly lost their proxmarks ... I only want to shake him a triple...

You said you send the elf's file, but you also think to send Lutcheti the flasher too... On window it is easy to replace On linux many things I don't remember anymore.

Last edited by ntk (2015-07-11 22:09:46)

Offline

#45 2015-07-11 22:14:38

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

jump wrote:

...
If that doesn't work, that tends to point the PM3 as the culprit.

I do very hope not the case

jump wrote:

Your computer looks like to be configured in French. If you're close to Paris, you may consider going to the hacker space in Nanterre (called Electrolab) where people can help you flashing the PM3 with a JTAG adapter (unless you have the hardware and feel comfortable doing that).
.

"the hacker space in Nanterre" whao, that in my culture is called "you lose some, you win some", and this hit a jackpot

Lutcheti, cheers up my friend....

Offline

#46 2015-07-11 22:38:33

jump
Contributor
Registered: 2015-04-29
Posts: 57

Re: Flashing Issues

ntk wrote:
jump wrote:

...
If that doesn't work, that tends to point the PM3 as the culprit.

I do very hope not the case

"Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth" smile

I am just saying that if the problem remains in both Linux and Windows, it can be a memory module corruption (but the R in RAM is for Random so that's not the most probable thing) but other than that it rules out the computer as the source of the issue.
Then, what remains is the USB cable and the PM3. Could be a bad solder joint, a faulty capacitor or, in the worst case, the ARM processor. Nothing really expensive to repair.

ntk wrote:

"the hacker space in Nanterre" whao, that in my culture is called "you lose some, you win some", and this hit a jackpot

Not sure I understand your point here. The guys running the Electrolab are amazing people, highly competent and very friendly, hence my advice if the PM3 needs more low level and risky option.
I would have helped him myself but I highly doubt I am living close to lutcheti to test or repair his PM3 smile


ntk wrote:

You said you send the elf's file, but you also think to send Lutcheti the flasher too... On window it is easy to replace On linux many things I don't remember anymore.

You're right. It might be worth adding the flasher, statically compiled to avoid software dependency issues, just in case.

Offline

#47 2015-07-11 23:05:25

ntk
Contributor
Registered: 2015-05-24
Posts: 701

Re: Flashing Issues

"The guys running the Electrolab are amazing people, highly competent and very friendly"

only positive

Offline

#48 2015-07-11 23:13:14

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

ntk wrote:

Ubuntu 4.6.3... where in the world are you!!! You are worse than me they are on ubuntu 14.4 LTS now.

As jump wrote, I'm running precise which is 12.04 LTS.

But that is different thing. Reg your problem please take SW frm Git trunk rebuild with all allures
"make clean && make all flash-all >> report" and paste the whole report in pastebin. I think you could get your PM back today
I believe I see already what is wrong.

I don't understand that one. I already did this and post the log here: http://pastebin. com/Enz1YSBJ (sorrt I can't post URLs).

Offline

#49 2015-07-11 23:21:56

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

jump wrote:

Provided that the error appears in both Linux and Windows, that rules out a lot of things related to the OS (tool chain, drivers, etc.).

You're right.

I would suggest to try from another computer with another USB cable (that might sound silly but I've read many stories about faulty USB cables that lead to very strange bugs) and in your case, always try to flash both bootrom and the image in case you got corruption on the wire in your previous attempts.
If you want to be sure, I can send you the files (with corresponding sha256 hashes) compiled on my computer. I successfully flashed my own PM3 and at least 3 others for friends.

I tried from my laptop running Ubuntu 12.04 LTS with USB cable 1, with USB cable 2. I also tried from another computer running Windows 8.1 with the standalone version v.2.1.0 of asper with both cables. In all cases, "error writing block 16 of X".

If that doesn't work, that tends to point the PM3 as the culprit. Your computer looks like to be configured in French. If you're close to Paris, you may consider going to the hacker space in Nanterre (called Electrolab) where people can help you flashing the PM3 with a JTAG adapter (unless you have the hardware and feel comfortable doing that).

I live in 75018 so Electrolab doesn't seem too far. Maybe I will try to come by when I'll back in Paris.

Last edited by lutcheti (2015-07-11 23:27:48)

Offline

#50 2015-07-11 23:25:25

lutcheti
Contributor
Registered: 2015-05-21
Posts: 30

Re: Flashing Issues

Just in case, when I cloned the main repository on Github, the last commit SHA-1 is 5330f53.

Offline

Board footer

Powered by FluxBB