'"y"' is not a valid value for the bool symbol SPEED_OPTIMIZATIONS (defined at Kconfig.zephyr:493)

Hello all,

out of the blue I cannot compile a project originally written in SDK 2.5.0. Last time I worked on this project was a few weeks ago and nothing has changed, not in the repo or source code.

Today I'm trying to compile a bugfix where only two lines of code have changed in the source. I did a pristine build, and I get the error:

C:/Users/xxx/Projects/Firmware/project/build/zephyr/misc/generated/extra_kconfig_options.conf:2: warning: '"y"' is not a valid value for the bool symbol SPEED_OPTIMIZATIONS (defined at Kconfig.zephyr:493). Assignment ignored.

I updated the SDK to version 2.7.0 hoping this would fix it, but no change.

I'm very lost, as this is a file generated by the SDK, not by me, and I don't know what else to update. So far what I have is:

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/Users/xxx/Projects/Firmware/project
-- CMake version: 3.21.0
-- Found Python3: C:/ncs/toolchains/ce3b5ff664/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: C:/ncs/v2.7.0/zephyr/.cache
-- Zephyr version: 3.6.99 (C:/ncs/v2.7.0/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: project_board
-- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/ce3b5ff664/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
-- Found BOARD.dts: C:/Users/xxx/Projects/nrf_boards/boards/arm/project_board/project_board.dts
-- Found devicetree overlay: c:/Users/xxx/Projects/Firmware/project/project.overlay
-- Generated zephyr.dts: C:/Users/xxx/Projects/Firmware/project/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/Users/xxx/Projects/Firmware/project/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/Users/xxx/Projects/Firmware/project/build/zephyr/dts.cmake

Any help would be greatly appreciated.

Cheers,

Alberto

Parents Reply Children
  • Hello Marte,

    yes I did, but that was already months ago! I have been working with version 2.5.0 on this project since October last year, all the way until July without issues. I left the project for about a month, and I started to fix some bugs we had.

    Yesterday I was not able to compile the project. I updated to version 2.7.0 which brought another heap of issues, basically something with GPIOTE and my SD card interface (SPI) and UART stopped working. 

    I downgraded back to 2.5.0. Still I wasn't able to compile.

    I noticed then that -DCONFIG_SPEED_OPTIMIZATIONS=y was here (when it worked):

    I now have the following settings:

    I honestly don't know what happened as I was using those settings for a long time. I managed to get all to work again, fortunately, but I spent half a day trying to figure out what was going on.

    I did not delete the build folder, we're in the middle of production and debugging, and I can't change most settings without then having to test all of the units we've built.

    I would really like to know if some background update could have caused this issue.

    Kind regards,

    Alberto

  • Hi Alberto,

    If you used the same build configuration and made no changes to it, the issue could have been caused by an update to the VS Code extension.

    Based on the error you got, the issue seems to have stemmed from there being quotation marks around y in the following part of the build command:

    -DCONFIG_SPEED_OPTIMIZATIONS="y"

    The VS Code extension generates a build command based on information in the build directory. It should not have added quotation marks, but it is possible that there was a change in how the extension generates the build command or handles these options and that this caused an issue when building a configuration made with an older version of the extension.

    Does building work as expected now, or are you still having issues?

    Best regards,
    Marte

  • Hey Marte,

    I suspected it might have been the extension. Thanks for confirming. At the moment it's building as expected and it looks as if the filesize is correct.

    I will try adding the optimization without the inverted commas.

    Cheers,

    Alberto

Related