原创 物联网系统中空开产品电量日志功能的实现方案

2024-10-10 14:27 61 0 分类: 物联网


01

概述


空气开关,又名空气断路器,是断路器的一种。是一种只要电路中电流超过额定电流就会自动断开的开关。空气开关是低压配电网络和电力拖动系统中非常重要的一种电器,它集控制和多种保护功能于一身。除能完成接触和分断电路外,尚能对电路或电气设备发生的短路、严重过载及欠电压等进行保护,同时也可以用于不频繁地启动电动机。

4G网络无线空气开关是一种结合了现代通信技术的断路器,它通过4G网络实现了无线远程控制功能,使得用户可以通过手机或其他智能设备对电路进行控制,包括开启、关闭以及监控电路的状态。这种空气开关不仅提供了远程控制的便利,还增加了电路的安全性和管理的灵活性。

4G空气开关的主要特点包括:

  • 远程控制‌:用户可以通过4G网络,随时随地通过手机APP或其他智能设备对电路进行控制,无需近距离操作。
  • 实时监控‌:能够实时监控电路的状态,包括电流、电压等参数,确保电路安全运行。
  • 故障诊断‌:通过4G网络传输的数据,可以及时发现电路故障,提前预警,避免事故发生。
  • 多种保护功能‌:具备短路保护、过载保护、失压保护等多种保护功能,确保电路和设备的安全。


02

4G空开日志功能


嵌入式开发场景中,数据上报非服务器,服务器进行存储。但有可能上报不上去,这种情况下,就需要设备本身具备一定的日志储存能力。本文中的电量数据,涉及到计费等后续需求。因此,不希望数据丢失,因此需要设备在本地保存数据,防止因为断网等因素,造成数据没有上报给服务器。

带电量计量的空开产品,设备提供给服务器的数据,包括电量信息和电量对应的时间信息。

1 电量数据

电量数据是浮点型数据,在嵌入式平台中,Float是4个字节。红豆版本硬件的Flash有限,因此,使用前需要考虑最多可以存储多少数据。

2 时间戳

每保存一个电量信息,会同时保存电量对应的时间点。服务器可以根据时间和电量画出用电量曲线,曲线可以直观地显示出,用户什么时候用电多,什么时候用电少。


03

组件的使用


注意:日志并非app上的按照年月日显示的日志。当前组件的作用是,提供本地的一些电量存储策略,应对正常上报,或者异常断电数据保存等

空间限制,本地电量日志只能保存有限的日志

1 Gitee链接地址

Demo位于amaziot_bloom_os_sdk\sample\libraries\8.5_ele_log

Gitee源码地址:https://gitee.com/ning./hongdou

Github源码地址:https://github.com/ayumid/hongdou

编译指令:.\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\8.5_ele_log

2 组件功能介绍

电量日志组件提供本地日志一种存储,受限于模组空间,因此日志不会记录太多,通过相应的宏控制大小和记录频次。

日志中只保存时间戳和对应的电量值。

组件会创建三个文件,信息保存文件,以及两个日志文件,两个文件乒乓存储。

3 代码讲解

1 dtu_sw_log_file_init

功能:该函数用于,电量日志文件创建,初始化。

参数:无

返回值:无

示例:


dtu_sw_log_file_init();

2 air_sw_log_write_data

功能:该函数用于,写入电量到文件中,两个文件乒乓写入。

参数:

参数

释义

ele

电量值

返回值:0

示例:


air_sw_log_write_data(1111.1111)

3 air_sw_log_write_file_info_change

功能:该函数用于,清理日志存储文件,乒乓文件信息,用于更换日志存储目标文件。

参数:无

返回值:无

示例:


air_sw_log_write_file_info_change();

4 air_sw_log_write_file_info

功能:该函数用于,写日志信息存储文件。

参数:无

返回值:无

示例:


air_sw_log_write_file_info();

5 air_sw_log_read_file_info

功能:该函数用于,读日志信息存储文件内容。

参数:无

返回值:文件指针

示例:


pst_filei = air_sw_log_read_file_info();

5 air_sw_log_read_log

功能:该函数用于,读日志存储文件内容。

参数:无

返回值:无

示例:


air_sw_log_read_log();

4 Demo实战

4.1 创建一个Demo

复制4.2_hal_UART示例工程,到同一个文件夹下,修改文件名为6.0_CSE7759B,如图:

4.2 修改makefile

增加文件组件所在目录头文件路径,和源文件路径,如图:

4.3 增加头文件

