diff --git a/vendor/platform/Simcom-A7670C/BoatFabricDemo/README.md b/vendor/platform/Simcom-A7670C/BoatFabricDemo/README.md index 7f53c3d9f..dbfd64750 100644 --- a/vendor/platform/Simcom-A7670C/BoatFabricDemo/README.md +++ b/vendor/platform/Simcom-A7670C/BoatFabricDemo/README.md @@ -12,11 +12,12 @@ 1、拷贝 BoAT代码,将 BoAT-X-Framework 整个文件夹拷贝至``下。 -2、拷贝并覆盖 `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_demo`到``下。 +2、拷贝 `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_demo/src`下的文件到`/sc_demo/src`下。 -3、拷贝并覆盖 `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_application.c`到``下。 +3、拷贝 `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_demo/inc`下的文件到`/sc_demo/inc`下。 + +4、拷贝并覆盖 `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_application.c`到``下。 -4、拷贝并覆盖 `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/BoAT-X-Framework`到`/BoAT-X-Framework`下。 拷贝后的目录和文件结构如下: ``` @@ -120,6 +121,11 @@ ${CMAKE_SOURCE_DIR}/BoAT-X-Framework/sdk/network/hlfabric ``` + 再找到 `list(APPEND sc_demo_src ./src/demo_helloworld.c)`,然后在下方添加以下内容: + ``` + list(APPEND sc_demo_src ./src/boat_fabric_demo.c) + ``` + ## 四、编译BoAT-X-Framework静态库 @@ -130,11 +136,11 @@ PLATFORM_TARGET ?= Simcom-A7670C ``` - #### b、打开Cygwin终端进入BoAT-X-Framework目录编译BoAT静态库 + #### b、打开终端进入BoAT-X-Framework目录编译BoAT静态库 ``` cd /BoAT-X-Framework - ../tools/win32/GNUmake.exe clean - ../tools/win32/GNUmake.exe all + make clean + make all ``` 编译成功后,在BoAT-X-Framework/lib下会生成静态库`libboatvendor.a`、`libboatwallet.a`。 @@ -148,7 +154,7 @@ ``` cd make clean - make A7670C_LANS + make A7670C_LANS_1606_V701 ``` - 编译成功会在`/out`下生成`A7670C_LANS.zip`下载文件。 \ No newline at end of file + 编译成功会在`/out`下生成`A7670C_LANS_1606_V701.zip`下载文件。 \ No newline at end of file diff --git a/vendor/platform/Simcom-A7670C/BoatFabricDemo/README_en.md b/vendor/platform/Simcom-A7670C/BoatFabricDemo/README_en.md index abec37539..ed3fdd9d5 100644 --- a/vendor/platform/Simcom-A7670C/BoatFabricDemo/README_en.md +++ b/vendor/platform/Simcom-A7670C/BoatFabricDemo/README_en.md @@ -12,11 +12,12 @@ Assuming `` to be the root directory of A7670C SDK: 1. Copy the entire BoAT-X-Framework directory into `/app`. -2. Copy `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_demo` into ``. +2. Copy files under `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_demo/src` into `/sc_demo/src`. -3. Copy `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_application.c` into ``. +3. Copy files under `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_demo/inc` into `/sc_demo/inc`. + +4. Copy and replace `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/A7670CRootDirCode/sc_application.c` into ``. -4. Copy `BoAT-X-Framework/vendor/platform/Simcom-A7670C/BoatFabricDemo/BoAT-X-Framework` into `/BoAT-X-Framework`. After these files copied, the directory structure should look like: @@ -120,6 +121,11 @@ After these files copied, the directory structure should look like: ${CMAKE_SOURCE_DIR}/BoAT-X-Framework/vendor/platform/include ${CMAKE_SOURCE_DIR}/BoAT-X-Framework/sdk/network/hlfabric ``` + + Then, find `list(APPEND sc_demo_src ./src/demo_helloworld.c)`, add the following content in the last new line: + ``` + list(APPEND sc_demo_src ./src/boat_fabric_demo.c) + ``` ## Compile BoAT-X-Framework Static library @@ -131,11 +137,11 @@ After these files copied, the directory structure should look like: PLATFORM_TARGET ?= Simcom-A7670C ``` - #### b. Open a Cygwin shell, enter /BoAT-X-Framework directory and compile BoAT static library + #### b. Open a Windows cmd, enter /BoAT-X-Framework directory and compile BoAT static library ``` cd /BoAT-X-Framework - ../tools/win32/GNUmake.exe clean - ../tools/win32/GNUmake.exe all + make clean + make all ``` After compiling, static library `libboatvendor.a` and `libboatwallet.a` will be created in `/BoAT-X-Framework/lib` directory. @@ -143,13 +149,13 @@ After these files copied, the directory structure should look like: ### 2. Build demo program, generate .zip file for download - Demo code for accessing blockchain through BoAT-X Framework is in `/sc_demo/src/boat_fabric_demo.c`。 + Demo code for accessing blockchain through BoAT-X Framework is in `/sc_demo/src/boat_fabric_demo.c`. Open a Windows cmd window and build the download file: ``` cd make clean - make A7670C_LANS + make A7670C_LANS_1606_V701 ``` - The download file `A7670C_LANS.zip` will be generated under `/out` once compiled successfully. \ No newline at end of file + The download file `A7670C_LANS_1606_V701.zip` will be generated under `/out` once compiled successfully. \ No newline at end of file