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

Wrong initialization value in static variables

Hi,

I'm developing a node based on the nRF52840-QIAA rev. B.

I'm using Eclipse Neon and GCC-toolchain for coding. Softdevice is S140 5.0.0.2 alpha and SDK is V14.2.

For Debugging I'm using an PCA10056 (nRF52840 PDK).

I'm always running into Error as soon as i try to interact with the softdevice. For example when calling nrf_sdh_enable_request().

While Debugging I've noticed that static variables like m_nrf_sdh_enabled (which is of type bool) don't seem to get initialized correctly.

Instead of "false", the value is an integer value. Depending on the configurations in sdk_config.h or the settings in the linker script for RAM start adress, this value changes.

Is this a Problem with the settings in linker script or what could it be?

Note: I'm using the default linkerscript provided in the examples library from ble_peripheral/ble_app_template 

Thanks for your help and advises!

Dominic

Parents
  • Hello,

    I do not have a solution for you problem, but hopefully someone here in the open forum have experienced the same and may help you.

    I would like to make a recommendation in general, because I see many issues using Eclipse, such as:

    • Issues to integrate toolchain in Eclipse
    • Issues setup debugging in Eclipse
    • Issues setup project settings in Eclipse

    Most of issues are caused by Eclipse is not natively support in nRF5 SDK, and there is no plan to do so.

    So instead, have you considered using SEGGER Embedded Studio (SES) for development?

    Latest nRF5 SDK releases do support SES and some of the advantages using SES are:

    • SDK examples are setup with SES projects ready to compile and run
    • Debugger is integrated
    • GCC compiler
    • Multi-platform (Linux, Windows, OSX)
    • No code limitations using nRF devices for development

    For more information, also check out: https://www.segger.com/products/development-tools/embedded-studio/

    Best regards,
    Kenneth

Reply
  • Hello,

    I do not have a solution for you problem, but hopefully someone here in the open forum have experienced the same and may help you.

    I would like to make a recommendation in general, because I see many issues using Eclipse, such as:

    • Issues to integrate toolchain in Eclipse
    • Issues setup debugging in Eclipse
    • Issues setup project settings in Eclipse

    Most of issues are caused by Eclipse is not natively support in nRF5 SDK, and there is no plan to do so.

    So instead, have you considered using SEGGER Embedded Studio (SES) for development?

    Latest nRF5 SDK releases do support SES and some of the advantages using SES are:

    • SDK examples are setup with SES projects ready to compile and run
    • Debugger is integrated
    • GCC compiler
    • Multi-platform (Linux, Windows, OSX)
    • No code limitations using nRF devices for development

    For more information, also check out: https://www.segger.com/products/development-tools/embedded-studio/

    Best regards,
    Kenneth

Children
  • Hi Kenneth,

    Toolchain and Debugging are working fine with my Eclipse setup.

    I have some code which is executed before interfacing with the softdevice and this part is running fine and can be debugged without any Problems.

    Thanks for the hint about SES. I'll check this out as soon as possible. But I would still prefer to get the code working within Eclipse, as this IDE is used also for other Projects in our Company.

    Best regards,

    Dominic

Related