diverta / onecard-fido

MIT License
0 stars 0 forks source link

[nCS更改対応] TFTライブラリーの移行 #773

Closed makmorit closed 1 year ago

makmorit commented 1 year ago

概要

nRF Connect SDKのバージョンアップ(v1.9.1-->v2.2.0)に伴い、[nRF5340アプリケーション向けTFTライブラリー]()の実装を見直します。

現状、下記の対応が必要なことが判明しています。

makmorit commented 1 year ago

ご参考

DT_GPIO_LABELなどの非推奨マクロ使用により、ビルド時に大量のエラーが発生するため、推奨マクロに置き換え、エラーを収束させます。

為念で現状発生しているエラーを掲載します。 (実際には数十件のエラーが発生していますが、下記はその抜粋になります)

[284/284] Linking C executable zephyr/zephyr.elf
/Users/makmorit/opt/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.bfd: warning: zephyr/zephyr.elf has a LOAD segment with RWX permissions
Memory region         Used Size  Region Size  %age Used
           FLASH:       40668 B        48 KB     82.74%
             RAM:       22688 B       440 KB      5.04%
        IDT_LIST:          0 GB         2 KB      0.00%
[124/507] Building C object CMakeFiles/app.dir/src/app_tiny_tft.c.obj
FAILED: CMakeFiles/app.dir/src/app_tiny_tft.c.obj 
【中略】
/Users/makmorit/GitHub/onecard-fido/nRF5340_app/secure_device_app/src/app_tiny_tft.c: In function 'app_tiny_tft_init':
/Users/makmorit/GitHub/onecard-fido/nRF5340_app/secure_device_app/src/app_tiny_tft.c:63:13: warning: Macro is deprecated
   63 |     m_tft_c_s = initialize_gpio(TFT_C_S_GPIO_LABEL, TFT_C_S_GPIO_PIN, TFT_C_S_GPIO_FLAGS);
      |             ^~~~~~~~~~~~~~~~~~~~~
/Users/makmorit/GitHub/onecard-fido/nRF5340_app/secure_device_app/src/app_tiny_tft.c:63:13: warning: Macro is deprecated
In file included from /Users/makmorit/opt/ncs_2.2.0/zephyr/include/zephyr/arch/arm/aarch32/arch.h:20,
                 from /Users/makmorit/opt/ncs_2.2.0/zephyr/include/zephyr/arch/cpu.h:19,
                 from /Users/makmorit/opt/ncs_2.2.0/zephyr/include/zephyr/kernel_includes.h:33,
                 from /Users/makmorit/opt/ncs_2.2.0/zephyr/include/zephyr/kernel.h:17,
                 from /Users/makmorit/GitHub/onecard-fido/nRF5340_app/secure_device_app/src/app_tiny_tft.c:8:
/Users/makmorit/GitHub/onecard-fido/nRF5340_app/secure_device_app/build_signed/zephyr/include/generated/devicetree_generated.h:17010:46: error: 'DT_N_S_soc_S_peripheral_50000000_S_gpio_842800_P_label' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_50000000_S_gpio_842800_P_reg'?
17010 | #define DT_N_S_tfts_S_tft_0_P_gpios_IDX_0_PH DT_N_S_soc_S_peripheral_50000000_S_gpio_842800
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/makmorit/opt/ncs_2.2.0/zephyr/include/zephyr/devicetree.h:3892:29: note: in definition of macro 'DT_CAT3'
 3892 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
      |                             ^~
【中略】
/Users/makmorit/GitHub/onecard-fido/nRF5340_app/secure_device_app/src/app_tiny_tft.c:66:13: warning: Macro is deprecated
[140/507] Building C object CMakeFiles/app.dir/src/app_board.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /Users/makmorit/GitHub/onecard-fido/nRF5340_app/secure_device_app/build_signed

ビルド FAILED (終了値1, 合計時間: 30s)
makmorit commented 1 year ago

対応結果の確認

05d7c19までの対応の結果、nRF Connect SDKのバージョンアップ(v1.9.1-->v2.2.0)に伴う、nRF5340アプリケーション向けTFTライブラリーの実装見直しが完了し、動作確認時も問題が発生しなかった事を確認いたしました。