[Error] Failed to open f_model

開發環境
作業系統:Win11 64bit
Arduino IDE 版本:2.3.2
Board manager:Realtek Ameba Boards (32-bit Arm v8M @500MH)
4.0.7-build20240430

編譯上傳其他範例程式都可以順利運行,但有些範例卻會出現下列錯誤訊息
[Error] Failed to open f_model.
exit status 1

Compilation error: exit status 1

換別的電腦也是有些有問題,有些成功,想問到底該怎麼解決?
已經嘗試過解除安裝重新下載、Board manager降版本

附上教授給予的無法執行的範例程式(一樣的程式碼別台電腦成功)

IR_VL53L0X.ino

#include <Wire.h>
#include <VL53L0x_IR_libraries/VL53L0X.h>

VL53L0X sensor;

void setup()
{
    Serial.begin(115200);
    Wire.begin();
    //Wire1.begin();

    sensor.setTimeout(500);
    if (!sensor.init()) {
        Serial.println("Failed to detect and initialize sensor!");
        while (1) {
        }
    }

    // Start continuous back-to-back mode (take readings as
    // fast as possible).  To use continuous timed mode
    // instead, provide a desired inter-measurement period in
    // ms (e.g. sensor.startContinuous(100)).
    sensor.startContinuous();
}

void loop()
{
    int distance = sensor.readRangeContinuousMillimeters();
    Serial.print(distance);
    
    if (sensor.timeoutOccurred()) {
        Serial.print(" TIMEOUT");
    }

    Serial.println();
}

您好,
image

可以開啓 “Show verbose output during” 然後附上全log 嗎?

請問您的username 是不是中文?

我目前在我的環境是可以編譯成功。

想瞭解一下,您是如何創建這個範例的?例如,您有把範例存到哪個文件夾嗎?

FQBN: realtek:AmebaPro2:Ameba_AMB82-MINI
Using board ‘Ameba_AMB82-MINI’ from platform in folder: C:\Users\angel\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\4.0.7-build20240430
Using core ‘ambpro2’ from platform in folder: C:\Users\angel\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\4.0.7-build20240430

“C:\Users\angel\AppData\Local\Arduino15\packages\realtek\tools\ameba_pro2_tools\1.3.3/prebuild_windows.exe” “C:\Users\angel\AppData\Local\Arduino15\packages\realtek\tools\ameba_pro2_toolchain\1.0.1-p1” ameba_pro2_toolchain/1.0.1-p1 ameba_pro2_toolchain2/1.0.1-p2 ameba_pro2_toolchain ameba_pro2_toolchain2 “C:\Users\angel\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\4.0.7-build20240430” JXF37 ameba_pro2_nn_models/1.0.0 ameba_pro2_nn_models
if exist C:\Users\angel\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\4.0.7-build20240430\variants\common_libs\libarduino_sensor_sel.adel C:\Users\angel\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\4.0.7-build20240430\variants\common_libs\libarduino_sensor_sel.a
if exist ameba_pro2_toolchain2/1.0.1-p2 xcopy /y /s “ameba_pro2_toolchain2/1.0.1-p2” “ameba_pro2_toolchain/1.0.1-p1”
if exist ameba_pro2_toolchain2 rmdir /s /q ameba_pro2_toolchain2
if exist ameba_pro2_nn_models/1.0.0 xcopy /y /s “ameba_pro2_nn_models/1.0.0” “C:\Users\angel\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\4.0.7-build20240430\variants”
if exist ameba_pro2_nn_models rmdir /s /q ameba_pro2_nn_models
[Error] Failed to open f_model.
copy C:\Users\angel\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\4.0.7-build20240430\variants\common_sensor_sel_libs\SENSOR_F37\libarduino_sensor_sel.a C:\Users\angel\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\4.0.7-build20240430\variants\common_libs\libarduino_sensor_sel.a
�ƻs�F 1 ���ɮסC
“C:\Users\angel\AppData\Local\Arduino15\packages\realtek\tools\ameba_pro2_tools\1.3.3/ino_validation_windows.exe” “C:\Users\angel\AppData\Local\Temp\arduino\sketches\792746B1A92E54D6A00B610AC338918B” “C:\Users\angel\AppData\Local\Arduino15\packages\realtek\tools\ameba_pro2_tools\1.3.3” LoadFromFlash
[420] Unable to open directory: C:\Users\angel\Desktop\雜七雜八\海大\二下\微控制器\Arduino\期末專題\read_qrcode
exit status 1

Compilation error: exit status 1

我創建檔案的方式file–>new sketch
我將我的程式碼存在桌面的資料夾中

您的範例需要儲存在Ameba Arduino SDK 底下。
請您嘗試把範例存在 C:\Users{USERNAME}\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\4.0.7-build20240430\libraries 裏。 建議使用英文命名文件夾與文件的名字。


image

您可以在文件夾中創建一個 src 文件夾把需要的 header files (e.g. VL53L0X.h) 加到文件夾中。您可以參考其他的範例文件夾。
e.g.
image