sparkfun / nRF52832_Breakout

Breakout board for the Nordic nRF52832, a BLE/ANT/2.4GHz, Cortex-M4F SoC.
Other
74 stars 39 forks source link

Compiling bootloader from scratch #10

Open TamojitSaha opened 5 years ago

TamojitSaha commented 5 years ago

I followed the exact steps mention to compile the bootloader. I also installed GnuMake. I am using 8 2018-q4-major version as ARM GCC ToolChain. Platform: Windows 10 PATH variables are also added and can be accessed by CMD.

Whenever I run make sfe_nrf52832_dfu, I get the following error:

E:\Projects\nRF52832_Breakout\Firmware\bootloader-custom>make sfe_nrf52832_dfu
Compiling file: app_error.c
process_begin: CreateProcess(NULL, "C:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q1/bin/arm-none-eabi-gcc" -DNRF52 -DBOARD_CUSTOM -DNRF52_PAN_12 -DNRF52_PAN_15 -DNRF52_PAN_58 -DNRF52_PAN_55 -DNRF52_PAN_54 -DNRF52_PAN_31 -DNRF52_PAN_30 -DNRF52_PAN_51 -DNRF52_PAN_36 -DNRF52_PAN_53 -D__HEAP_SIZE=0 -DS132 -DCONFIG_GPIO_AS_PINRESET -DBLE_STACK_SUPPORT_REQD -DBSP_DEFINES_ONLY -DSWI_DISABLE0 -DNRF52_PAN_20 -DNRF52_PAN_64 -DSOFTDEVICE_PRESENT -DNRF52_PAN_62 -DNRF52_PAN_63 -mcpu=cortex-m4 -mthumb -mabi=aapcs --std=gnu99 -Wall -Werror -Os -g3 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -I ./config/dfu_dual_bank_serial_s132_pca10040 -I ./config -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu/hci_transport -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/bootloader_dfu -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/scheduler -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/config -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/examples/bsp -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/delay -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/crc16 -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/softdevice/s132/headers/nrf52 -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/util -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/pstorage -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/uart -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/ble/common -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/hci/config -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/uart -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/device -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/hci -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/timer -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/softdevice/s132/headers -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/toolchain/CMSIS/Include -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/hal -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/toolchain/gcc -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/toolchain -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/common -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/softdevice/common/softdevice_handler -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/simple_timer -I E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/drivers_nrf/timer -c -o _build/app_error.o E:/Projects/Nrf52832_SDK/nRF5_SDK_11.0.0_89a8197/components/libraries/util/app_error.c, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [_build/app_error.o] Error 2

I also do not understand how 4.9 2015q1 version is taken while compiling. I have a different version installed and added to PATH

Please help me debug the problem. If there is anything more information to be provided, I will be glad to do so.

beegee-tokyo commented 5 years ago

You need to edit the Makefile and change the lines 39 and 40 to match the path to your GNU tools.

For me they look like:

PROGFILES = B:/DevTools
GNU_INSTALL_ROOT = $(PROGFILES)/GNU Tools ARM Embedded/8 2018-q4-major

But even with that make failed for me while linking with

Linking target: feather52832_bootloader.out
Preparing: feather52832_bootloader.hex feather52832_bootloader_6.0.0_s132.hex
B:\DevTools\GNU Tools ARM Embedded\8 2018-q4-major\bin\arm-none-eabi-objcopy.exe: _build/feather52832_bootloader.hex 64-bit address 0x4b4fa300074000 out of range for Intel Hex file
B:\DevTools\GNU Tools ARM Embedded\8 2018-q4-major\bin\arm-none-eabi-objcopy.exe:_build/feather52832_bootloader.hex: bad value
make[2]: *** [Makefile:319: genhex] Error 1
make[1]: *** [Makefile:284: feather52832] Error 2
make: *** [Makefile:247: all] Error 2

Still trying to figure out why.