7 years, 8 months ago.

Struct "<unnamed>" has no field "NRFFW"

Hi!

Today I start getting this error when comiling

Error: Struct "<unnamed>" has no field "NRFFW" in "nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/fstorage/fstorage_config.h", Line: 85, Col: 49 Warning: Argument of type "const uint32_t *" is incompatible with parameter of type "void *" in "nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/fstorage/fstorage.c", Line: 469, Col: 27 Info: Unable to download. Fix the reported errors...

However nothing changed since yesterday, and that is the same for all projects, event those that I haven't change since weeks.

Any ideas?

Question relating to:

The nRF51822-mKIT is a low cost ARM mbed enabled development board for Bluetooth® Smart designs with the nRF51822 SoC. The kit gives access to all GPIO pins via pin headers …

Just started happening to me today as well...any project I had working yesterday is now failing to compile with this same message.

posted by Hunter Downs 21 Jul 2016

Anything that uses the nrf51-sdk version of the nRF51822 library won't compile...even tried a whole new profile.

posted by Hunter Downs 21 Jul 2016

Same here. projects do not compile anymore on nrf51-dk or blenano

posted by Shay Ohayon 22 Jul 2016

Same here for all my nrf51 based projects. There are no recent changes to the nRF51822 library so is this compiler depended?

posted by Jens Strümper 22 Jul 2016

The same error for me.

posted by Eduardo Paris 22 Jul 2016

Someone had this same error 4 months ago and a solution was given: https://developer.mbed.org/questions/68259/nRF51822-library-not-compiling/

posted by Juan Pechiar 22 Jul 2016

In the meantime, I did what is proposed there, but I think this is not an explanation on why one day it works, and the day after it doesn't.

posted by Daniel MAIORANO 22 Jul 2016

This has also begun happening to my projects too, exact same code that compiled fine 1 week ago. Using the nRF51822 (not 51-dk) target. Some other BLE & 51822-based projects still in my mbed workspace that rely on older nRF51822 versions still work fine though...

posted by CJ Shaw 22 Jul 2016

Could it be something to do with some silent update to the nRF target definitions perhaps...? These are not really accessible in the mbed-classic view but are maintained by the mBed-OS side of things now I believe...

posted by CJ Shaw 22 Jul 2016

3 Answers

-deleted-
7 years, 8 months ago.

Hi All,

Thank you for the bug report.

Cause 1: There is a duplicate nrf51.h in the codebase - one in the nordic-sdk and one in the mbed library. Usually these are in sync, but unfortunately the one in the mbed library hasn't been updated in a while. In the meantime the one in the nordic-sdk is has been updated regularly.

Cause 2: We've just upgraded the mbed build system and among many improvements (that will be announced soon), we've added consistent include path behavior, meaning that all include paths are now passed in alphabetical sort order. Before the latest build system update nrf51.h was picked from the /nrf51822 folder, and now it's picked from /mbed due to the alphabetical sorting (mbed is before nrf51822).

Quick Fix: Edit nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/fstorage/fstorage_config.h and remove:

    uint32_t const bootloader_addr = NRF_UICR->NRFFW[0];
    return  ((bootloader_addr != FS_EMPTY_MASK) ?
             bootloader_addr : NRF_FICR->CODESIZE * FS_PAGE_SIZE);

Should be around line 85.

Future Fix: Soon we will update the nrf51.h in the mbed library releases which will contain the missing UICR types

Hope this helps.

Cheers,
Mihail

Accepted Answer

this solution is similar to theone proposed 4 months ago, and it's working fine. Thanks a lot for the work you're doing, maybe as an improvement, you may consider publishing somewhere the different changes that are made, just to be aware of the things that could stop working. Probably this information is already posted somawhere?

Cheers, and once gain: great job:

posted by Daniel MAIORANO 24 Jul 2016

Same problem. "Quick Fix" does not seem to work. I can't develop code anymore. When might the new library be released?

posted by Steven Getz 28 Jul 2016
7 years, 8 months ago.

same problem here ... can't compile the same library that was working last week