This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error while trying to build example project using command prompt and GCC

Hi there,

I've been trying to figure this one out for a day or so now with no luck.

I'm successfully able to build and program using Segger Embedded Studio, but I would prefer to work in Eclipse.

I have followed this tutorial while trying to get everything setup and working in Eclipse: https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/development-with-gcc-and-eclipse

The problem I'm having is that I am unable to get any example projects to successfully build with the 'make' command through the command prompt.

The error I am getting is as follows:

C:\nRF5_SDK_15.3.0_59ac345\examples\peripheral\blinky\pca10056\blank\armgcc>make
mkdir _build
cd _build && mkdir nrf52840_xxaa
Assembling file: gcc_startup_nrf52840.S
Compiling file: nrf_log_frontend.c
Compiling file: nrf_log_str_formatter.c
Compiling file: boards.c
Compiling file: app_error.c
Compiling file: app_error_handler_gcc.c
Compiling file: app_error_weak.c
Compiling file: app_util_platform.c
Compiling file: nrf_assert.c
Compiling file: nrf_atomic.c
Compiling file: nrf_balloc.c
Compiling file: nrf_fprintf.c
Compiling file: nrf_fprintf_format.c
Compiling file: nrf_memobj.c
Compiling file: nrf_ringbuf.c
Compiling file: nrf_strerror.c
Compiling file: nrfx_atomic.c
Compiling file: main.c
Compiling file: system_nrf52840.c
Linking target: _build/nrf52840_xxaa.out
      0 [main] sh.exe" 11484 sync_with_child: child 18428(0x3B28) died before initialization with status code 0xC0000142

   1346 [main] sh.exe" 11484 sync_with_child: *** child state waiting for longjmp
"C:/Program Files/WinAVR-20100110/utils/bin/sh.exe": fork: Resource temporarily unavailable
make[306]: *** [_build/nrf52840_xxaa.out] Error 128
make[305]: *** [_build/nrf52840_xxaa.out] Error 2
make[304]: *** [_build/nrf52840_xxaa.out] Error 2
...
make[2]: *** [_build/nrf52840_xxaa.out] Error 2
make[1]: *** [_build/nrf52840_xxaa.out] Error 2
make: *** [_build/nrf52840_xxaa.out] Error 2

I did find this post in the Nordic Dev Zone where the person asking for help had a very similar error: https://devzone.nordicsemi.com/f/nordic-q-a/37631/trying-to-build-project-with-gcc-but-comes-to-this-error-message

I have tried all the suggestions in that post which seemed to have to work, but they haven't worked for me.

Any help would be greatly appreciated.

Thanks

Jordan

Parents
  • Thanks very much for that blog reference 

    I did however stumble across another Tutorial which helped me solve my problem: https://www.disk91.com/2017/technology/hardware/discover-nordic-semi-nrf52832/

    I'm not sure if this is common knowledge, but I didn't realize that you also have to download the 'GNU-Make Utility' and 'GNU-Core Utilities' and then merge them with your GNU Tools folder. After doing this I was able to successfully build the nRF "blinky" example through the command prompt with the "make" command. I also changed the GNU Tools version I was using from "8.2.1" to "7.3.1", as I was getting an additional error when using 8.2.1.

    For anyone who might be getting a similar error, my working setup is as follows:

    Operating System: Windows 7 64-Bit

    GNU Toolchain version and path: "C:\nRF52\GNU Tools ARM Embedded\7 2018-q2-update\"

    nRF SDK version and path: "C:\nRF52\nRF5_SDK_15.3.0_59ac345\"

    Included in System Environment Variable "Path": C:\nRF52\GNU Tools ARM Embedded\7 2018-q2-update\bin;

    Makefile.windows: 

    GNU_INSTALL_ROOT := C:\nRF52\GNU Tools ARM Embedded\7 2018-q2-update/bin/
    GNU_VERSION := 7.3.1
    GNU_PREFIX := arm-none-eabi

Reply
  • Thanks very much for that blog reference 

    I did however stumble across another Tutorial which helped me solve my problem: https://www.disk91.com/2017/technology/hardware/discover-nordic-semi-nrf52832/

    I'm not sure if this is common knowledge, but I didn't realize that you also have to download the 'GNU-Make Utility' and 'GNU-Core Utilities' and then merge them with your GNU Tools folder. After doing this I was able to successfully build the nRF "blinky" example through the command prompt with the "make" command. I also changed the GNU Tools version I was using from "8.2.1" to "7.3.1", as I was getting an additional error when using 8.2.1.

    For anyone who might be getting a similar error, my working setup is as follows:

    Operating System: Windows 7 64-Bit

    GNU Toolchain version and path: "C:\nRF52\GNU Tools ARM Embedded\7 2018-q2-update\"

    nRF SDK version and path: "C:\nRF52\nRF5_SDK_15.3.0_59ac345\"

    Included in System Environment Variable "Path": C:\nRF52\GNU Tools ARM Embedded\7 2018-q2-update\bin;

    Makefile.windows: 

    GNU_INSTALL_ROOT := C:\nRF52\GNU Tools ARM Embedded\7 2018-q2-update/bin/
    GNU_VERSION := 7.3.1
    GNU_PREFIX := arm-none-eabi

Children
No Data
Related