Proxmark/proxmark3

Windows build error in bootrom.c

Opened this issue · 8 comments

Hi,

I have been trying to build proxmark3 project under Windows 10 but I am getting the following syntax errors in bootrom.c (it is mainly array out of bound error)

make[1]: Leaving directory '/pm3/client'
make -C bootrom  all
make[1]: Entering directory '/pm3/bootrom'
perl ../tools/mkversion.pl .. > version.c || cp ../common/default_version.c version.c
arm-none-eabi-gcc -c -I../include -I../common -I. -Wall -Werror -pedantic -std=c99 -I. -Os -mthumb -mthumb-interwork -o obj/version.o version.c
arm-none-eabi-gcc -c -I../include -I../common -I. -Wall -Werror -pedantic -std=c99 -I. -Os -mthumb-interwork -o obj/ram-reset.o ram-reset.s
arm-none-eabi-gcc -c -I../include -I../common -I. -Wall -Werror -pedantic -std=c99 -I. -Os -mthumb-interwork -o obj/flash-reset.o flash-reset.s
arm-none-eabi-gcc -c -I../include -I../common -I. -Wall -Werror -pedantic -std=c99 -I. -Os -mthumb-interwork -o obj/string.o string.c
arm-none-eabi-gcc -c -I../include -I../common -I. -Wall -Werror -pedantic -std=c99 -I. -Os -mthumb -mthumb-interwork -o obj/usb_cdc.o ../common/usb_cdc.c
arm-none-eabi-gcc -c -I../include -I../common -I. -Wall -Werror -pedantic -std=c99 -I. -Os -mthumb -mthumb-interwork -o obj/bootrom.o bootrom.c
bootrom.c: In function 'UsbPacketReceived':
bootrom.c:122:20: error: array subscript 'uint32_t {aka long unsigned int}[0]' is partly outside array bounds of 'char[1]' [-Werror=array-bounds]
  122 |           flash_mem[i] = c->d.asDwords[i];
      |           ~~~~~~~~~^~~
bootrom.c:22:43: note: object '_flash_start' of size 1
   22 | extern char _bootrom_start, _bootrom_end, _flash_start, _flash_end;
      |                                           ^~~~~~~~~~~~
bootrom.c:114:10: error: array subscript 'uint32_t {aka volatile long unsigned int}[0]' is partly outside array bounds of 'char[1]' [-Werror=array-bounds]
  114 |         p[i+arg0] = c->d.asDwords[i];
      |         ~^~~~~~~~
bootrom.c:22:43: note: object '_flash_start' of size 1
   22 | extern char _bootrom_start, _bootrom_end, _flash_start, _flash_end;
      |                                           ^~~~~~~~~~~~**
cc1.exe: all warnings being treated as errors
make[1]: *** [../common/Makefile.common:82: obj/bootrom.o] Error 1

make[1]: Leaving directory '/pm3/bootrom'
make: *** [Makefile:29: bootrom/all] Error 2

I got exactly the same error...

Hi @chopinwong01,

It seems that I was trying to install an incorrect version of proxmark3. Here is the github repo that I tried and successfully built it on my widows machine.

https://github.com/RfidResearchGroup/proxmark3

Hi @hakeila .

I tried the iceman build with the PM3-generic platform setting, all works fine.
Thanks, mate.

@chopinwong01 glad to know that it worked for you.

You are most welcomed :)

FYI:
The changes from @crazyquark's commit solved the issue.
=> ee8491b

Same probleme

This is not only a windows issue, it happens on Linux as well. It is solved just by modifying a couple of lines in the code as @Peter-x000x has mentioned. Ty

FYI: The changes from @crazyquark's commit solved the issue. => ee8491b

It's worked for me.