"expected number or parenthesized expression" error after updating to version v2.9.1

Hi All,

Previous last two times I opened my project in VS Code it displayed a deprecation notice complaining about SDK and toolchain versions. My plan was to address it later this week but today VS Code, just after displaying the deprecation notice, said the application did not have any build configuration and displayed an empty nRFConnect panel.

After installing SDK and toolchain versions v2.9.1, zephyr 3.7.99, following instructions here (https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/installation/recommended_versions.html#requirements-nrfvsc), it always fails when trying to create a build configuration with error message parse error: "expected number or parenthesized expression".

It points the error to the '<' character in one line from my custom board Dts, zephyr,resolution = <12>, which I reproduce here with context:

&adc {
    status = "okay";
    #address-cells = <1>;
    #size-cells = <0>;
    channel@0 {
        reg = <0>;
        zephyr,gain = "ADC_GAIN_1_6";
        zephyr,reference = "ADC_REF_INTERNAL";
        zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
        zephyr,input-positive = <NRF_ADC_AIN0>; /* P0.04 */
        zephyr,resolution = <12>;
    };
};

What is the cause for this error?

BR

Parents
  • Hi

    When there are cryptic errors like this I would suggest that you start by deleting the build folder in case there is something cached that messes up the build process. 

    Just to verify, you have not change NCS version, the only difference is that you had the warning regarding NCS 1.x?

    Can you try to change to NRF_SAADC_AIN0? I don't see any other 52 or higher device use NRF_ADC_AIN0 

    Regards

    Runar

  • Hi Runar. Thanks for your comment.

    Yes, I changed NCS as I updated the toolchain and installed newest SDK after VSCode displayed an empty nRF Connect panel.

    After many trial and error attempts it was impossible to arrive to the point of having a valid build configuration. It always failed, and always made me start over and over again.

    I deleted the build directory on each iteration.

    One thing I did see is the symbol NRF_ADC_AIN0 was not recognised by the compiler, but using integer values in place of this and other symbols allowed the compiler to move forward and fail at other not-recognised symbols.

    I'm pretty sure it should be mostly a matter of including the appropriated include files in the dts file.

    As I was in a hurry, I created a build configuration using the SDK version I was using previously, with the new toolchain, and I was able to compile the code and run the tests to ensure it was working as before. But I know this particular SDK version has some issues which were solved in subsequent versions.

    What I need now is a clear path for migrating code and configurations from SDK 2.6.0 to 2.9.1.

Reply
  • Hi Runar. Thanks for your comment.

    Yes, I changed NCS as I updated the toolchain and installed newest SDK after VSCode displayed an empty nRF Connect panel.

    After many trial and error attempts it was impossible to arrive to the point of having a valid build configuration. It always failed, and always made me start over and over again.

    I deleted the build directory on each iteration.

    One thing I did see is the symbol NRF_ADC_AIN0 was not recognised by the compiler, but using integer values in place of this and other symbols allowed the compiler to move forward and fail at other not-recognised symbols.

    I'm pretty sure it should be mostly a matter of including the appropriated include files in the dts file.

    As I was in a hurry, I created a build configuration using the SDK version I was using previously, with the new toolchain, and I was able to compile the code and run the tests to ensure it was working as before. But I know this particular SDK version has some issues which were solved in subsequent versions.

    What I need now is a clear path for migrating code and configurations from SDK 2.6.0 to 2.9.1.

Children
No Data
Related