Comments: nRF52840 Advanced Development With the nRF5 SDK

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • In the end of the tutorial, the make command is used to build the project, but make is not natively available on windows? Could you perhaps add make to the list of tools/programs required, as well as instructions for how to install?

    • I was also looking how to install make in Win OS and I found this useful guide https://learn.adafruit.com/windows-tools-for-the-electrical-engineer/avr-toolchain

  • I know this may be really stupid but can someone elaborate on the add to PATH part? I'm having an error with arduino where it says "exec: "adafruit-nrfutil": executable file not found in $PATH" I'm on ubuntu 20.06 by the way

  • If you're having trouble with the ble blinking example, read through this forum post: https://forum.sparkfun.com/viewtopic.php?f=114&t=49541&hilit=nRF52840

    The memory lines in the tutorial are wrong. Common sparkfun, edit your tutorial please!! This is correct:

    MEMORY { FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xda000 RAM (rwx) : ORIGIN = 0x200022e0, LENGTH = 0x3dd20 }

    • Hey there, thanks for pointing this out! Unfortunately, the engineer on this product recently left and I think this might have slipped through the cracks in the transition. This is a little outside of my area of expertise and I don't have a board to verify the changes and update the tutorial properly; however, I'll at least add a note in the tutorial under the Tips and Tricks section directing users to your forum post in the meantime.

      In case you find issues on other tutorials, there is a link at the bottom of this comments section for tutorial feedback, like this, that will be sent directly to the documentation team. Currently, out system only sends emails on comments to the associated author(s)... luckily, I just happened to come across your comment. Happy hacking.

  • Hello, I've followed the tutorial and got stuck on several points like some of the posters before. That's why I wanted to share my experience in how I solved the issues.

    First there is a mistake in the tutorial. In the text is mentioned to replace the target board with D_BOARD_SPARKFUN_NRF52840_MINI. The first underscore is wrong, it should be DBOARD_SPARKFUN_NRF52840_MINI as is correctly stated in the code lines below the paragraph.

    Next, when typing a "make" in the terminal, make sure you're in the correct directory in the terminal. That's not stated in the tutorial but the terminal should be something like blinky\sparkfun_nrf52840_mini\blank\armgcc>

    Then as to the errors during a make. You should make sure that the environment variable "path" contains all the required paths to the necessary files. The visual studio code terminal is somewhat limited. I got more informative results when using the command prompt.

    I had an issue that the _build directory was not created. When I created it manually, the make could continue and resulted in a Error -1073741515 for me. Which is a general Windows error to indicate a missing file. The window command prompt then told me that the missing file was msys-intl-8.dll. I don't know what, where or whatever. Installing MingGW and installing the msys-base.bin package (and then pointing to the bin folder in the path environment variable) solved all make issues for me.

    • Fixed the typo. I think that is covered in the VS code and Building Blinky section of the tutorial, but I'll add some tips for adding system paths as well.

  • I followed the tutorial step by step but while compiling the application using Make I am running into these errors. I am trying to work on BLE_APP_BLINKY app.

    Makefile:281: Cannot find source file: ../../../../../../components/libraries/log/src/nrf_log_backend_rtt.c Makefile:281: Cannot find source file: ../../../../../../components/libraries/log/src/nrf_log_backend_serial.c Makefile:281: Cannot find source file: ../../../../../../components/libraries/log/src/nrf_log_backend_uart.c Makefile:281: Cannot find source file: ../../../../../../components/libraries/log/src/nrf_log_default_backends.c Makefile:281: Cannot find source file: ../../../../../../components/libraries/log/src/nrf_log_str_formatter.c Makefile:281: Cannot find source file: ../../../../../../components/libraries/util/app_error_handler_gcc.c Makefile:281: Cannot find source file: ../../../../../../components/libraries/hardfault/hardfault_implementation.c
    Makefile:281: Cannot find source file: ../../../../../../components/libraries/experimental_section_vars/nrf_section_iter.c Makefile:281: Cannot find include folder: ../../../../../../components/nfc/ndef/conn_hand_parser/le_oob_rec_parser Makefile:281: Cannot find include folder: ../../../../../../components/nfc/ndef/connection_handover/le_oob_rec Makefile:281: Cannot find include folder: ../../../../../../components/nfc/ndef/conn_hand_parser/ble_oob_advdata_parser Makefile:281: Cannot find include folder: ../../../../../../components/nfc/ndef/connection_handover/ble_oob_advdata Makefile:281: Cannot find include folder: ../../../../../../components/nfc/ndef/connection_handover/ble_pair_msg Makefile:281: Cannot find include folder: ../../../../../../components/nfc/ndef/connection_handover/ep_oob_rec Makefile:281: Cannot find include folder: ../../../../../../components/nfc/ndef/connection_handover/ble_pair_lib Makefile:281: Cannot find include folder: ../../../../../../components/nfc/ndef/conn_hand_parser/ac_rec_parser Compiling file: nrf_log_backend_rtt.c arm-none-eabi-gcc: error: ../../../../../../components/libraries/log/src/nrf_log_backend_rtt.c: No such file or directory arm-none-eabi-gcc: fatal error: no input files compilation terminated. ../../../../../../components/toolchain/gcc/Makefile.common:272: recipe for target '_build/nrf52840_xxaa/nrf_log_backend_rtt.c.o' failed make: *** [_build/nrf52840_xxaa/nrf_log_backend_rtt.c.o] Error 1

    Anyone having any idea on how to solve these compilation errors? Thank you!

    • Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you (just a heads up, this method might be outside the scope of their support capabilities).

  • when I typed - make bootload SERIAL_PORT=COM5 , i got the following problem:

    Packaging _build/nrf52840_xxaa.hex adafruit-nrfutil dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application _build/nrf52840_xxaa.hex _build/dfu-package.zip process_begin: CreateProcess(NULL, adafruit-nrfutil dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application _build/nrf52840_xxaa.hex _build/dfu-package.zip, ...) failed. make (e=2): The system cannot find the file specified. Makefile:152: recipe for target 'dfu-package' failed make: *** [dfu-package] Error 2

    any ideas how to solve it ???

    • Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you (just a heads up, this method might be outside the scope of their support capabilities).

  • I converted the hex file to uf2 file using the following command: python uf2conv.py -f 0xADA52840 -c -o _build/nrf52840_xxaa.uf2 _build/nrf52840_xxaa.hex. But when i drag and drop the uf2 file into the nrf52840 device the nrf52840 resets. I am not able to program the nrf52840 using this method.Kindly help.

    • Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you (just a heads up, this method might be outside the scope of their support capabilities).

  • I followed the tutorial step by step but when i run this following command I get the following errors,Kindly guide how to solve it.

    C:\nRF5\nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_blinky\sparkfun_nrf52840_mini\s140\armgcc>mingw32-make bootload SERIAL_PORT=COM23 Packaging _build/nrf52840_xxaa.hex

    adafruit-nrfutil dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application _build/nrf52840_xxaa.hex _build/dfu-package.zip process_begin: CreateProcess(NULL, adafruit-nrfutil dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application _build/nrf52840_xxaa.hex _build/dfu-package.zip, ...) failed.

    make (e=2): The system cannot find the file specified.

    Makefile:304: recipe for target 'dfu-package' failed

    mingw32-make: *** [dfu-package] Error 2

    • Hi,

      I had the same issue until I added the path of adafruit-nrfutil to my environment path of windows, following this :

      https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/

      Hope it helped.

      • Hi,

        I understand what you did but I think I am looking to wrong files. Where was your adafruit installed? And how did you installed?

        Thanks in advance!

        • I spent 3 hours of debugging but I finally resolved the issue.. I had a problem with my python interpreter executing adafruit-nrfutil and after hours of messing with my path it still doesn't work (my guess is that I have multiple pythons installed so pip3 keeps installing it to the wrong directory).

          SO what I did was to just download the adafruit-nrfutil.exe file directly from Adafruit and copied it in the .../blank/armgcc/ folder which worked: https://github.com/adafruit/Adafruit_nRF52_nrfutil/releases/tag/$(APPVEYOR_REPO_TAG_NAME)

          • If you do this you have to change the last 2 makefile commands too now to be adafruit-nrfutil.exe instead of just adafruit-nrfutil

            dfu-package: $(OUTPUT_DIRECTORY)/nrf52840_xxaa.hex @echo Packaging $< adafruit-nrfutil.exe dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application $< _build/dfu-package.zip

            bootload: $(OUTPUT_DIRECTORY)/nrf52840_xxaa.hex dfu-package @echo Flashing: $< adafruit-nrfutil.exe --verbose dfu serial --package _build/dfu-package.zip -p $(SERIAL_PORT) -b 115200 --singlebank --touch 1200

  • Hi, I've been over the article/tutorial several time and checked everything. I'm using VS and attempting to load the Blinky App. However, when i run 'make' I get the following error:

    make: *** No targets specified and no makefile found. Stop.

    I'm using a MacBook with Mojave.

    • If you are using Vscode to do this, using Tabs doesn't indent your code, instead, use a text editor ( Notepad++) for example, to manually change the MakeFile file , and add the indents yourself.

    • Found the answer, beware spaces vs tabs in Makefile


If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!