使用代码编辑器,将新建的工程文件加入代码编辑器中,打开main.c,修改main.c,加入am.h等头文件,如图:

4.4 修改代码

在Phase2Inits_exit 创建一个任务,如图:

4.5 宏定义介绍

  • sample_ele_log_uart_printf

输出日志到DEBUG 串口,日志比较少,可以输出到这个串口,如果日志比较多,需要输出到usb口,以免不必要的问题出现

  • sample_ele_log_catstudio_printf

输出日志到USB 串口,使用catstudio查看,catstudio查看日志需要更新对应版本mdb.txt文件,软件打开filtter过滤日志,只查看用户输出的日志

  • SAMPLE_ELE_LOG_TASK_STACK_SIZE

栈空间宏定义

4.6 全局变量介绍

  • sample_ele_log_task_stack

任务栈空间,本例使用动态内存实现,用户在做项目时,可以预先估算下当先任务需要的大致栈空间,OS没有提供可以查看栈空间使用情况的API

  • sample_ele_log_task_ref

任务指针

  • sample_ele_log_timer_ref

定时器指针

  • sample_ele_log_flag_ref

事件指针

4.7 函数介绍

  • Phase1Inits_enter

底层初始化,本例空

  • Phase1Inits_exit

底层初始化,本例空

  • Phase2Inits_enter

底层初始化,本例空

  • Phase2Inits_exit

创建主任务,初始化消息队列,定时器,任务等。

代码片段:


int ret;
sample_ele_log_uart_printf("debug> enter main\n");

ret = OSAFlagCreate(&sample_ele_log_flag_ref);
ASSERT(ret == OS_SUCCESS);
ret = OSATimerCreate(&sample_ele_log_timer_ref);
ASSERT(ret == OS_SUCCESS);
ret = OSATaskCreate(&sample_ele_log_task_ref, sample_ele_log_task_stack, SAMPLE_ELE_LOG_TASK_STACK_SIZE, 200, "filetest-task", sample_ele_log_task, NULL);
ASSERT(ret == OS_SUCCESS);
OSATimerStart(sample_ele_log_timer_ref, 5 * 200, 5 * 200, sample_ele_log_timer_callback, 0); // 3 seconds timer

  • sample_ele_log_timer_callback

定时器回调函数,发送事件给主任务。

代码片段:


OSAFlagSet(sample_ele_log_flag_ref, SAMPLE_ELE_LOG_TASK_TIMER_CHANGE_FLAG_BIT, OSA_FLAG_OR);

  • sample_ele_log_task

日志写入任务,由事件驱动,这里5s一次。

代码片段:


while(1)
{
    status = OSAFlagWait(sample_ele_log_flag_ref, flag_mask, OSA_FLAG_OR_CLEAR, &flag_value, OSA_SUSPEND);
    ASSERT(status == OS_SUCCESS);
//        sample_ele_log_uart_printf("debug> sample_ele_log_count = %d",sample_ele_log_count);
//        sample_ele_log_uart_printf("%s[%d] freesize: %d", __FUNCTION__, __LINE__, FDI_GetFreeSpaceSize());
    if(flag_value & SAMPLE_ELE_LOG_TASK_TIMER_CHANGE_FLAG_BIT)
    {
        air_sw_log_write_data(11111.111111);
    }
    else
    {
        sample_ele_log_uart_printf("debug> open file for write error\n");
    }
}

4.8 编译

在SDK根目录打开命令行,输入命令.\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\8.5_ele_log\


PS F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF
λ .\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\8.5_ele_log\
子目录或文件 out\bin 已经存在。
命令语法不正确。
子目录或文件 build\obj 已经存在。
gnumake: Entering directory `F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.5_ele_log'
armcc.exe -c  --cpu Cortex-R4 --no_unaligned_access -g -O2 --apcs /inter --diag_suppress 2084,1,2,177,188,223,550,1296,2795,6319,9931,9933 --diag_error=warning --gnu --thumb --loose_implicit_cast  -DDATA_COLLECTOR_IMPL -DISPT_OVER_SSP -DDIAG_SSP_DOUBLE_BUFFER_USE_DYNAMIC_ALLOCATION -DENV_XSCALE -DL1_DCXO_ENABLED -DLTE_HIGH_MOBILITY_OPTIMIZATION -DRUN_XIP_MODE -DCRANE_Z2 -DCA_LONG_IPC_MSG -DNEZHA3 -DNEZHA3_1826 -DUPGRADE_PLMS -DUPGRADE_PLMS_SR -DLTE_GSMMULTIBCCH -DGPLC_LTE_RSSI_SCAN -DL1V_NEW_RSSI -DUPGRADE_PLMS_3G -DUPGRADE_PLMS_L1 -DUPGRADE_FG_PLMS -DFG_PLMS_URR -DUPGRADE_L1A_FG_PLMS -DUPGRADE_PLMS_STAGE_2 -DUPGRADE_MBCCH -DMULTI_BCCH_READY_IND -DURR_MRAT_ICS_SEARCH -DUPGRADE_ICS -DMRAT_NAS -DUPGRADE_PLMS_SEARCH_API -DICS_MBCCH -DICS_MBCCH_2G_RSSI -DDIAG_NEWPP -DPHS_SW_DEMO -DPHS_SW_DEMO_TTC -DPHS_SW_DEMO_TTC_PM -DFULL_SYSTEM -D_DDR_INIT_ -D_TAVOR_HARBELL_ -DUPGRADE_ARBEL_PLATFORM -D_TAVOR_B0_SILICON_ -DTDL1C_SPY_ENABLE -DDLM_TAVOR -DTAVOR -DFLAVOR_DUALCORE -DDEBUG_D2_MOR_REG_RESEREVED_ENABLE -D_DIAG_USE_COMMSTACK_ -D_TAVOR_DIAG_ -DPM_DEBUG_MODE_ENABLED -DPM_D2FULL_MODE -DPM_EXT_DBG_INT_ARR -DFEATURE_WB_AMR_PS -DMACRO_FOR_LWG -DHL_LWG -DOPTIMIZE_FOR_2G_BCCH -DPLAT_TEST -D_FDI_USE_OSA_ -DPLAT_USE_THREADX -DLWIP_IPNETBUF_SUPPORT -DCRANE_MCU_DONGLE -DAT_OVER_UART -DPHS_SW_DEMO_TTC_PM -DUPGRADE_LTE_ONLY -DEXT_AT_MODEM_SUPPORT -DLTEONLY_THIN_SINGLE_SIM -DLFS_FILE_SYS -DLFS_FILE_SYS_V2 -DPSM_ENABLE -DNO_PAHO_MQTT -DNO_XML -DNO_LWM2M -DREMOVE_MBEDTLS -DNO_AT_NET -DCRANE_SD_NOT_SUPPORT -DNTP -DYMODEM_EEH_DUMP -DENABLE_DM_LTEONLY -DLTEONLY_THIN -DNO_EXTEND_MY_Q_AT -DNOT_SUPPORT_HTTPS -DNOT_SUPPORT_PM813 -DCRANEL_4MRAM -DREMOVE_PB -DUART_NEW_VERSION -DREMOVE_MEP -DREMOVE_SMS -DREMOVE_ENVSIM -DAPN_INCODE -DLTEONLY_THIN_SINGLE_SIM_2MFLASH -DASR160X_OPENCPU_FEATURE -DENABLE_UART3_FEATRUE -DENABLE_UART4_FEATRUE -DYUGE_MBEDTLS_3_2_1 -DENABLE_MAC_TX_DATA_LOGGING -DDISABLE_NVRAM_ACCESS -DINTEL_UPGRADE_EE_HANDLER_SUPPORT -DLTE_W_PS -DL1_DUAL_MODE -DUPGRADE_HERMON_DUAL -DINTEL_UPGRADE_DUAL_RAT -DINTEL_UPGRADE_GPRS_CIPHER_FLUSH -DUPGRADE_ENHANCED_QUAD_BAND -DINTEL_2CHIP_PLAT -DI_2CHIP_PLAT -DUPGRDE_TAVOR_COMMUNICATION -DRUN_WIRELESS_MODEM -DFLAVOR_DDR12MB_GB1MB5 -DFEATURE_SHMEM -DACIPC_ENABLE_NEW_CALLBACK_MECHANISM -DRELIABLE_DATA -DMAP_NSS -DTV_FNAME="\"SW_PLATFORM=PMD2NONE PHS_SW_DEMO PHS_SW_DEMO_PM SRCNUCLEUS FULL_SYSTEM NOACRTC PDFLT PLAT_TEST PV2 DIAGOSHMEM NVM WITHL1V\"" -DTV_FDESC="\"SW_DESCRIPTION=\"" -DENABLE_ACIPC -D_DATAOMSL_ENABLED_ -DUSB_CABLE_DETECTION_VIA_PMIC -DMIPS_TEST -DMIPS_TEST_RAM -DFLAVOR_DIET_RAM -DNVM_INCLUDE -DMSL_INCLUDE -DMSL_POOL_MEM -DNO_AUDIO -DOSA_QUEUE_NAMES -D_DIAG_DISABLE_USB_ -DOSA_NUCLEUS -DOSA_USED -DPM_D2NONE_MODE -DCRANE_SOC_TEMPERATURE_SENSOR -DL1_SW_UPDATE_FOR_DIGRF -DPHS_L1_SW_UPDATE_R7 -DUPGRADE_LTE -DFRBD_CALIB_NVM -DFRBD_AGC_CALIB -DFRBD_FDT_CALIB -DHSPA_MPR -DCAPT_PARAMS_OPTIMIZE -DL1_WB_R99_ONLY -DL1V_WB_R99_ONLY -DINTERGRATED_RF_SUPPORT -DL1_RX_DIV_SUPPORT -DENABLE_OOS_HANDLING -DTAVOR_D2_WB_L1_SUPPORT -DL1_DDR_HIGH_FREQ -DUPGRADE_DIGRF3G_SUPPORT -DW_PS_PLUS_G_PAGING -D"NO_APLP=0" -DINTEL_UPGRADE_UNIFIED_VOICE_TASK -DINTEL_UPGRADE_R99 -DAPLP_SPY_ENABLE -D__TARGET_FEATURE_DOUBLEWORD -DWHOLE_UMTS_STACK -DUSE_TTPCOM_CSR_BLUETOOTH_AUDIO_GAIN_CONTROL -DL1_UPGRADE_R5 -DUPGRADE_EDGE -DUPGRADE_R4_FS1 -DINTEL_UPGRADE_GSM_CRL_IF -DUPGRADE_EGPRS_M -DINTEL_UPGRADE_EGPRS_M -DINTEL_UPGRADE_RF_PARAMS_IN_CF_TDS -DINTEL_UPGRADE_2SAMPLES_PER_SYMBOL -D"GPRS_MULTISLOT_CLASS=12" -D"EGPRS_MULTISLOT_CLASS=12" -DMARVELL_UPGRADE_BSIC_REDESIGN -DMSL_INCLUDE -DINTEL_HERMON_SAC -DCRANE_CUST_BUILD -DL1_SW_UPDATE_FOR_DIGRF -DFLAVOR_COM -DSILICON_PV2 -DSILICON_SEAGULL -DSILICON_TTC_CORE_SEAGULL -DPCAC_INCLUDE -Otime  -DBUILD_DATE="\"08 07 2024\"" -DBUILD_TIME="\"17:06:38\"" -Iatcmds\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\yuge\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\UART\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\core\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\PMU\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\GPIO\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\posix\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\diag\diag_logic\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\SysCfg\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\platform\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\env\win32\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\BSP\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\platform\dev_plat\build -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\osa\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\threadx\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\nu_xscale\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\psm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\httpclient\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\diag\diag_logic\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\timer\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\intc\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\PM\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\pm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\TickManager\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\BSP\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\atcmdsrv\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\atparser\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\sdk\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\httpclient\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\ci\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\arch -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\ipv4 -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\ipv6 -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\lwip -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\netif -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\mmi_mat\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\tavor\Arbel\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\tavor\env\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\modem\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\duster\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\fota\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\I2C\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\ACIPC\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fatsys\flash -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\INCLUDE -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\MMU\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\FDI_ADD -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\FM_INC -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fatsys\fs\hdr -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\littlefs\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\tts\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\dial\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\csw_memory\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\utilities\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\commpm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\nvm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\EEhandler\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\EEhandler\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\RTC\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\ci_client\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\BT_device\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\UART\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\mrd\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\dma\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\softutil\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\SPI\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\websocket\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\atnet_srv\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fotacomm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\Audio\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\ACM_COMM\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\audio_stub\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\aam\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\AudioHAL\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\dbgshell\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\opencpu\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\amaziot_bloom_os_sdk\utils -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.5_ele_log\am\inc -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.5_ele_log\atcmds\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\amaziot_bloom_os_sdk\libraries -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\amaziot_bloom_os_sdk\libraries\air_4g_sw\air_sw4_tuya -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\amaziot_bloom_os_sdk\utils  -o build\obj/ext_at_cmds.o F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.5_ele_log/atcmds/src/ext_at_cmds.c
armlink.exe build\obj/main.o build\obj/ext_at_cmds.o build\obj/ext_at_controller.o build\obj/utils_string.o build\obj/am_ty_sw_log.o \
                -o F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\bin\Arbel_PMD2NONE_40M.axf \
                --via F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\prebuilt_1606l\Arbel_PMD2NONE_targ_objliblist.txt \
                --elf \
                --scatter F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\prebuilt_1606l\Crane_DS_4M_Ram_2M_Flash_XIP_CIPSRAM_Common_SingleSIM.sct \
                --predefine="-DLTEONLY_THIN_SINGLE_SIM" --map --symbols --info sizes,totals \
                --list F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\bin\Arbel_PMD2NONE_40M.map \
                --keep init.o(Header) --keep init.o(Vectors) --diag_suppress 6312,6314,6319,6329 \
                --feedback F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\feedbackLinkOptLteonlyThin_SingleSim_NoSMS.txt
F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\tools\buildimage_1606l.bat
SDK_PROD_TYPE   : [DM]
SDK_CUST_SKU    : [THIN_SINGLE_SIM_NO_SMS]
SDK_PS_MODE     : [LTEONLY]
SDK_CHIP_VER    : [Z2A0]
SDK_OS_TYPE     : [TX]
Platform Convertion Tools v4.01 with PS option extension
Convertion done!
|INPUT   |out\bin\cp_1606L.bin
|MARK    |NAME    |EXEADDR .LOADADDR.LENGTH  .CPZLADDR|COMPRESS STASTIC              |
|--------|--------|--------.--------.--------.--------|------------------------------|
|This Is LteOnly 4M|
|RW_CPZ_1|DDR_RW_ |7e119000.80064af8.0000cddc.80065000|0000cddc->00003000
|This Is LteOnly 4M|
|RW_CPZ_2|PS_NCAH |7e388000.800718d4.00001300.80068000|00001300->00001000
|This Is LteOnly 4M|
|RW_CPZ_3|ITCM    |7e3dac00.80072bd4.0000f51c.80069000|0000f51c->0000a000
|This Is LteOnly 4M|
|RW_CPZ_4|CODE_PS |7e1aa000.800820f0.0002fe38.80073000|0002fe38->0001e000
|This Is LteOnly 4M|
|RW_CPZ_5|CODEPSB |7e1dc000.800b1f28.000339c0.80091000|000339c0->0001b000
|This Is LteOnly 4M|
|RW_CPZ_6|CODEPSC |7e213000.800e58e8.000323ec.800ac000|000323ec->0001b000
|This Is LteOnly 4M|
|RW_CPZ_7|CODEPSD |7e249000.80117cd4.00028d88.800c7000|00028d88->0001a000
|This Is LteOnly 4M|
|RW_CPZ_8|CODEPSE |7e277000.80140a5c.0002e310.800e1000|0002e310->0001a000
|This Is LteOnly 4M|
|RW_CPZ_9|CODEPSF |7e2a9000.8016ed6c.0001c948.800fb000|0001c948->00011000
|This Is LteOnly 4M|
|RW_CPZ_A|CODE_PL |7e2ca000.8018b6b4.0002fa44.8010c000|0002fa44->0001e000
|This Is LteOnly 4M|
|RW_CPZ_B|CODEPLB |7e2fa000.801bb0f8.00039058.8012a000|00039058->00021000
|This Is LteOnly 4M|
|RW_CPZ_C|CODEPLC |7e337000.801f4150.000268d4.8014b000|000268d4->00011000
|--------|--------|--------.--------.--------.--------|------------------------------|
|                                                     |      0x00203a24 -> 0x00145000|
|                                                     |       2.014(MB) ->  1.270(MB)|
|------------------------------------------------------------------------------------|
cp_1606L.axf
cp_1606L.bin
cp_1606L.map
gnumake: Leaving directory `F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.5_ele_log'
"copy NEZHAC_CP_CNR_MIFI_TX.bin to ./ "

已复制         1 个文件。

4.9 生成固件

参考入门中开发工具,生成工具。

4.10 测试

测试步骤:

  • 参考编译教程,和文档开头的编译指令,进行编译
  • 按照编译教程选择对应的选项
  • 烧录

4.11 固件

上电后,debug串口会打印出计算出的数据;

本文章源自奇迹物联开源的物联网应用知识库Cellular IoT Wiki,更多技术干货欢迎关注收藏Wiki:Cellular IoT Wiki 知识库(https://rckrv97mzx.feishu.cn/wiki/wikcnBvAC9WOkEYG5CLqGwm6PHf)

注:本文部分内容来源于网络,如有侵权,请及时联系我们。

文章评论0条评论)

登录后参与讨论
我要评论
0
0
关闭 站长推荐上一条 /2 下一条