Skip to content

Compiling for non-S3 target? #2

Description

@jbroll

I'm not able to compile for esp32cam (non S3 target)

john@blink:~/src/EspMath/examples/test_bench$ arduino-cli compile -b esp32:esp32:esp32cam test_bench.ino
In file included from /home/john/src/EspMath/examples/test_bench/test_bench.ino:1:
/home/john/src/EspMath/examples/test_bench/test_bench.h: In function 'void test_fixed_point(size_t, uint8_t, bool)':
/home/john/src/EspMath/examples/test_bench/test_bench.h:291:19: error: no match for 'operator+' (operand types are 'espmath::Array<short int>' and 'espmath::Array<short int>')
  291 |   result = array1 + array2;
      |            ~~~~~~ ^ ~~~~~~
      |            |        |
      |            |        Array<[...]>
      |            Array<[...]>
In file included from /home/john/Arduino/libraries/EspMath/src/esp_array.h:16,
                 from /home/john/Arduino/libraries/EspMath/src/esp_math.h:4,
                 from /home/john/src/EspMath/examples/test_bench/test_bench.h:6:
/home/john/Arduino/libraries/EspMath/src/esp_fixed_point.h:98:9: note: candidate: 'template<class T> espmath::fixed espmath::operator+(fixed, T)'
   98 |   fixed operator+(fixed f1, T t){return f1 + (float)t;}
      |         ^~~~~~~~
/home/john/Arduino/libraries/EspMath/src/esp_fixed_point.h:98:9: note:   template argument deduction/substitution failed:
/home/john/src/EspMath/examples/test_bench/test_bench.h:291:12: note:   cannot convert 'array1' (type 'espmath::Array<short int>') to type 'espmath::fixed' {aka 'espmath::FixedPoint'}
  291 |   result = array1 + array2;
      |            ^~~~~~
/home/john/Arduino/libraries/EspMath/src/esp_fixed_point.h:106:9: note: candidate: 'template<class T> espmath::fixed espmath::operator+(T, fixed)'
  106 |   fixed operator+(T t, fixed f1){return f1 + (float)t;}
      |         ^~~~~~~~
/home/john/Arduino/libraries/EspMath/src/esp_fixed_point.h:106:9: note:   template argument deduction/substitution failed:
/home/john/src/EspMath/examples/test_bench/test_bench.h:291:21: note:   cannot convert 'array2' (type 'espmath::Array<short int>') to type 'espmath::fixed' {aka 'espmath::FixedPoint'}
  291 |   result = array1 + array2;
      |                     ^~~~~~
In file included from /home/john/.arduino15/packages/esp32/hardware/esp32/3.0.5/cores/esp32/Arduino.h:192,
                 from /tmp/arduino/sketches/51994D7F357ACE419A6F84E6482C6341/sketch/test_bench.ino.cpp:1:
/home/john/.arduino15/packages/esp32/hardware/esp32/3.0.5/cores/esp32/WString.h:415:25: note: candidate: 'StringSumHelper& operator+(const StringSumHelper&, const __FlashStringHelper*)'
  415 | inline StringSumHelper &operator+(const StringSumHelper &lhs, const __FlashStringHelper *rhs) {
      |                         ^~~~~~~~
/home/john/.arduino15/packages/esp32/hardware/esp32/3.0.5/cores/esp32/WString.h:415:58: note:   no known conversion for argument 1 from 'espmath::Array<short int>' to 'const StringSumHelper&'
  415 | inline StringSumHelper &operator+(const StringSumHelper &lhs, const __FlashStringHelper *rhs) {
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/john/Arduino/libraries/EspMath/src/esp_fixed_point.h:85:9: note: candidate: 'espmath::fixed espmath::operator+(fixed, fixed)'
   85 |   fixed operator+(fixed f1, fixed f2);
      |         ^~~~~~~~
/home/john/Arduino/libraries/EspMath/src/esp_fixed_point.h:85:25: note:   no known conversion for argument 1 from 'espmath::Array<short int>' to 'espmath::fixed' {aka 'espmath::FixedPoint'}
   85 |   fixed operator+(fixed f1, fixed f2);
      |                   ~~~~~~^~
...
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions