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

Compile error DFU OTA 52832 - SUPPRESS_INLINE_IMPLEMENTATION

I have DFU OTA application running on 52840 platform on a custom board. SDK v15.3.0. I use SoftDevoce S140 v6.1.1.

Then I need to port it to 52832 platform - SoftDevice S132 v6.1.1. Same, SDK 15.3.0.

I changed the crypto to use micro_ecc, and disabled UART1 and also UARTE1, and re-ordered the path and include.

However, I kept getting this compilation error:

"C:\NRF52832\sDevice\V6_11\s132\include\nrf_nvic.h", line 290: Error:  #40: expected an identifier
    int pm = __get_PRIMASK();
           ^
"C:\NRF52832\sDevice\V6_11\s132\include\nrf_nvic.h", line 292: Error:  #117: non-void function "__sd_nvic_irq_disable"  should return a value
    return pm;
             ^

I foudn that by using SUPPRESS_INLINE_IMPLEMENTATION directive, I can get rid of that error.

However, another error appears:

"C:\NRF52832\SDK\V15_3_0\MODULES\nrfx\soc/nrfx_coredep.h", line 96: Error:  #114: function "nrfx_coredep_delay_us"  was referenced but not defined
  __STATIC_INLINE void nrfx_coredep_delay_us(uint32_t time_us);
                       ^
