Arduino STM32 error finding file

Sysprogs forums Forums VisualGDB Arduino STM32 error finding file

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26723
    MystikReasons
    Participant

    I’m using a Nucleo STM32F411RE and I created an Arduino project with it.
    Now my problem: I’ve copied a working code (on arduino uno) to the STM32 Arduino project and tried building it. It now can’t find the library “avr/sleep.h”.
    The paths in the “Arduino Settings” windows are exactly the same.

    Why isn’t the STM32 Arduino project able to locate the file?
    I’ve downloaded the STM32F4 generic series file while setting the project up.

    My VisualGDB version is: 5.5 Preview 2 build 3410

    Loading cached code model from C:\Users\gwerderj\source\repos\STM32_MIOTY_LORA_LIKE_Dragino_SendString\VisualGDBCache\STM32_MIOTY_LORA_LIKE_Dragino_SendString-Debug-Generic_STM32F4_series\BuildCommandLines.txt…
    Failed to parse code model from C:\Users\gwerderj\source\repos\STM32_MIOTY_LORA_LIKE_Dragino_SendString\VisualGDBCache\STM32_MIOTY_LORA_LIKE_Dragino_SendString-Debug-Generic_STM32F4_series\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
    at vu2.p.b_2(IEnumerable`1 a)
    Compiler output:
    In file included from C:\Users\gwerderj\Documents\Arduino\Libraries\ts-unb-node-rfm95_LIKE_BOARD/at-protocol.h:18,
    from C:\Users\gwerderj\Documents\Arduino\Libraries\ts-unb-node-rfm95_LIKE_BOARD/ts-unb-node.h:26,
    from C:\Users\gwerderj\source\repos\STM32_MIOTY_LORA_LIKE_Dragino_SendString\sketches\STM32_MIOTY_LORA_LIKE_Dragino_SendString.ino:13:
    C:\Users\gwerderj\Documents\Arduino\Libraries\ts-unb-node-rfm95_LIKE_BOARD/atmega328p.h:20:10: fatal error: avr/sleep.h: No such file or directory
    #include <avr/sleep.h>
    ^~~~~~~~~~~~~
    compilation terminated.
    Checking if any source files need uploading…
    Checking for file modifications…
    Found changed files since last query (see C:\Users\gwerderj\source\repos\STM32_MIOTY_LORA_LIKE_Dragino_SendString\VisualGDBCache\STM32_MIOTY_LORA_LIKE_Dragino_SendString-Debug-Generic_STM32F4_series\BuildFileStats.txt.old vs C:\Users\gwerderj\source\repos\STM32_MIOTY_LORA_LIKE_Dragino_SendString\VisualGDBCache\STM32_MIOTY_LORA_LIKE_Dragino_SendString-Debug-Generic_STM32F4_series\BuildFileStats.txt.new). Rerunning code model query..
    Saved the code model to C:\Users\gwerderj\source\repos\STM32_MIOTY_LORA_LIKE_Dragino_SendString\VisualGDBCache\STM32_MIOTY_LORA_LIKE_Dragino_SendString-Debug-Generic_STM32F4_series\BuildCommandLines.txt
    Failed to parse code model from C:\Users\gwerderj\source\repos\STM32_MIOTY_LORA_LIKE_Dragino_SendString\VisualGDBCache\STM32_MIOTY_LORA_LIKE_Dragino_SendString-Debug-Generic_STM32F4_series\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
    at vu2.p.b_2(IEnumerable`1 a)
    Compiler output:
    In file included from C:\Users\gwerderj\Documents\Arduino\Libraries\ts-unb-node-rfm95_LIKE_BOARD/at-protocol.h:18,
    from C:\Users\gwerderj\Documents\Arduino\Libraries\ts-unb-node-rfm95_LIKE_BOARD/ts-unb-node.h:26,
    from C:\Users\gwerderj\source\repos\STM32_MIOTY_LORA_LIKE_Dragino_SendString\sketches\STM32_MIOTY_LORA_LIKE_Dragino_SendString.ino:13:
    C:\Users\gwerderj\Documents\Arduino\Libraries\ts-unb-node-rfm95_LIKE_BOARD/atmega328p.h:20:10: fatal error: avr/sleep.h: No such file or directory
    #include <avr/sleep.h>
    ^~~~~~~~~~~~~
    compilation terminated.

    ========== Project Configuration Summary ==========
    STM32_MIOTY_LORA_LIKE_Dragino_SendString configured in 00:11
    ========== Configuration: 1 Succeeded, 0 Failed ==========

    #26724
    MystikReasons
    Participant

    And what is up with the Board part number?

    Why isn’t the F411 included and how should I know which one to take?

    Attachments:
    You must be logged in to view attached files.
    #26726
    MystikReasons
    Participant

    Okay I figured out the second problem with the board part number. I took the Generic STM32F4 series instead of the Nucleo-64 series.
    But the “avr/sleep.h” file is still not being found.

    #26728
    MystikReasons
    Participant

    I noticed that the STM32 Arduino project doesn’t have the same directory as the Arduino project.

    See attached screenshots.

    Attachments:
    You must be logged in to view attached files.
    #26734
    support
    Keymaster

    Unfortunately we are not able to guarantee that every possible combination of Arduino targets and libraries will work. Please consider posting on the Arduino forums for further support.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.