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

nrfjprog version: 9.7.3 fails nrftool success

ruuvi is connected to ruuvi dev board to Nordic dev board connected to Mac book pro.

As usual

nrfjprog --family nrf52 --sectoranduicrerase --program  ruuvitag_b/s132/armgcc/_build/ruuvi_firmware.hex
 --verify --reset

But

SDH:INFO:sd_ble_enable: RAM START at 0x20002c00

SDH:warning:sd_ble_enable: app_ram_base should be adjusted to 0x20002798

SDH:warning:ram size should be adjusted to 0xd868

nrfjprog version: 9.7.3

JLinkARM.dll version: 6.33a

+++++++++ So. ++++++

nrfutil pkg generate --hw-version 52                 \

--sd-req 0x91                                         \

--debug-mode                                         \

--key-file ../../keys/ruuvi_open_private.pem         \

--application ruuvitag_b/s132/armgcc/_build/ruuvi_firmware.hex \      $zipname.zip

Email to iPhone, nRFtoolbox DFU and after many

INFO:Sending CRC

...

INFO:Inside main

:INFO:In nrf_bootloader_init

:INFO:In real nrf_dfu_init

:INFO:running nrf_dfu_settings_init

:INFO:Enter nrf_dfu_continue

:INFO:Valid App

:INFO:Enter nrf_dfu_app_is_valid

:INFO:Return true. App was valid

:INFO:Enter nrf_dfu_app_is_valid

My app runs fine !

  • Hi,

    What exactly is the question?

    If you are concerned about the SDH:warning then this comes from the initialization of the SoftDevice, and is the method the SoftDevice use to let you know how much RAM is needed by the SoftDevice for the current configuration, and consequently how much RAM is available to the application. The warning will disappear if you adjust the RAM start and size in your projects/linker settings.

  • Sorry. The questions ARE:

    1) Why does flash via nrfjprog produce an unusable part?
    PS It's not a "WARNING" if the application is not executed,
    It's CRITICAL!

    2) Why is there a difference when using nrftools succeeds?

    Additional information: After removing the most recently added code and re compiling, 
    nrfjprog returns the same error. Regressing to a previously successfully flashed source and still nrfjprog fails. It was not until flash via nrftools DFU that I was able to use nrfjprog to flash the part!

    Do you need any additional information?

  • I still lack enough details to understand what is actually going on here, but I will try to answer as best I can.

    dgerman said:
    1) Why does flash via nrfjprog produce an unusable part?

    You should not get an unusable part when you program with nrfjprog. That will write your hex files to flash exactly as they are. One thing you need to remember though, is that if you use a bootloader then you also have to program a valid bootloader settings page. If not, the bootloader will not know that there is a valid application in place and it will not start the application. If you program the application via DFU the bootloader will write this for you, but if you want it to work out of the box you have to program it yourself (using e.g. nrfjprog). You can generate it using nrfutil.

    dgerman said:
    PS It's not a "WARNING" if the application is not executed,
    It's CRITICAL!

    This warning does not have any effect if your application has configured a higher start address and lower size than specified in the printout. If your application uses a lower start address and/or larger size, then you will get problems. In any case you simply just have to adjust your linker/project settings according to the warning.

    dgerman said:
    2) Why is there a difference when using nrftools succeeds?

    What do you mean by "nrftools"? Please be more specific in what you are doing when it fails and when it works. I cannot give a proper answer without knowing exactly what you are doing.

    dgerman said:
    Do you need any additional information?

     Yes. Please explain in detail what and how you are doing things, and how it does not work as expected.

  • Thank you for your explanation.

    Sorry (can you revise the title to be nrftoolbox?)

    As I tried to describe in the original  statement:

    "Email to iPhone, nRFtoolbox DFU"

    Using nRFtoolbox for IOS using iPhone with the same hex file flash is successful and application works correctly.

    I believe that with the options I have used, neither nrfjprog nor iOS nrftoolbox is programing the boot loader so the same Bootloader trying to launch the application.

  • dgerman said:
    I believe that with the options I have used, neither nrfjprog nor iOS nrftoolbox is programing the boot loader so the same Bootloader trying to launch the application.

    Even if you have the exact same bootloader it will not launch the application if the bootloader settings page is not valid. Note that this is not part of the bootloader .hex file, as it depend on the application (hash). It will not be valid unless you either 1) generate a valid bootloader settings page using nrfutil and program it using e.g. nrfjprog or 2) upload the application via DFU.

    (I still don't know if this is the problem you are seeing though, as you have not provided a detailed description on what fails and how.)

Related