"C:\NRF52832\SDK\V15_3_0\MODULES\nrfx\hal\nrf_gpio.h", line 233: Error:  #114: function "nrf_gpio_cfg_sense_input"  was referenced but not defined
  __STATIC_INLINE void nrf_gpio_cfg_sense_input(uint32_t             pin_number,
                       ^
"C:\NRF52832\SDK\V15_3_0\MODULES\nrfx\hal\nrf_gpio.h", line 308: Error:  #114: function "nrf_gpio_pin_read"  was referenced but not defined
  __STATIC_INLINE uint32_t nrf_gpio_pin_read(uint32_t pin_number);
                           ^
"C:\NRF52832\SDK\V15_3_0\MODULES\nrfx\hal\nrf_power.h", line 507: Error:  #114: function "nrf_power_resetreas_get"  was referenced but not defined
  __STATIC_INLINE uint32_t nrf_power_resetreas_get(void);
                           ^
"C:\NRF52832\SDK\V15_3_0\MODULES\nrfx\hal\nrf_power.h", line 517: Error:  #114: function "nrf_power_resetreas_clear"  was referenced but not defined
  __STATIC_INLINE void nrf_power_resetreas_clear(uint32_t mask);
                       ^
"C:\NRF52832\SDK\V15_3_0\MODULES\nrfx\hal\nrf_power.h", line 603: Error:  #114: function "nrf_power_gpregret_set"  was referenced but not defined
  __STATIC_INLINE void nrf_power_gpregret_set(uint8_t val);
                       ^
"C:\NRF52832\SDK\V15_3_0\MODULES\nrfx\hal\nrf_power.h", line 610: Error:  #114: function "nrf_power_gpregret_get"  was referenced but not defined
  __STATIC_INLINE uint8_t nrf_power_gpregret_get(void);
                          ^
"C:\NRF52832\SDK\V15_3_0\MODULES\nrfx\hal\nrf_power.h", line 620: Error:  #114: function "nrf_power_gpregret2_set"  was referenced but not defined
  __STATIC_INLINE void nrf_power_gpregret2_set(uint8_t val);
                       ^
"C:\NRF52832\SDK\V15_3_0\MODULES\nrfx\hal\nrf_power.h", line 629: Error:  #114: function "nrf_power_gpregret2_get"  was referenced but not defined
  __STATIC_INLINE uint8_t nrf_power_gpregret2_get(void);
                          ^

  • Hello,

    It sounds like either you have one too many or too few brackets somewhere, or you are missing a file or a define. Take e.g. the nrfx_coredep_delay_us() function. Is it defined somewhere in a .c file in your project? If not, can you include the file where it is located? If you have included it, is it hidden behind an #ifdef guard? If so, try to define what it is missing. 

    If you are stuck, can you zip the project and upload it here? I can try to have a look, but we are very short staffed due to summer holidays, so there may be some extra delay, unfortunately.

    Best regards,

    Edvin

  • Hi Edvin,

    I didn't touch the SDK library at all, I simply included them. A little background, there is a thin layer of our own implementation that will transition to SDK Bootloader. My confusion is, it compiles fine for 52840. What I am aware, the difference between 52832 and 52840 in regard to DFU OTA is the crypto, need to use micro_ecc since 52832 doesn't have CryptoCell 310.

    Unfortunately, due to the thin layer of our own implementation, I don't think I can upload it here. I can share the SDK, but since there is no change in there, I'm not sure it can be of any value.

    Do you suggest to revisit sdk_config.h? I can upload sdk_config,h or any other non-proprietary code. Or do you suggest me to get support from different channel (through FAE perhaps)? I heard we have NDA agreement with Nordic.

  • Take one of the functions that the compiler can't find:

    nrf_power_gpregret_set()

    Is it defined in your project? I don't know what IDE you are using, but let's hope that it is one. If you right click a place where this is called, and click something like "go to definition". Does it find the definition?

    nrf_power_gpregret_set() is defined in nrf_power.h. Is that included in your project? And is it included (#include "nrf_power.h") in the file where this function call is called?

    I see that you changed the folder name "modules" to "MODULES" are the paths in your project changed to reflect this as well? That is, the include directories?

    Can you send me the nrf_power.h file you are using?

    This error:

    "C:\NRF52832\sDevice\V6_11\s132\include\nrf_nvic.h", line 290: Error:  #40: expected an identifier
        int pm = __get_PRIMASK();

    sounds like a macro error. Like you are missing a semi colon or a paranthesis somewhere. Check out what you have above line 290 here. If it is a macro, perhaps it is set up incorrectly.

    There isn't really much to do without looking at the project myself.


    Harry said:
    I heard we have NDA agreement with Nordic.

     That may be. If you need that in order to send, you should check it. I don't have the list of companies we have NDAs with. If you don't have it, I can set you up with our sales team to fix this.

    BR,
    Edvin

  • I see that you changed the folder name "modules" to "MODULES" are the paths in your project changed to reflect this as well? That is, the include directories?

    Does capitalization matter? Function name, yes, but I have never been aware it applies to file name or directory name. I saw the folder name is in lowercase. I use Makefile to compile, not GUI. It was declared in capitals in the Makefile, that's why. But it shouldn't matter, right?

    Btw, the original error was only one, the __get_PRIMASK() one. Only if I add SUPPRESS_INLINE_IMPLEMENTATION then I got the other errors.

    This error:

    "C:\NRF52832\sDevice\V6_11\s132\include\nrf_nvic.h", line 290: Error:  #40: expected an identifier
        int pm = __get_PRIMASK();

    sounds like a macro error. Like you are missing a semi colon or a paranthesis somewhere. Check out what you have above line 290 here. If it is a macro, perhaps it is set up incorrectly

    Everything in C:\NRF52832 is from SDK v15.3.0, as is. And it compiles fine for 52840.

    That may be. If you need that in order to send, you should check it. I don't have the list of companies we have NDAs with. If you don't have it, I can set you up with our sales team to fix this.

    Do I need to create a new DevZone account, using my work email? This account is using my personal email. I will check regarding the NDA, and how do I send the project privately to you?

    Btw, the main diff between compiling this project for 52840 and 52832 is the addition of uECC.h from Git.

  • Harry said:
    Does capitalization matter? Function name, yes, but I have never been aware it applies to file name or directory name. I saw the folder name is in lowercase. I use Makefile to compile, not GUI. It was declared in capitals in the Makefile, that's why. But it shouldn't matter, right?

     Not sure. Depends on the compiler I guess. I see that the examples in the SDKs use lower case, and I thought it was worth a shot:

     

    Harry said:
    Do I need to create a new DevZone account, using my work email? This account is using my personal email. I will check regarding the NDA, and how do I send the project privately to you?

     Not necessarily. You need to create a private ticket here on devzone, if you don't want to share the project in public. In order to create a public ticket, I believe you need to fill in some more details in your profile, such as company name and location. I guess it says when you try to create it. I don't think you need to create a new account, just populate the one you have. It doesn't need to use your work-email account.

    I can't guarantee that we can tell exactly what the issue is by looking at your project, but perhaps we stumble upon the issue. It is rather an armgcc related issue, rather than a Nordic one. But if we have the project, we can have a look. 

    The first thing I would look into is where the __get_PRIMASK() is pointing to in your nRF52840 project, and look for the similar place for nRF52832. This is easier in an IDE, but you can probably find it in the build files somewhere using armgcc.

    BR,
    Edvin

Related