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

Flashing using Eclipse

Hi

I have setup and configured Eclipse using the tutorial and all seems to be good, except, I cant flash the binary to the chip. Here is my error when calling flash:

  • Flashing: _build/nrf52840_xxaa.hex
  • nrfjprog --program _build/nrf52840_xxaa.hex -f nrf52 --sectorerase
  • ERROR: Invalid argument provided: -f.
  • Makefile:234: recipe for target 'flash' failed

I'm using the following

  • IC: nRF52840
  • Softdevice: S140 SDK: nRF5_SDK_13.0.0_04a0bfd
  • Example as base: ble_app_hrs_c
  • IDE: Eclipse + GCC

Please help

Thanks

Parents
  • FormerMember
    0 FormerMember

    Do you have version 9.5.0 of nrfjprog? In nrfjprog 9.5.0, automatic detection of the device's family has been added, for automatic detection, the family name "UNKNOWN" should be used:

    nrfjprog --program _build/nrf52840_xxaa.hex  --sectorerase -f UNKNOWN
    

    Could you check if that works?

  • For what its worth, I changed the -f UNKNOWN to --family UNKNOWN (I just thought what the heck), it then continues on to give the same error for --sectorerase: ERROR: Invalid argument provided: --sectorerase

    As a matter of fact, simply changing nrfjprog --program $< -f UNKNOWN --sectorerase to nrfjprog --program $< --sectorerase -f UNKNOWN in the makefile, throws the same error from -f to --sectorerase:

    nrfjprog --program _build/nrf52840_xxaa.hex --sectorerase -f UNKNOWN 
    

    ERROR: Invalid argument provided: --sectorerase.

Reply
  • For what its worth, I changed the -f UNKNOWN to --family UNKNOWN (I just thought what the heck), it then continues on to give the same error for --sectorerase: ERROR: Invalid argument provided: --sectorerase

    As a matter of fact, simply changing nrfjprog --program $< -f UNKNOWN --sectorerase to nrfjprog --program $< --sectorerase -f UNKNOWN in the makefile, throws the same error from -f to --sectorerase:

    nrfjprog --program _build/nrf52840_xxaa.hex --sectorerase -f UNKNOWN 
    

    ERROR: Invalid argument provided: --sectorerase.

Children
No Data
Related