Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build error in bootrom.c #1004

Open
BQTHake003 opened this issue Nov 7, 2022 · 8 comments
Open

Windows build error in bootrom.c #1004

BQTHake003 opened this issue Nov 7, 2022 · 8 comments

Comments

@BQTHake003
Copy link

BQTHake003 commented Nov 7, 2022

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
@chopinwong01
Copy link

I got exactly the same error...

@BQTHake003
Copy link
Author

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

@chopinwong01
Copy link

Hi @hakeila .

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

@BQTHake003
Copy link
Author

@chopinwong01 glad to know that it worked for you.

You are most welcomed :)

@Peter-x000x
Copy link

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

@meditant
Copy link

Same probleme

@acasanova99
Copy link

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

@ZHJ0125
Copy link

ZHJ0125 commented May 15, 2024

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

It's worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants