Ameba-AIoT / ameba-arduino-pro2

AmebaPro2 Arduino third-party package SDK
https://www.amebaiot.com/en/ameba-arduino-summary/
MIT License
50 stars 23 forks source link

Compilation Issues with Pre-Release Versions 4.0.8-build20240920 #266

Closed TeaBear5 closed 1 month ago

TeaBear5 commented 1 month ago

Boards

AMB82-MINI

External Hardware

USB Cable to PC for Flashing

Hardware Configuration

SD Card Included

Version

latest dev (checkout manually)

IDE Name

Arduino IDE 2.3.3 & arduino-cli 1.0.0-4c.1 Commit: ba19a2d3

Operating System

Ubuntu 22.04.4 LTS

Auto Flash Mode

Disable

Erase All Flash Memory (16MB)

Disable

Standard Lib

Arduino_STD_PRINTF

Upload Speed

2000000

Description

Compilation Error is Occuring with the 4.0.8-build20240920 BSP

It looks like the following in the arduino ide and arduino-cli tool

cp: cannot stat 'misc/video_img/voe.bi': No such file or directory
cp: cannot stat 'misc/video_img/fcs_data_f37.bi': No such file or directory
cp: cannot stat 'misc/video_img/iq_f37.bi': No such file or directory
cp: cannot stat 'misc/video_img/sensor_f37.bi': No such file or directory
double free or corruption (!prev)
Aborted (core dumped)
cp: cannot stat '/home/tyler/.arduino15/packages/realtek/tools/ameba_pro2_tools/1.3.8/flash_ntz.bin': No such file or directory

exit status 1

Compilation error: exit status 1

This occurs with any sketch that we attempt to compile.f

I have included the verbose compile error in the Error/Debug Message section

Sketch

#include "ota_thread.h"
#include "WiFi.h"

char ssid[] = "Network_SSID";    // your network SSID (name)
char pass[] = "Password";        // your network password
int status = WL_IDLE_STATUS;

void setup()
{
    Serial.begin(115200);

    // Connection to internet
    while (status != WL_CONNECTED) {
        Serial.print("Attempting to connect to WPA SSID: ");
        Serial.println(ssid);
        status = WiFi.begin(ssid, pass);
        delay(2000);
    }

    // Set up the threads
    start_OTA_threads();
}

void loop()
{
    // Empty or add non-blocking code here
}

Error/Debug Message

cp: cannot stat 'misc/video_img/voe.bi'cp misc/sys_img/* ./
cp image_tool/flash_loader_nor.bin ./
cp -r misc/video_img/SENSOR_F37/* ./
cp misc/video_img/voe.bi ./
cp misc/video_img/fcs_data_dummy.bin ./
cp misc/video_img/iq.bin ./
cp misc/video_img/sensor.bin ./
cp misc/video_img/SENSOR_F37/non_fcs/amebapro2_isp_iq.json ./
cp misc/video_img/fcs_data_f37.bi ./
cp misc/video_img/iq_f37.bi ./
: No such file or directory
cp: cannot stat 'misc/video_img/fcs_data_f37.bi': No such file or directory
cp: cannot stat 'misc/video_img/iq_f37.bi': No such file or directory
cp: cannot stat 'misc/video_img/sensor_f37.bi': No such file or directory
cp misc/video_img/sensor_f37.bi ./
cp misc/nn_img/amebapro2_nn_model.json ./
cp -r "/home/tyler/.arduino15/packages/realtek/hardware/AmebaPro2/4.0.8-build20240920/variants/common_nn_models"/* ./
cp -r "/tmp/arduino/sketches/E5486A702DFC6981AA9E807639AFF5E4/application.ntz" ./
cp -r "/tmp/arduino/sketches/E5486A702DFC6981AA9E807639AFF5E4/application.ntz.map" ./
/home/tyler/.arduino15/packages/realtek/tools/ameba_pro2_toolchain/1.0.1-p1/bin/arm-none-eabi-nm application.ntz | sort > application.ntz.nm.map
/home/tyler/.arduino15/packages/realtek/tools/ameba_pro2_toolchain/1.0.1-p1/bin/arm-none-eabi-objdump -d application.ntz > application.ntz.asm
/home/tyler/.arduino15/packages/realtek/hardware/AmebaPro2/4.0.8-build20240920/variants/ameba_amb82-mini/{build.sym_bklist}
cp application.ntz application.ntz.axf
./misc/elf2bin.linux convert amebapro2_sensor_set.json ISP_SENSOR_SETS isp_iq.bin
double free or corruption (!prev)
Aborted (core dumped)
./misc/elf2bin.linux convert amebapro2_isp_iq.json FIRMWARE firmware_isp_iq.bin
./misc/elf2bin.linux convert amebapro2_firmware.json FIRMWARE firmware.bin
./misc/elf2bin.linux convert amebapro2_fwfs_nn_models.json FWFS fwfs_nn_model.bin
./misc/elf2bin.linux convert amebapro2_nn_model.json FIRMWARE nn_model.bin
-----> manifest 1376 is smaller than defination 4096

./misc/elf2bin.linux combine amebapro2_partitiontable.json system_files.bin PT_PT=partition.bin,CER_TBL=certable.bin,KEY_CER1=certificate.bin,PT_BL_PRI=boot.bin,PT_FCSDATA=boot_fcs.bin
./misc/elf2bin.linux combine amebapro2_partitiontable.json flash_ntz.bin PT_PT=partition.bin,CER_TBL=certable.bin,KEY_CER1=certificate.bin,PT_BL_PRI=boot.bin,PT_FW1=firmware.bin,PT_NN_MDL=nn_model.bin,PT_ISP_IQ=firmware_isp_iq.bin,PT_FCSDATA=boot_fcs.bin
cp -f /home/tyler/.arduino15/packages/realtek/tools/ameba_pro2_tools/1.3.8/flash_ntz.bin /tmp/arduino/sketches/E5486A702DFC6981AA9E807639AFF5E4
cp: cannot stat '/home/tyler/.arduino15/packages/realtek/tools/ameba_pro2_tools/1.3.8/flash_ntz.bin': No such file or directory

Using library AmebaOTA at version 1.0.0 in folder: /home/tyler/.arduino15/packages/realtek/hardware/AmebaPro2/4.0.8-build20240920/libraries/OTA 
Using library WiFi at version 1.0.0 in folder: /home/tyler/.arduino15/packages/realtek/hardware/AmebaPro2/4.0.8-build20240920/libraries/WiFi 
exit status 1

Compilation error: exit status 1

Reproduce remarks

No response

I have checked online documentation, FAQ, GitHub Wiki and existing/closed issues.

github-actions[bot] commented 1 month ago

Hello, hope this message finds you well. Congrats to your first Issue! We will review it as soon as possiable. Feel free to have a look at https://www.amebaiot.com/en/ameba-arduino-summary/ for more information

M-ichae-l commented 1 month ago

Thanks for the issue report. This is a bug because of EOF, it is fixed at latest version. Please refer to 4.0.8-build20241003

TeaBear5 commented 1 month ago

@M-ichae-l Thanks! The new version compiles without issue.