Skip to content

Arduino Framework Compile Error Arduino.h #433

@AKTanara

Description

@AKTanara

According to documentation, I used -f arduino to create new project with Arduino framework:
tos.py new project -f arduino
Then followed the instruction and after choosing board (ESP32), tried to compile the newly created empty project by:
tos.py build

Image

But got this error:

C:/Users/xxx/TuyaOpen/TEST_ARDUINO/src/hello_world.cpp:1:10: fatal error: Arduino.h: No such file or directory
    1 | #include "Arduino.h"
      |          ^~~~~~~~~~~
compilation terminated.
[14/163] Building C object src/libhttp/CMakeFiles/libhttp.dir/coreHTTP/source/core_http_client.c.o
ninja: build stopped: subcommand failed.
[ERROR]: Build error.

By choosing T5AI board:

C:/Users/xxx/TuyaOpen/TEST_ARDUINO/src/hello_world.cpp:1:10: fatal error: Arduino.h: No such file or directory
    1 | #include "Arduino.h"
      |          ^~~~~~~~~~~
compilation terminated.
[16/265] Building C object src/libhttp/CMakeFiles/libhttp.dir/coreHTTP/source/dependency/3rdparty/http_parser/http_parser.c.obj
ninja: build stopped: subcommand failed.
[ERROR]: Build error.

And by choosing T2 board:

[INFO]: Running tos.py ...
[INFO]: Initialing using.config ...
[INFO]: Platform [T2] is exists.
[INFO]: Platform [T2] downloaded successfully.
[INFO]: Preparing platform [T2] ...
[INFO]: >>> subprocess >>>
cd C:\Users\xxx\TuyaOpen\platform\T2 && ./platform_prepare.sh
'.' is not recognized as an internal or external command,
operable program or batch file.
[ERROR]: Prepare platform error.

By choosing T3 board:

[INFO]: Running tos.py ...
[INFO]: Initialing using.config ...
[INFO]: Platform [T3] is exists.
[INFO]: Platform [T3] downloaded successfully.
[INFO]: Preparing platform [T3] ...
[INFO]: >>> subprocess >>>
cd C:\Users\xxx\TuyaOpen\platform\T3 && ./platform_prepare.sh T3
'.' is not recognized as an internal or external command,
operable program or batch file.
[ERROR]: Prepare platform error.

Where should I put Arduino.h file?
How should I add it to CMakeLists.txt?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions