algyan / XIAOGYAN

55 stars 4 forks source link

デモソフトxiaogyan_examplesが対象にしているXIAOがどれか分からない #32

Open matsujirushi opened 1 year ago

matsujirushi commented 1 year ago

元記事

githubにある ALGYAN 8周年基板用のデモソフト xiaogyan_examples は XIAO ESP32C3 向けなのですね。アナログ出力のところで ledc とか ESP32 にしかないライブラリを使っていますし。

matsujirushi commented 1 year ago

現状、ハードウェア、ソフトウェアとも、マイコンはSeeed Studio XIAO ESP32C3で動作確認しています。 他のXIAOによる確認は、

です。

当面、わたしはSeeed Studio XIAO ESP32C3についてフォローしようと考えています。 他のXIAOも出来れば対応したいので、issueやpull requestをお願いします。

上記はどこにも書かれていないので、、、ドキュメントに記入します。

TakSan0 commented 1 year ago

了解しました。 ESP32C3版のサンプルプログラムがどのような動きをするかの確認が出来次第、他のシリーズへのポーティング試してみます。 まずは nRF52840 から。コンパイルエラー対処からボチボチと。

Seeed Studio XIAO RP2040 は持っていませんが、 SAMD21 はどこかにあったはずですね。探せば出てくるかも。余裕あれば。

TakSan0 commented 1 year ago

XIAO_nRF52840 で使う際の問題点2か所特定できました。

1. 線形代数ライブラリ Eigen がXIAO nRF52840 に未対応

  D0 ~ D3 を使用している箇所でコンパイルエラーが多数出ていました。   これらはピン定義なので XIAO nRF52840 では数値で定義しているのに、ライブラリ側は '&' をつけて数値の入った変数の   アドレスを参照する造りとなっていたからでした。   ライブラリの git 更新差分で似たようなエラーを修正した差分があったのでそれをまねることで治りました。   具体的には <Library Path>/ArduinoEigen/ArduinoEigenCommon.h の最後の方に、

#ifdef D0
#undef D0
static constexpr size_t D0 {0};
#endif
#ifdef D1
#undef D1
static constexpr size_t D1 {1};
#endif
#ifdef D2
#undef D2
static constexpr size_t D2 {2};
#endif
#ifdef D3
#undef D3
static constexpr size_t D3 {3};
#endif

を追加しました。 但し、ライブラリ内のことなので、皆がコンパイルできるようにする為には、 ライブラリ作者に pullリク 出すか、正式に対応依頼しないといけないと思います。  

2. Speaker.cpp のサイン波出力部 

ESP32 系 では Tone() 関数が使えないのが理由で、ledcWriteTone() 関数を使って出力しているかと思いますが、 逆に ESP32 ではない場合は、Arduino標準の Tone() の方が使えるはずと思ってやってみたら、ちゃんと出力できました。 ▽こんな感じで修正してみました。

void Speaker::begin()
{
    pinMode(speakerEnablePin_, OUTPUT);
    digitalWrite(speakerEnablePin_, HIGH);
#if defined(ARDUINO_XIAO_ESP32C3)
    ledcAttachPin(speakerPin_, ledControlChannel_);
#endif
}

void Speaker::setPowerSupply(bool on)
{
    digitalWrite(speakerEnablePin_, on ? LOW : HIGH);
}

void Speaker::setTone(int frequency)
{
#if defined(ARDUINO_XIAO_ESP32C3)
    ledcWriteTone(ledControlChannel_, frequency);
#elif defined(ARDUINO_Seeed_XIAO_nRF52840) || defined(ARDUINO_Seeed_XIAO_nRF52840_Sense)
    if (frequency) tone(speakerPin_, frequency);
    else noTone(speakerPin_);
#endif
}

一応両方できるようにコンパイルスイッチで分けてみてます。

本来 pullリク出さないといけないのですが、大昔にやったっきりしばらく pullリク出していないので、 ちょっとリハビリ必要な感じです。明日できたらやってみます。 特に 1. の方の pullリクは、ちょっとハードル高いですね ^^

取り急ぎのご報告まで。[](url)

matsujirushi commented 1 year ago

@TakSan0 ご確認ありがとうございます。 Seeed Studio XIAO nRF52840対応のDiscussionを起票して転記しました。 #34

TakSan0 commented 1 year ago

XIAO AMD21 ボードはまだ発掘できていないのですが、先ずはコンパイル通るかを確認してみました。 ボード定義 "Seeeduino XIAO" を選択して試しています。

こちらは、ピンの定義自体が無いらしく Xiaogyan 辺りで D0~D10 や A0 ~ A10 の使用箇所でエラーが出るのと、 Eigen ライブラリコンパイル時に、別のエラーが多数出ますね。

35

でおっしゃっていた 「案3. ArduinoEigenの使用をやめる。」 も検討しないといけないかもですね。 個々にエラーの詳細は確認できていませんが、こんな感じです。

別の issue 立てるべきかなとは思いますが、取り急ぎの報告です。

d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h: In function 'void Eigen::internal::sparselu_gemm(Eigen::Index, Eigen::Index, Eigen::Index, const Scalar*, Eigen::Index, const Scalar*, Eigen::Index, Scalar*, Eigen::Index)':
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:31:3: error: expected primary-expression before 'enum'
   enum {
   ^~~~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:40:20: error: 'RK' was not declared in this scope
   Index d_end = (d/RK)*RK;    // number of columns of A (rows of B) suitable for full register blocking
                    ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:41:20: error: 'RN' was not declared in this scope
   Index n_end = (n/RN)*RN;    // number of columns of B-C suitable for processing RN columns at once
                    ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:41:20: note: suggested alternative: '_N'
   Index n_end = (n/RN)*RN;    // number of columns of B-C suitable for processing RN columns at once
                    ^~
                    _N
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:58:30: error: 'BM' was not declared in this scope
   for(Index ib=i0; ib<m; ib+=BM)
                              ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:58:30: note: suggested alternative: 'B'
   for(Index ib=i0; ib<m; ib+=BM)
                              ^~
                              B
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:61:37: error: 'SM' was not declared in this scope
     Index actual_b_end1 = (actual_b/SM)*SM;                   // actual number of rows suitable for peeling
                                     ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:61:37: note: suggested alternative: 'SS'
     Index actual_b_end1 = (actual_b/SM)*SM;                   // actual number of rows suitable for peeling
                                     ^~
                                     SS
In file included from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/SparseLU:28:0,
                 from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/Sparse:29,
                 from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/Eigen:2,
                 from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen.h:10,
                 from D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\LedMatrix.hpp:11,
                 from D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\LedMatrixAGFX.cpp:11:
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h: In function 'void Eigen::internal::sparselu_gemm(Eigen::Index, Eigen::Index, Eigen::Index, const Scalar*, Eigen::Index, const Scalar*, Eigen::Index, Scalar*, Eigen::Index)':
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:31:3: error: expected primary-expression before 'enum'
   enum {
   ^~~~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:40:20: error: 'RK' was not declared in this scope
   Index d_end = (d/RK)*RK;    // number of columns of A (rows of B) suitable for full register blocking
                    ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:41:20: error: 'RN' was not declared in this scope
   Index n_end = (n/RN)*RN;    // number of columns of B-C suitable for processing RN columns at once
                    ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:41:20: note: suggested alternative: '_N'
   Index n_end = (n/RN)*RN;    // number of columns of B-C suitable for processing RN columns at once
                    ^~
                    _N
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:58:30: error: 'BM' was not declared in this scope
   for(Index ib=i0; ib<m; ib+=BM)
                              ^~
In file included from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/SparseLU:28:0,
                 from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/Sparse:29,
                 from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/Eigen:2,
                 from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen.h:10,
                 from D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\LedMatrix.hpp:11,
                 from D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:14,
                 from D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\ALGYAN8_ES3_Test.ino:12:
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h: In function 'void Eigen::internal::sparselu_gemm(Eigen::Index, Eigen::Index, Eigen::Index, const Scalar*, Eigen::Index, const Scalar*, Eigen::Index, Scalar*, Eigen::Index)':
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:31:3: error: expected primary-expression before 'enum'
   enum {
   ^~~~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:40:20: error: 'RK' was not declared in this scope
   Index d_end = (d/RK)*RK;    // number of columns of A (rows of B) suitable for full register blocking
                    ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:58:30: note: suggested alternative: 'B'
   for(Index ib=i0; ib<m; ib+=BM)
                              ^~
                              B
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:61:37: error: 'SM' was not declared in this scope
     Index actual_b_end1 = (actual_b/SM)*SM;                   // actual number of rows suitable for peeling
                                     ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:41:20: error: 'RN' was not declared in this scope
   Index n_end = (n/RN)*RN;    // number of columns of B-C suitable for processing RN columns at once
                    ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:61:37: note: suggested alternative: 'SS'
     Index actual_b_end1 = (actual_b/SM)*SM;                   // actual number of rows suitable for peeling
                                     ^~
                                     SS
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:41:20: note: suggested alternative: '_N'
   Index n_end = (n/RN)*RN;    // number of columns of B-C suitable for processing RN columns at once
                    ^~
                    _N
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:58:30: error: 'BM' was not declared in this scope
   for(Index ib=i0; ib<m; ib+=BM)
                              ^~
In file included from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/SparseLU:28:0,
                 from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/Sparse:29,
                 from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/Eigen:2,
                 from d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen.h:10,
                 from D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\LedMatrix.hpp:11,
                 from D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\LedMatrix.cpp:10:
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h: In function 'void Eigen::internal::sparselu_gemm(Eigen::Index, Eigen::Index, Eigen::Index, const Scalar*, Eigen::Index, const Scalar*, Eigen::Index, Scalar*, Eigen::Index)':
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:31:3: error: expected primary-expression before 'enum'
   enum {
   ^~~~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:40:20: error: 'RK' was not declared in this scope
   Index d_end = (d/RK)*RK;    // number of columns of A (rows of B) suitable for full register blocking
                    ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:58:30: note: suggested alternative: 'B'
   for(Index ib=i0; ib<m; ib+=BM)
                              ^~
                              B
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:61:37: error: 'SM' was not declared in this scope
     Index actual_b_end1 = (actual_b/SM)*SM;                   // actual number of rows suitable for peeling
                                     ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:41:20: error: 'RN' was not declared in this scope
   Index n_end = (n/RN)*RN;    // number of columns of B-C suitable for processing RN columns at once
                    ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:61:37: note: suggested alternative: 'SS'
     Index actual_b_end1 = (actual_b/SM)*SM;                   // actual number of rows suitable for peeling
                                     ^~
                                     SS
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:41:20: note: suggested alternative: '_N'
   Index n_end = (n/RN)*RN;    // number of columns of B-C suitable for processing RN columns at once
                    ^~
                    _N
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:58:30: error: 'BM' was not declared in this scope
   for(Index ib=i0; ib<m; ib+=BM)
                              ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:58:30: note: suggested alternative: 'B'
   for(Index ib=i0; ib<m; ib+=BM)
                              ^~
                              B
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:61:37: error: 'SM' was not declared in this scope
     Index actual_b_end1 = (actual_b/SM)*SM;                   // actual number of rows suitable for peeling
                                     ^~
d:\DEVELOP\XXXXXXXXX\Arduino\libraries\ArduinoEigen-master/ArduinoEigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h:61:37: note: suggested alternative: 'SS'
     Index actual_b_end1 = (actual_b/SM)*SM;                   // actual number of rows suitable for peeling
                                     ^~
                                     SS
In file included from D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.cpp:1:0:
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp: At global scope:
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:22:51: error: 'D10' was not declared in this scope
     static constexpr uint8_t TM1640_DIN_PIN     = D10;
                                                   ^~~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:22:51: note: suggested alternative: 'A10'
     static constexpr uint8_t TM1640_DIN_PIN     = D10;
                                                   ^~~
                                                   A10
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:23:51: error: 'D8' was not declared in this scope
     static constexpr uint8_t TM1640_SCLK_PIN    = D8;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:23:51: note: suggested alternative: 'A8'
     static constexpr uint8_t TM1640_SCLK_PIN    = D8;
                                                   ^~
                                                   A8
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:24:51: error: 'D0' was not declared in this scope
     static constexpr uint8_t SPEAKER_PIN        = D0;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:24:51: note: suggested alternative: 'B0'
     static constexpr uint8_t SPEAKER_PIN        = D0;
                                                   ^~
                                                   B0
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:25:51: error: 'D3' was not declared in this scope
     static constexpr uint8_t SPEAKER_ENABLE_PIN = D3;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:25:51: note: suggested alternative: 'A3'
     static constexpr uint8_t SPEAKER_ENABLE_PIN = D3;
                                                   ^~
                                                   A3
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:26:51: error: 'D1' was not declared in this scope
     static constexpr uint8_t ENCODER_A_PIN      = D1;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:26:51: note: suggested alternative: 'B1'
     static constexpr uint8_t ENCODER_A_PIN      = D1;
                                                   ^~
                                                   B1
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:27:51: error: 'D2' was not declared in this scope
     static constexpr uint8_t ENCODER_B_PIN      = D2;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:27:51: note: suggested alternative: 'A2'
     static constexpr uint8_t ENCODER_B_PIN      = D2;
                                                   ^~
                                                   A2
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:28:51: error: 'D6' was not declared in this scope
     static constexpr uint8_t LED_PIN            = D6;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:28:51: note: suggested alternative: 'A6'
     static constexpr uint8_t LED_PIN            = D6;
                                                   ^~
                                                   A6
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:29:51: error: 'D9' was not declared in this scope
     static constexpr uint8_t BUTTON_A_PIN       = D9;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:29:51: note: suggested alternative: 'A9'
     static constexpr uint8_t BUTTON_A_PIN       = D9;
                                                   ^~
                                                   A9
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:30:51: error: 'D7' was not declared in this scope
     static constexpr uint8_t BUTTON_B_PIN       = D7;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:30:51: note: suggested alternative: 'A7'
     static constexpr uint8_t BUTTON_B_PIN       = D7;
                                                   ^~
                                                   A7
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:45:33: error: could not convert template argument 'XiaogyanClass::LED_PIN' from 'const uint8_t {aka const unsigned char}' to 'int'
     static GpioOutputPin<LED_PIN> led;
                                 ^
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:46:37: error: could not convert template argument 'XiaogyanClass::BUTTON_A_PIN' from 'const uint8_t {aka const unsigned char}' to 'int'
     static GpioInputPin<BUTTON_A_PIN> buttonA;
                                     ^
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:47:37: error: could not convert template argument 'XiaogyanClass::BUTTON_B_PIN' from 'const uint8_t {aka const unsigned char}' to 'int'
     static GpioInputPin<BUTTON_B_PIN> buttonB;
                                     ^
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.cpp:10:41: note: #pragma message: XIAO_SAMD21 selected
   #pragma message("XIAO_SAMD21 selected")
                                         ^
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.cpp:35:37: error: could not convert template argument 'XiaogyanClass::LED_PIN' from 'const uint8_t {aka const unsigned char}' to 'int'
 GpioOutputPin<XiaogyanClass::LED_PIN> XiaogyanClass::led;
                                     ^
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.cpp: In static member function 'static void XiaogyanClass::begin()':
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.cpp:51:9: error: request for member 'begin' in 'XiaogyanClass::led', which is of non-class type 'int'
     led.begin();
         ^~~~~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.cpp:54:13: error: request for member 'begin' in 'XiaogyanClass::buttonA', which is of non-class type 'int'
     buttonA.begin(INPUT_PULLUP);
             ^~~~~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.cpp:55:13: error: request for member 'begin' in 'XiaogyanClass::buttonB', which is of non-class type 'int'
     buttonB.begin(INPUT_PULLUP);
             ^~~~~
In file included from D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\ALGYAN8_ES3_Test.ino:12:0:
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp: At global scope:
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:22:51: error: 'D10' was not declared in this scope
     static constexpr uint8_t TM1640_DIN_PIN     = D10;
                                                   ^~~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:22:51: note: suggested alternative: 'A10'
     static constexpr uint8_t TM1640_DIN_PIN     = D10;
                                                   ^~~
                                                   A10
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:23:51: error: 'D8' was not declared in this scope
     static constexpr uint8_t TM1640_SCLK_PIN    = D8;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:23:51: note: suggested alternative: 'A8'
     static constexpr uint8_t TM1640_SCLK_PIN    = D8;
                                                   ^~
                                                   A8
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:24:51: error: 'D0' was not declared in this scope
     static constexpr uint8_t SPEAKER_PIN        = D0;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:24:51: note: suggested alternative: 'B0'
     static constexpr uint8_t SPEAKER_PIN        = D0;
                                                   ^~
                                                   B0
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:25:51: error: 'D3' was not declared in this scope
     static constexpr uint8_t SPEAKER_ENABLE_PIN = D3;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:25:51: note: suggested alternative: 'A3'
     static constexpr uint8_t SPEAKER_ENABLE_PIN = D3;
                                                   ^~
                                                   A3
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:26:51: error: 'D1' was not declared in this scope
     static constexpr uint8_t ENCODER_A_PIN      = D1;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:26:51: note: suggested alternative: 'B1'
     static constexpr uint8_t ENCODER_A_PIN      = D1;
                                                   ^~
                                                   B1
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:27:51: error: 'D2' was not declared in this scope
     static constexpr uint8_t ENCODER_B_PIN      = D2;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:27:51: note: suggested alternative: 'A2'
     static constexpr uint8_t ENCODER_B_PIN      = D2;
                                                   ^~
                                                   A2
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:28:51: error: 'D6' was not declared in this scope
     static constexpr uint8_t LED_PIN            = D6;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:28:51: note: suggested alternative: 'A6'
     static constexpr uint8_t LED_PIN            = D6;
                                                   ^~
                                                   A6
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:29:51: error: 'D9' was not declared in this scope
     static constexpr uint8_t BUTTON_A_PIN       = D9;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:29:51: note: suggested alternative: 'A9'
     static constexpr uint8_t BUTTON_A_PIN       = D9;
                                                   ^~
                                                   A9
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:30:51: error: 'D7' was not declared in this scope
     static constexpr uint8_t BUTTON_B_PIN       = D7;
                                                   ^~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:30:51: note: suggested alternative: 'A7'
     static constexpr uint8_t BUTTON_B_PIN       = D7;
                                                   ^~
                                                   A7
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:45:33: error: could not convert template argument 'XiaogyanClass::LED_PIN' from 'const uint8_t {aka const unsigned char}' to 'int'
     static GpioOutputPin<LED_PIN> led;
                                 ^
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:46:37: error: could not convert template argument 'XiaogyanClass::BUTTON_A_PIN' from 'const uint8_t {aka const unsigned char}' to 'int'
     static GpioInputPin<BUTTON_A_PIN> buttonA;
                                     ^
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\Xiaogyan.hpp:47:37: error: could not convert template argument 'XiaogyanClass::BUTTON_B_PIN' from 'const uint8_t {aka const unsigned char}' to 'int'
     static GpioInputPin<BUTTON_B_PIN> buttonB;
                                     ^
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\ALGYAN8_ES3_Test.ino: In function 'void loop()':
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\ALGYAN8_ES3_Test.ino:58:18: error: request for member 'write' in 'XiaogyanClass::led', which is of non-class type 'int'
     Xiaogyan.led.write(millis() % 1000 < 200 ? LOW : HIGH);
                  ^~~~~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\ALGYAN8_ES3_Test.ino:65:32: error: request for member 'read' in 'XiaogyanClass::buttonA', which is of non-class type 'int'
     buttonA = Xiaogyan.buttonA.read() == LOW;
                                ^~~~
D:\DEVELOP\XXXXXXXXX\Arduino\ESP32\ALGYAN_Board\ALGYAN8_ES3_Test\ALGYAN8_ES3_Test.ino:66:32: error: request for member 'read' in 'XiaogyanClass::buttonB', which is of non-class type 'int'
     buttonB = Xiaogyan.buttonB.read() == LOW;
                                ^~~~
Compilation error: 'D10' was not declared in this scope
matsujirushi commented 1 year ago

こちらは、ピンの定義自体が無いらしく Xiaogyan 辺りで D0~D10 や A0 ~ A10 の使用箇所でエラーが出るのと、 Eigen ライブラリコンパイル時に、別のエラーが多数出ますね。

ご確認ありがとうございます。 このissueとは違うので、新たにissueを起票願います。(1つのissueに混ぜて書いてあると、対応漏れしてしまうため)

取り急ぎの報告です。

こちらはissueではないので、、、Discussionに起票願います。