Cmake Error "Math cannot parse the expression" with NCS > 2.4.2

Hello,

i'm using nrf connect sdk 2.4.2 to develop the firmware for my custom nrf5340 board without issues. I'm trying to upgrade to the the latest release but both 2.5.0 and 2.5.2 gives me this error when trying to compile:

CMake Error at D:/Nordic/v2.5.0/zephyr/cmake/modules/version.cmake:74 (math):
math cannot parse the expression: "( << 16) + ( << 8) + ()": syntax error,
unexpected exp_SHIFTLEFT (4).

I found THIS issue on DevZone that is extremely similar to my one and posted there some material to test on, but i didn't get any feedback in few months. For this reason, i'm opening a new issue.

The issue is clearly correlated to the Application versioning, but even reading the docs and making some tests i was not able to solve it.

Any suggestion?

Frax

Parents Reply Children
  • Hi runsiv,

    i read the post but unfortunately this does not apply at all to my case. I have no mcuboot.conf on my project. This is the latest update on my situation:

    - I downloaded both toolchain v.2.6.0. and SDK 2.6.0 and set them as ACTIVE

    - I created a new sample project based on "Hello world" sample

    - I tried to build it for nrf5340DK

    Result: always the same error! Disappointed

    Please keep in mind that if i try to build it with v.2.4.2 there are no issues in building it. It should be safe to assume that the difference has to be within the toolchain/SDK code, not on the project, even considering that this happens with hello_world sample too.

Related