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

Having a problem with Preprocessor options

I need to add ARM_MATH_CM4 to my preprocessor definitions using Segger Embedded Studio.

I know this has been dealt with in "nRF52832: How to Include the "arm_math.h" library"

However, the SES Project->Options in that answers shows a "Preprocesor" selection under "Code".

On my screen for Project->Options under "Code" it only has 4 selection "Build", "File", "General" and "Source Code".

What am missing/failing to do?

-Craig Goldman 

Parents Reply
  • In experimenting I have noted that a new emStudio project that I created using "File->New Project" have all of the Options under "Code" such as"Preprocessor".  The project above and "asset_tracker" was built following the instructions in "Getting Started Assistant" and was built using "File->Open NRF Connect SDK Project".

    Was I supposed to build a new project in SES by first using "File->New Project" and the use ""File->Open NRF Connect SDK Project"?

    -Craig

Children
  • Hi, 

    Do you develop the project on nrf9160 DK? The ARM_MATH_CM4 is suitable for nrf52 with Cortex-M4 instead of nRF9160 (Cortex-M33 inside). arm_math.h also does not support Cortex-M33 now.

    If you try to use the functions from e.g. math.h, you need to set CONFIG_NEWLIB_LIBC=y in the prj.conf.  

    craig.goldman said:
    Was I supposed to build a new project in SES by first using "File->New Project" and the use ""File->Open NRF Connect SDK Project"?

     You should also use one of our example projects as a template. 

    -Amanda 

  • This is a nRF52840 project which I am developing on the nRF52840 DK.  It is based on a previously working nRF52840 project to which we now want to add Zephyr.  At the suggestion of Simon (in a different case) I built this new nRF52840 project by following the instructions in "Getting Started" which lists how to clone Zephyr, the nrf libraries etc.  The project now builds with Zephyr but it will not compile the processing module because of the missing math library.

    I note again, that I also have built the "asset_tracker" project example.  It is working.  As I built it, the project options look like the snap shot I attached above; there is no "Preprocessing" selection under "Code".  So whatever is happening - whatever building step I missed or did incorrectly - is not fixed by starting with a Nordic project as a template.

  • Additional follow-up information

    1) Nordic Semiconductor does not have an example project for an nRF52840 with Zephyr

    2) I ran some new experiments.

    If I build an emStudio project using File->New Project..., I get a project with the full set of "Options" under "Code".  If I then do a "File->Open NRF SDK Connect Project..., these options no longer exist and the project options look like the snap shot attached at the beginning of this case.

    In other words, if I try to get Zephyr into the my project build using "Open NRF SDK Connect Project...", it actually removes the project options and changes the options possibly by changing the Common Configuration file.

    BTW the advice given to me to try and use ""Open NRF SDK Connect Project..." came from Nordic Semi in another one of my case questions about including Zephyr in an nRF52840 project.

    So it looks like I've come full circle on these problems.
    I still need to build an SES project for nRF52840 with Zephyr.

    Should we continue discussion in this case or should I re-open the previous case

  • Sorry, I should have given you the case number.

    Previous questions about nRF52840 and Zephyr are in case id: 225308. 

  • Hi, 

    Please help me confirm that your situation is 

    You want to run Zephyr on nRF52840 DK. Is that right?

    If so, I will suggest to start from 

    1. nRF5x support within the Zephyr Project RTOS
    2. fw-nrfconnect-zephyr

    Then, we might close this thread and start a new case to discuss the developing problems in the future. Please kindly let me know if you have any thought. Thanks.

    -Amanda  

Related