Adding the BDH Code Template
Navigate to directory ModusToolbox and Adding the BDH code Template:
Copy echo 'https://raw.githubusercontent.com/Advance-Innovation-Centre-AIC/mtb2-bdh-academy-manifests/master/bdh-academy-basic-app-super-manifest.xml' > ~/.modustoolbox/manifest.loc
Update Firmware
🖥️ For Windows
ให้สังเกตชื่อไดเรกทอรี tools_3.1 จะต้องให้ตรงกับ version ของ modusToolbox เช่น version 3.1
Navigate to directory ModusToolbox/tools_3.1/fw-loader/bin/
Copy $ cd ModusToolbox/tools_3.1/fw-loader/bin/
$ ./fw-loader --update-kp3
🖥️ For Mac
ให้สังเกตชื่อไดเรกทอรี tools_3.1 จะต้องให้ตรงกับ version ของ modusToolbox เช่น version 3.2
Copy $ cd /Applications/ModusToolbox/tools_3.2/fw-loader/bin/
$ ./fw-loader --device-list
Copy Infineon Firmware Updater, Version: 3.6.0.2303
( C ) Copyright 2018-2024 by Cypress Semiconductor Corporation (an Infineon company )
All Rights Reserved
Info: Start the API initialization
Info: Connected - KitProg3 DAPLink CMSIS-DAP-190B1301f808151401f8081500000000000000002e127069
Info: The hardware initialization has completed in 290 ms
The connected supported devices:
1: KitProg3 DAPLink CMSIS-DAP-190B1301f808151401f8081500000000000000002e127069 FW Version 2.50.1383 [outdated]
Warning: The firmware on the KitProg3 DAPLink CMSIS-DAP-190B1301f808151401f8081500000000000000002e127069 device ( s ) is outdated. Use --update-kp3 [full-device-name | serial-num | all] to update.
ในกรณีที่มีข้อความเตือนว่า "is outdated " ให้ทำการอัพเดท firmware ดังรายละเอียดข้างล่างนี้
Copy $ ./fw-loader --update-kp3
Copy Infineon Firmware Updater, Version: 3.6.0.2303
( C ) Copyright 2018-2024 by Cypress Semiconductor Corporation (an Infineon company )
All Rights Reserved
Info: Start the API initialization
Info: Connected - KitProg3 DAPLink CMSIS-DAP-190B1301f808151401f8081500000000000000002e127069
Info: The hardware initialization has completed in 286 ms
Found a KitProg firmware image: "/Applications/ModusToolbox/tools_3.2/kp-firmware/kitprog3.cyacd"
Info: The device FW is 'KitProg3' ver. 2.50 b1383. The upgrade file is 'KitProg3' ver. 2.50 b1401.
Info: Disconnected - KitProg3 DAPLink CMSIS-DAP-190B1301f808151401f8081500000000000000002e127069
Info: Connected - KitProg3 Bootloader-F801020815140714
Info: Bootloader Version: Major 1, Minor 1, Build 60
Info: FW Upgrade to version: 2.50 b1401
Info: Bootloading of KitProg FW.
Info: Verifying of KitProg FW.
Info: Bootloading of DAPLink.
Info: Verifying of DAPLink.
Info: The upgrade completed.
Info: Disconnected - KitProg3 Bootloader-F801020815140714
Info: Connected - KitProg3 DAPLink CMSIS-DAP-190B1301f808151401f8081500000000000000002e127069
The firmware update has completed successfully.
ในกรณีที่โหมดการเขียนโปรแกรมยังเป็น "KitProg3 DAPLink CMSIS-DAP
" ให้เปลี่ยนโหมดการเขียนโปรแกรมให้เป็น "KitProg3 CMSIS-DAP BULK
" ดังคำสั่งนี้
Copy ./fw-loader --mode kp3-bulk
─╯
Infineon Firmware Updater, Version: 3.6.0.2303
( C ) Copyright 2018-2024 by Cypress Semiconductor Corporation (an Infineon company )
All Rights Reserved
Info: Start the API initialization
Info: Connected - KitProg3 DAPLink CMSIS-DAP-190B1301f808151401f8081500000000000000002e127069
Info: The hardware initialization has completed in 292 ms
Info: Disconnected - KitProg3 DAPLink CMSIS-DAP-190B1301f808151401f8081500000000000000002e127069
Info: Connected - KitProg3 CMSIS-DAP BULK-141508F801071400
The mode switching completed successfully.
Bug #001 : Switching mode DAPLink to KitProg3 or KitProg3 to DAPLink mo de
Bug issue
Error: It looks like your debug probe is in DAPLink mode. Please switch to KitProg3 mode or use CMSIS-DAP driver instead.
How to Fix
In case pressing the switch button doesn't yield any response, you may need to first update the firmware. Follow the steps below:
Navigate to the necessary directory by entering the following command:
Copy $ cd ModusToolbox/tools_3.1/fw-loader/bin/
Update the firmware by executing the command:
Copy $ ./fw-loader --update-kp3
After updating the firmware, verify the available devices with the command:
Copy $ ./fw-loader --device-list
Once the firmware is updated, you should be able to use the switch mode button successfully.
Bug #002 : "Error: IMU init failed (0x0000)!" message
Bug issues
How to Fix
Find mtb_shared folder in your project and change the BMI160_CHIP_IP
Firmware update
Copy $ cd ~/ModusToolbox/tools_3.1/fw-loader/bin
$ ./fw-loader --update-kp3
$ ./fw-loader --device-list
Bug#003 Can't install edge-impulse-cli
How to fix:
1. Install Visual Studio Installer
Important: You need to use python3.11.x
Install edge-impulse-cli again:
Copy npm install -g edge-impulse-cli --force