-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 4.0.0 – 2022/12/14 Feature: - Add support of Windows OS, and Linux OS (Ubuntu) - Add board AMB82-MINI (RTL8735B) - Add GPIO, Analog, SPI, I2C, Gtimer, and RTC examples - Add Auto Upload Mode and Erase Flash - Add WiFi examples - Remove "WiFi shield check" - Add BLE examples - Add camera/sensor JFX37 support - Add video libraries and basic examples - Add Video streaming related examples API Updates: - Add Arduino build/compile and upload environments - "boards.txt" - "platform.txt" - "programmers.txt" - Add Arduino core files - "main.cpp" and "Arduino.h" related files - RTL8735B related driver files - Add Ameba SDK header/reference files - Add AMB82-MINI related libraries, linker files and Pin mapping files - Add peripheral, WiFi, and BLE API files - Add Video streaming API files Misc: - Add ameba_pro2_toolchain_windows-1.0.1 - Add ameba_pro2_toolchain_linux-1.0.1 - Add ameba_pro2_toolchain_macos-1.0.1 - Add ameba_pro2_tools_windows-1.0.6 - Add ameba_pro2_tools_linux-1.0.6 - Add ameba_pro2_tools_macos-1.0.6 - Add "Fritzing and Pinmux" folder - Add "Documents" folder
- Loading branch information
Showing
4,963 changed files
with
1,628,148 additions
and
1 deletion.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+265 KB
Ameba_misc/Documents/Video API/Example Guide/MP4RecordingExampleGuide.pdf
Binary file not shown.
Binary file added
BIN
+540 KB
Ameba_misc/Documents/Video API/Example Guide/RTSPStreamingExampleGuide.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+217 KB
Ameba_misc/Fritzing and Pinmux/AMB82 MINI (RTL8735B)/AMB82-MINI (RTL8735B).fzpz
Binary file not shown.
Binary file added
BIN
+127 KB
... Pinmux/AMB82 MINI (RTL8735B)/graphics/AMB82-MINI (RTL8735B) top 2022-10-06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13,687 changes: 13,687 additions & 0 deletions
13,687
... Pinmux/AMB82 MINI (RTL8735B)/graphics/AMB82-MINI (RTL8735B) top 2022-10-06.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+313 KB
...zing and Pinmux/AMB82 MINI (RTL8735B)/graphics/AMB82-MINI Pinmap 2022-10-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17,192 changes: 17,192 additions & 0 deletions
17,192
...zing and Pinmux/AMB82 MINI (RTL8735B)/graphics/AMB82-MINI Pinmap 2022-10-12.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+196 KB
...ritzing and Pinmux/AMB82 MINI (RTL8735B)/graphics/AMB82-MINI btm 2022-10-06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
890 changes: 890 additions & 0 deletions
890
...ritzing and Pinmux/AMB82 MINI (RTL8735B)/graphics/AMB82-MINI btm 2022-10-06.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added
BIN
+29.5 KB
Arduino_package/ameba_pro2_tools_linux/image_tool/Auto_Flash_Pro2_V3.3_linux
Binary file not shown.
198 changes: 198 additions & 0 deletions
198
Arduino_package/ameba_pro2_tools_linux/image_tool/src/image_linux.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
/* | ||
Compile: | ||
windows: | ||
mingw32-g++.exe -o image_windows.exe image_windows.cpp -static | ||
i686-w64-mingw32-g++.exe -o image_windows.exe image_windows.cpp -static | ||
linux (ubuntu 20.04 TLS ,64 bits app generated): | ||
g++ -o image_linux image_linux.cpp -static | ||
g++ -std=c++11 -lpthread -o image_linux image_linux.cpp | ||
macos: | ||
g++ -o image_macos image_macos.cpp | ||
*/ | ||
|
||
#include <iostream> | ||
#include <sstream> | ||
#include <vector> | ||
#include <cstring> | ||
#include <cstdlib> | ||
#include <string> | ||
#include <cstdio> | ||
#include <sys/stat.h> | ||
#include <fstream> | ||
#include <unistd.h> | ||
|
||
//#include <windows.h> | ||
|
||
#include <thread> | ||
#include <time.h> | ||
#include <errno.h> | ||
|
||
using namespace std; | ||
|
||
#if defined(__WIN32__) // MINGW64 | ||
#include <windows.h> | ||
|
||
#elif defined(__linux__) || defined(__APPLE__)// ubuntu 32 bits and OS X 64bits | ||
#include <sys/ioctl.h> | ||
#include <fcntl.h> | ||
|
||
#else | ||
|
||
#error compiler is not supported! | ||
|
||
#endif | ||
|
||
int msleep(long msec) { | ||
struct timespec ts; | ||
int res; | ||
|
||
if (msec < 0) { | ||
errno = EINVAL; | ||
return -1; | ||
} | ||
|
||
ts.tv_sec = msec / 1000; | ||
ts.tv_nsec = (msec % 1000) * 1000000; | ||
|
||
do { | ||
res = nanosleep(&ts, &ts); | ||
} while (res && errno == EINTR); | ||
|
||
return res; | ||
} | ||
|
||
stringstream cmdss; | ||
string cmd; | ||
int check_flash_erase = 0; | ||
int check_image_upload = 0; | ||
int check_download_process = 0; | ||
|
||
string auto_board, auto_user_selection, flash_erase_mode_user_selection, flash_speed, serial_port, auto_tool_name, flash_tool_name, video_init_user_selection; | ||
|
||
void download_process(void) { | ||
if (check_flash_erase == 100) { | ||
cmdss.clear(); | ||
cmdss << "./image_tool/" << flash_tool_name << " -p " << serial_port <<" -b " << flash_speed << " -e chip -r "; | ||
getline(cmdss, cmd); | ||
//cout << cmd << endl; | ||
system(cmd.c_str()); | ||
check_flash_erase = 0; | ||
} | ||
if (check_image_upload == 100) { | ||
cmdss.clear(); | ||
if (video_init_user_selection == "Enable") { | ||
cmdss << "./image_tool/" << flash_tool_name << " -p " << serial_port << " -f flash_ntz.bin -b " << flash_speed << " -r "; | ||
} else { | ||
cmdss << "./image_tool/" << flash_tool_name << " -p " << serial_port << " -f flash_ntz.bin -b " << flash_speed << " -s 0x100000 -r "; | ||
} | ||
getline(cmdss, cmd); | ||
//cout << cmd << endl; | ||
system(cmd.c_str()); | ||
check_image_upload = 0; | ||
} | ||
check_download_process = 100; | ||
} | ||
|
||
void download_indicate(void) { | ||
if (check_flash_erase == 100) { | ||
cout << " Erasing." << flush; | ||
while (1) { | ||
msleep(1000); | ||
if (check_download_process != 0) { | ||
break; | ||
} else { | ||
cout << "." << flush; | ||
} | ||
} | ||
cout << " End Erase Flash" << endl; | ||
} else { | ||
cout << " Uploading." << flush; | ||
while (1) { | ||
msleep(1000); | ||
if (check_download_process != 0) { | ||
break; | ||
} else { | ||
cout << "." << flush; | ||
} | ||
} | ||
cout << " End Upload Flash" << endl; | ||
} | ||
} | ||
|
||
int main(int argc, char *argv[]) { | ||
//string auto_board, auto_user_selection, flash_erase_mode_user_selection, flash_speed; | ||
|
||
// 0. change work folder | ||
chdir(argv[1]); | ||
|
||
// 1. rset up all strings | ||
auto_board = argv[3]; | ||
auto_user_selection = argv[4]; | ||
flash_erase_mode_user_selection = argv[5]; | ||
flash_speed = argv[6]; | ||
serial_port = argv[2]; | ||
auto_tool_name = argv[8]; | ||
flash_tool_name = argv[7]; | ||
video_init_user_selection = argv[9]; | ||
|
||
if (argv[9]) { | ||
video_init_user_selection = argv[9]; | ||
} else { | ||
video_init_user_selection = "Disable"; | ||
} | ||
|
||
if (auto_user_selection == "Enable") { | ||
cout << " Enter Auto Flash Mode!" << endl; | ||
cmdss.clear(); | ||
cmdss << "./image_tool/" << auto_tool_name << " ./ " << serial_port <<" 115200"; | ||
getline(cmdss, cmd); | ||
//cout << cmd << endl; | ||
system(cmd.c_str()); | ||
} else { | ||
cout << " Please Enter Flash Mode Manually!" << endl; | ||
for (int i = 5; i > 0; i--) { | ||
msleep(1000); | ||
cmd = to_string(i); | ||
cout << " 0" << cmd << endl; | ||
} | ||
} | ||
|
||
#if 0 | ||
if (flash_erase_mode_user_selection == "Enable") { | ||
cout << " Start Erase Flash" << endl; | ||
cmdss.clear(); | ||
cmdss << "./image_tool/" << argv[7] << " -p " << argv[2] <<" -b " << argv[6] << " -e chip -r "; | ||
getline(cmdss, cmd); | ||
//cout << cmd << endl; | ||
system(cmd.c_str()); | ||
return 0; | ||
} else { | ||
cout << " Start Upload Flash" << endl; | ||
cmdss.clear(); | ||
cmdss << "./image_tool/" << argv[7] << " -p " << argv[2] << " -f flash_ntz.bin -b " << argv[6] << " -r "; | ||
getline(cmdss, cmd); | ||
//cout << cmd << endl; | ||
system(cmd.c_str()); | ||
} | ||
#else | ||
if (flash_erase_mode_user_selection == "Enable") { | ||
cout << " Start Erase Flash" << endl; | ||
check_flash_erase = 100; | ||
} else { | ||
cout << " Start Upload Flash" << endl; | ||
check_image_upload = 100; | ||
} | ||
#endif | ||
|
||
thread t2(download_indicate); | ||
thread t1(download_process); | ||
|
||
t2.join(); | ||
t1.join(); | ||
|
||
return 0; | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
74 changes: 74 additions & 0 deletions
74
Arduino_package/ameba_pro2_tools_linux/misc/image/amebapro2_firmware.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"msg_level":3, | ||
|
||
"PROFILE":["FIRMWARE"], | ||
"FIRMWARE":{ | ||
"manifest":"MANIFEST", | ||
"images":[ | ||
"IQ_SENSOR", | ||
"VOE", | ||
"FW" | ||
] | ||
}, | ||
"MANIFEST":{ | ||
"label":"RTL8735B", | ||
"vrf_alg": "NA_VRF_CHECK", | ||
"tlv":[ | ||
{"type":"PK", "length":384, "value":"auto"}, | ||
{"type":"TYPE_ID", "length":2, "value":"IMG_FWHS_S"}, | ||
{"type":"VERSION", "length":32, "value":"FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"}, | ||
{"type":"TIMST", "length":8, "value":"auto"}, | ||
{"type":"IMGSZ", "length":4, "value":"auto"}, | ||
{"type":"ENCALG", "length":1, "value":"auto"}, | ||
{"type":"ENCKN", "length":32, "value":"auto"}, | ||
{"type":"ENCKS", "length":32, "value":"auto"}, | ||
{"type":"ENCIV", "length":16, "value":"auto"}, | ||
{"type":"HSHALG", "length":1, "value":"auto"}, | ||
{"type":"HSHKN", "length":32, "value":"auto"}, | ||
{"type":"HSHKS", "length":32, "value":"auto"}, | ||
{"type":"IE_RESV", "length":32, "value":"auto"}, | ||
{"type":"HASH", "length":32, "value":"auto"} | ||
] | ||
}, | ||
"VOE": { | ||
"source":"binary", | ||
"header":{ | ||
"type":"IMG_VOE" | ||
}, | ||
"file":"voe.bin" | ||
}, | ||
"IQ_SENSOR": { | ||
"source":"binary", | ||
"header":{ | ||
"type":"IMG_ISP" | ||
}, | ||
"file":"firmware_isp_iq.bin" | ||
}, | ||
"FW": { | ||
"source":"application.ntz.axf", | ||
"header":{ | ||
"type":"IMG_FWHS_S", | ||
"entry": "__ram_start_table_start__" | ||
}, | ||
"blocks" : ["sram", "ddr"], | ||
"sram": { | ||
"type":"SIMG_SRAM", | ||
"sections": [ | ||
".ram.img.signature", | ||
".ram.func.table", | ||
".ram.data", | ||
".ram.code_text", | ||
".ram.code_rodata" | ||
] | ||
}, | ||
"ddr": { | ||
"type":"SIMG_DDR", | ||
"sections": [ | ||
".ddr.code.text", | ||
".ddr.text", | ||
".ddr.data", | ||
".ddr.rodata" | ||
] | ||
} | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
Arduino_package/ameba_pro2_tools_linux/misc/image/amebapro2_firmware_NA_cam.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"msg_level":3, | ||
|
||
"PROFILE":["FIRMWARE"], | ||
"FIRMWARE":{ | ||
"manifest":"MANIFEST", | ||
"images":[ | ||
"FW" | ||
] | ||
}, | ||
"MANIFEST":{ | ||
"label":"RTL8735B", | ||
"vrf_alg": "NA_VRF_CHECK", | ||
"tlv":[ | ||
{"type":"PK", "length":384, "value":"auto"}, | ||
{"type":"TYPE_ID", "length":2, "value":"IMG_FWHS_S"}, | ||
{"type":"VERSION", "length":32, "value":"FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"}, | ||
{"type":"TIMST", "length":8, "value":"auto"}, | ||
{"type":"IMGSZ", "length":4, "value":"auto"}, | ||
{"type":"ENCALG", "length":1, "value":"auto"}, | ||
{"type":"ENCKN", "length":32, "value":"auto"}, | ||
{"type":"ENCKS", "length":32, "value":"auto"}, | ||
{"type":"ENCIV", "length":16, "value":"auto"}, | ||
{"type":"HSHALG", "length":1, "value":"auto"}, | ||
{"type":"HSHKN", "length":32, "value":"auto"}, | ||
{"type":"HSHKS", "length":32, "value":"auto"}, | ||
{"type":"IE_RESV", "length":32, "value":"auto"}, | ||
{"type":"HASH", "length":32, "value":"auto"} | ||
] | ||
}, | ||
"VOE": { | ||
"source":"binary", | ||
"header":{ | ||
"type":"IMG_VOE" | ||
}, | ||
"file":"voe.bin" | ||
}, | ||
"IQ_SENSOR": { | ||
"source":"binary", | ||
"header":{ | ||
"type":"IMG_ISP" | ||
}, | ||
"file":"firmware_isp_iq.bin" | ||
}, | ||
"FW": { | ||
"source":"application.ntz.axf", | ||
"header":{ | ||
"type":"IMG_FWHS_S", | ||
"entry": "__ram_start_table_start__" | ||
}, | ||
"blocks" : ["sram", "ddr"], | ||
"sram": { | ||
"type":"SIMG_SRAM", | ||
"sections": [ | ||
".ram.img.signature", | ||
".ram.func.table", | ||
".ram.data", | ||
".ram.code_text", | ||
".ram.code_rodata" | ||
] | ||
}, | ||
"ddr": { | ||
"type":"SIMG_DDR", | ||
"sections": [ | ||
".ddr.code.text", | ||
".ddr.text", | ||
".ddr.data", | ||
".ddr.rodata" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.