Browse Source

Работа с входами. Доработка api modbus.

TelenkovDmitry 1 year ago
parent
commit
94054d288b

+ 19 - 12
fw/modules/io/input.c

@@ -5,20 +5,21 @@
 #include <stdio.h>
 
 
-in_t inputs[INPUT_NUMBER] = {
-    {GPIOB, GPIO_PINS_11, 1, GPIO_PORT_SOURCE_GPIOB, GPIO_PINS_SOURCE11, 0, false, 0}, // 1   
-    {GPIOB, GPIO_PINS_10, 1, GPIO_PORT_SOURCE_GPIOB, GPIO_PINS_SOURCE10, 0, false, 0}, // 2
-    {GPIOE, GPIO_PINS_14, 1, GPIO_PORT_SOURCE_GPIOE, GPIO_PINS_SOURCE14, 0, false, 0}, // 3 перенесли {GPIOB, GPIO_PINS_1,  1, GPIO_PORT_SOURCE_GPIOB, GPIO_PINS_SOURCE1,  0},
-    {GPIOE, GPIO_PINS_15, 1, GPIO_PORT_SOURCE_GPIOE, GPIO_PINS_SOURCE15, 0, false, 0}, // 4 перенесли {GPIOB, GPIO_PINS_0,  1, GPIO_PORT_SOURCE_GPIOB, GPIO_PINS_SOURCE0,  0},
-    {GPIOA, GPIO_PINS_3,  1, GPIO_PORT_SOURCE_GPIOA, GPIO_PINS_SOURCE3,  0, false, 0}, // 5
-    {GPIOA, GPIO_PINS_2,  1, GPIO_PORT_SOURCE_GPIOA, GPIO_PINS_SOURCE2,  0, false, 0}, // 6
-    {GPIOA, GPIO_PINS_1,  1, GPIO_PORT_SOURCE_GPIOA, GPIO_PINS_SOURCE1,  0, false, 0}, // 7
-    {GPIOA, GPIO_PINS_0,  1, GPIO_PORT_SOURCE_GPIOA, GPIO_PINS_SOURCE0,  0, false, 0}  // 8
+
+din_t inputs[DI_NUMBER] = {
+    {GPIOB, GPIO_PINS_11, 0, GPIO_PORT_SOURCE_GPIOB, GPIO_PINS_SOURCE11, 0, false, 0}, // 1   
+    {GPIOB, GPIO_PINS_10, 0, GPIO_PORT_SOURCE_GPIOB, GPIO_PINS_SOURCE10, 0, false, 0}, // 2
+    {GPIOE, GPIO_PINS_14, 0, GPIO_PORT_SOURCE_GPIOE, GPIO_PINS_SOURCE14, 0, false, 0}, // 3 перенесли {GPIOB, GPIO_PINS_1,  1, GPIO_PORT_SOURCE_GPIOB, GPIO_PINS_SOURCE1,  0},
+    {GPIOE, GPIO_PINS_15, 0, GPIO_PORT_SOURCE_GPIOE, GPIO_PINS_SOURCE15, 0, false, 0}, // 4 перенесли {GPIOB, GPIO_PINS_0,  1, GPIO_PORT_SOURCE_GPIOB, GPIO_PINS_SOURCE0,  0},
+    {GPIOA, GPIO_PINS_3,  0, GPIO_PORT_SOURCE_GPIOA, GPIO_PINS_SOURCE3,  0, false, 0}, // 5
+    {GPIOA, GPIO_PINS_2,  0, GPIO_PORT_SOURCE_GPIOA, GPIO_PINS_SOURCE2,  0, false, 0}, // 6
+    {GPIOA, GPIO_PINS_1,  0, GPIO_PORT_SOURCE_GPIOA, GPIO_PINS_SOURCE1,  0, false, 0}, // 7
+    {GPIOA, GPIO_PINS_0,  0, GPIO_PORT_SOURCE_GPIOA, GPIO_PINS_SOURCE0,  0, false, 0}  // 8
 };
 
 
 //
-void in_init(in_t *input)
+void in_init(din_t *input)
 {
     gpio_init_type gpio_init_struct;
     exint_init_type exint_init_struct;
@@ -100,12 +101,18 @@ void input_task(void *params)
 {
     for (;;)
     {
-        for (int i = 0; i < INPUT_NUMBER; i++)
+        
+        for (int i = 0; i < DI_NUMBER; i++)
         {
             // Режим обычного входа
             if (inputs[i].mode == 0)
             {
                 input_state[i] = (uint16_t)gpio_input_data_bit_read(inputs[i].port, inputs[i].pin);
+                
+                if (!input_state[i])
+                    input_state_bit &= ~(1 << i); // снять бит
+                else
+                    input_state_bit |= input_state[i] << i;
             }
         }
             
@@ -116,7 +123,7 @@ void input_task(void *params)
 //
 inline void debounce(void)
 {
-    for (int i = 0; i < INPUT_NUMBER; i++)
+    for (int i = 0; i < DI_NUMBER; i++)
     {
         if (inputs[i].p_flag) {
             if (++inputs[i].cnt == DEBOUNCE_CNT) {

+ 2 - 2
fw/modules/io/input.h

@@ -5,10 +5,10 @@
 #include "io.h"
 
 
-extern in_t inputs[];
+extern din_t inputs[];
 
 //
-void in_init(in_t *input);
+void in_init(din_t *input);
 
 //
 void in_exint_init(void);

+ 6 - 4
fw/modules/io/io.c

@@ -7,13 +7,15 @@
 #include <stdio.h>
 
 
-uint16_t input_state[INPUT_NUMBER];     // состояние входа
+uint16_t input_state[DI_NUMBER];     // состояние входа
+uint16_t input_state_bit;
+
 
 // -------------------------------------------------------------------------- //
 // Текущие параметры
 
-//uint16_t input_state[INPUT_NUMBER];     // состояние входа
-uint32_t input_cnt[INPUT_NUMBER];       // счетчики входов
+//uint16_t input_state[DI_NUMBER];     // состояние входа
+uint32_t input_cnt[DI_NUMBER];       // счетчики входов
 
 
 //
@@ -37,7 +39,7 @@ void io_port_init(void)
 //
 void io_init(void)
 {
-    for (int i = 0; i < INPUT_NUMBER; i++)
+    for (int i = 0; i < DI_NUMBER; i++)
     {
         in_init(&inputs[i]);
     }

+ 18 - 13
fw/modules/io/io.h

@@ -5,7 +5,18 @@
 
 // Период опроса входов 100 мс
 
-#define INPUT_NUMBER    8    // Количество входов
+// -------------------------------------------------------------------------- //
+// Дискретые входы
+
+#define DI_NUMBER       8   // Количество входов
+
+#define DI_MODE_IN      0   // Режим обычного входа
+
+#define DI_MODE_CNT     1   // Режим счетного входа
+
+
+// -------------------------------------------------------------------------- //
+// Выходы
 #define OUTPUT_NUMBER   8    // Количество выходов
 
 #define DEBOUNCE_CNT    50
@@ -47,7 +58,7 @@ typedef struct
     bool p_flag;
     uint32_t cnt;
     
-} in_t;
+} din_t;
 
 
 typedef struct
@@ -64,23 +75,17 @@ typedef struct
 // -------------------------------------------------------------------------- //
 // Текущие параметры
 
-extern uint16_t input_state[INPUT_NUMBER];     // состояние входа
+extern uint16_t input_state[DI_NUMBER];      // состояние входа
+extern uint16_t input_state_bit;                // битовое поле
 
-extern uint32_t input_cnt[INPUT_NUMBER];       // счетчики входов
+extern uint32_t input_cnt[DI_NUMBER];       // счетчики входов
 
-//uint16_t output_state[INPUT_NUMBER];    // состояние выхода, 0 - норма, 1 - обрыв, 2 - КЗ
+//uint16_t output_state[DI_NUMBER];    // состояние выхода, 0 - норма, 1 - обрыв, 2 - КЗ
 
 
 // -------------------------------------------------------------------------- //
 // Структуры настроек. Хранятся во внутренней памяти контроллера.
 
-//
-typedef struct
-{
-    uint16_t mode;           // режим работы, 0 - вход, 1 - счетчик импульсов
-    uint16_t debounce_time;  // период антидребезга в мс
-} input_t;
-
 
 //
 // контроль состояний - обрыв, КЗ, норма
@@ -100,7 +105,7 @@ typedef struct
 typedef struct
 {
     uint16_t smode;         // безопасный режим 0 - включен, 1 - выключен
-    uint16_t com_timeout;    // время ожидания запроса от мастера
+    uint16_t com_timeout;   // время ожидания запроса от мастера
 } system_t;
 
 

+ 379 - 0
fw/modules/misc/rtc.c

@@ -0,0 +1,379 @@
+#include "rtc.h"
+#include "lwip/apps/sntp.h"
+#include "settings_api.h"
+#include <string.h>
+
+
+//TM_RTC_t calendar;
+
+/* Days in a month */
+uint8_t TM_RTC_Months[2][12] = {
+	{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},	/* Not leap year */
+	{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}	/* Leap year */
+};
+
+// monthly correction data sheet
+const uint8_t table_week[12] = {0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5};
+
+// monmonth data table of common year
+const uint8_t mon_table[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+
+/* Internal RTC defines */
+#define TM_RTC_LEAP_YEAR(year) 			((((year) % 4 == 0) && ((year) % 100 != 0)) || ((year) % 400 == 0))
+#define TM_RTC_DAYS_IN_YEAR(x)			TM_RTC_LEAP_YEAR(x) ? 366 : 365
+#define TM_RTC_OFFSET_YEAR				1970
+#define TM_RTC_SECONDS_PER_DAY			86400
+#define TM_RTC_SECONDS_PER_HOUR			3600
+#define TM_RTC_SECONDS_PER_MINUTE		60
+#define TM_RTC_BCD2BIN(x)				((((x) >> 4) & 0x0F) * 10 + ((x) & 0x0F))
+#define TM_RTC_CHAR2NUM(x)				((x) - '0')
+#define TM_RTC_CHARISNUM(x)				((x) >= '0' && (x) <= '9')
+
+
+extern SemaphoreHandle_t flash_mutex;
+
+
+
+/**
+  * @brief  rtc peripheral initialization.
+  * @param  calendar
+  * @retval 0: rtc already init
+            1: rtc init
+  */
+uint8_t TM_RTC_Init(void)
+{
+    TM_RTC_t datatime;
+    
+    // enable pwc and bpr clocks
+    crm_periph_clock_enable(CRM_PWC_PERIPH_CLOCK, TRUE);
+    crm_periph_clock_enable(CRM_BPR_PERIPH_CLOCK, TRUE);
+    
+    // enable the battery-powered domain write operations
+    pwc_battery_powered_domain_access(TRUE);
+    
+    // check if rtc is initialized 
+    if (bpr_data_read(BPR_DATA4) != 0x1234)
+    {
+        // reset battery-powered domain register
+        bpr_reset();
+        
+        // enable the lext osc
+        crm_clock_source_enable(CRM_CLOCK_SOURCE_LEXT, TRUE);
+        // wait lext is ready
+        while(crm_flag_get(CRM_LEXT_STABLE_FLAG) == RESET);
+        // select the rtc clock source
+        crm_rtc_clock_select(CRM_RTC_CLOCK_LEXT);
+        
+        // enable rtc clock
+        crm_rtc_clock_enable(TRUE);
+        
+        // wait for rtc registers update 
+        rtc_wait_update_finish();
+        
+        // wait for the register write to complete
+        rtc_wait_config_finish();
+        
+        // set rtc divider: set rtc period to 1sec 
+        rtc_divider_set(32767);
+        
+        // wait for the register write to complete
+        rtc_wait_config_finish();
+        
+        // set date and time
+        datatime.date    = 1;
+        datatime.day     = 1;
+        datatime.month   = 1;
+        datatime.year    = 0;
+        datatime.hours   = 0;
+        datatime.minutes = 0;
+        datatime.seconds = 0;
+        
+        TM_RTC_SetDateTime(&datatime);
+        
+        // writes data to bpr register 
+        bpr_data_write(BPR_DATA4, 0x1234);
+        
+        return 1;
+    }
+    else
+    {
+        // wait for rtc registers update
+        rtc_wait_update_finish();
+
+        // wait for the register write to complete
+        rtc_wait_config_finish();
+    
+        return 0;    
+    }
+}
+
+
+//
+void TM_RTC_SetDataTimeUnix(uint32_t unixTime)
+{
+    TM_RTC_t data;
+  
+    TM_RTC_GetDateTimeFromUnix(&data, unixTime);
+    rtc_counter_set(unixTime);
+    rtc_wait_config_finish();
+}
+
+
+/**
+  * @brief  set time. convert the input clock to a second.
+  *         the time basic : 1970.1.1
+  *         legitimate year: 1970 ~ 2099
+  * @param  calendar
+  * @retval 0: set time right.
+  *         1: set time failed.
+  */
+TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data)
+{
+    uint32_t seccount = 0;
+    
+    if (data->year > 99 || 
+		data->month == 0 || 
+		data->month > 12 ||
+		data->date == 0 ||
+		data->date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + data->year) ? 1 : 0][data->month - 1] ||
+		data->hours > 23 ||
+		data->minutes > 59 ||
+		data->seconds > 59 ||
+		data->day == 0 ||
+		data->day > 7) 
+    {
+		return TM_RTC_Result_Error; 
+	}
+    
+    // enable pwc and bpr clocks
+    crm_periph_clock_enable(CRM_PWC_PERIPH_CLOCK, TRUE);
+    crm_periph_clock_enable(CRM_BPR_PERIPH_CLOCK, TRUE);
+    
+    // enable write access to bpr domain
+    pwc_battery_powered_domain_access(TRUE);
+    
+    // set the rtc counter value
+    seccount = TM_RTC_GetUnixTimeStamp(data);
+    rtc_counter_set(seccount);
+    
+    // wait for the register write to complete
+    rtc_wait_config_finish();
+    
+    return TM_RTC_Result_Ok;
+}
+
+
+//
+TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str) 
+{
+	TM_RTC_t tmp;
+	uint8_t i = 0;
+	
+	// Get date
+	tmp.date = 0;
+	while (TM_RTC_CHARISNUM(*(str + i))) {
+		tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i));
+		i++;
+	}
+	i++;
+	
+	// Get month
+	tmp.month = 0;
+	while (TM_RTC_CHARISNUM(*(str + i))) {
+		tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i));
+		i++;
+	}
+	i++;
+	
+	// Get year
+	tmp.year = 0;
+	while (TM_RTC_CHARISNUM(*(str + i))) {
+		tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i));
+		i++;
+	}
+	i++;
+	
+	// Get day in a week
+	tmp.day = 0;
+	while (TM_RTC_CHARISNUM(*(str + i))) {
+		tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i));
+		i++;
+	}
+	i++;
+	
+	// Get hours
+	tmp.hours = 0;
+	while (TM_RTC_CHARISNUM(*(str + i))) {
+		tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i));
+		i++;
+	}
+	i++;
+	
+	// Get minutes
+	tmp.minutes = 0;
+	while (TM_RTC_CHARISNUM(*(str + i))) {
+		tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i));
+		i++;
+	}
+	i++;
+	
+	// Get seconds
+	tmp.seconds = 0;
+	while (TM_RTC_CHARISNUM(*(str + i))) {
+		tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i));
+		i++;
+	}
+	i++;
+	
+	// Return status from set date time function 
+	return TM_RTC_SetDateTime(&tmp);
+}
+
+
+//
+void TM_RTC_GetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) 
+{
+    (void)format;
+	uint32_t unix = rtc_counter_get();
+
+    TM_RTC_GetDateTimeFromUnix(data, unix);
+}
+
+
+//
+uint32_t TM_RTC_GetUnixTimeStamp(TM_RTC_t* data) 
+{
+	uint32_t days = 0, seconds = 0;
+	uint16_t i;
+	uint16_t year = (uint16_t)(data->year + 2000);
+
+	// Year is below offset year
+	if (year < TM_RTC_OFFSET_YEAR) {
+		return 0;
+	}
+	// Days in back years
+	for (i = TM_RTC_OFFSET_YEAR; i < year; i++) {
+		days += TM_RTC_DAYS_IN_YEAR(i);
+	}
+	// Days in current year
+	for (i = 1; i < data->month; i++) {
+		days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1];
+	}
+	// Day starts with 1
+	days += data->date - 1;
+	seconds = days * TM_RTC_SECONDS_PER_DAY;
+	seconds += data->hours * TM_RTC_SECONDS_PER_HOUR;
+	seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE;
+	seconds += data->seconds;
+	
+	// seconds = days * 86400;
+	return seconds;
+}
+
+
+//
+void TM_RTC_GetDateTimeFromUnix(TM_RTC_t* data, uint32_t unix) 
+{
+	uint16_t year;
+	
+	// Store unix time to unix in struct
+	data->unix = unix;
+	// Get seconds from unix
+	data->seconds = unix % 60;
+	// Go to minutes
+	unix /= 60;
+	// Get minutes
+	data->minutes = unix % 60;
+	// Go to hours 
+	unix /= 60;
+	// Get hours
+	data->hours = unix % 24;
+	// Go to days
+	unix /= 24;
+	
+	// Get week day
+	// Monday is day one
+	data->day = (unix + 3) % 7 + 1;
+
+	// Get year
+	year = 1970;
+	while (1) {
+		if (TM_RTC_LEAP_YEAR(year)) {
+			if (unix >= 366) {
+				unix -= 366;
+			} else {
+				break;
+			}
+		} else if (unix >= 365) {
+			unix -= 365;
+		} else {
+			break;
+		}
+		year++;
+	}
+	// Get year in xx format
+	data->year = (uint8_t) (year - 2000);
+	// Get month
+	for (data->month = 0; data->month < 12; data->month++) {
+		if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) {
+			unix -= TM_RTC_Months[1][data->month];
+		} else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) {
+			unix -= TM_RTC_Months[0][data->month];
+		} else {
+			break;
+		}
+	}
+	// Get month
+	// Month starts with 1
+	data->month++;
+	// Get date
+	// Date starts with 1
+	data->date = unix + 1;
+}
+
+
+//
+void TM_RTC_PrintTime(void)
+{
+    TM_RTC_t data;
+    
+    uint32_t unix = rtc_counter_get();
+    
+    TM_RTC_GetDateTimeFromUnix(&data, unix);
+	
+	printf("%02d.%02d.%02d %02d:%02d:%02d\r\n", data.date, data.month, data.year,
+			data.hours, data.minutes, data.seconds);
+
+}
+
+
+//
+uint32_t RTC_GetUnixTime(void)
+{
+    TM_RTC_t currentTime;
+  
+    TM_RTC_GetDateTime(&currentTime, TM_RTC_Format_BIN);
+    return TM_RTC_GetUnixTimeStamp(&currentTime);
+}
+
+
+#if 0
+//
+void sntp_config(void)
+{
+	sntp_setoperatingmode(SNTP_OPMODE_POLL);
+	sntp_setservername(0, sSettings.sSNTP.ip1);
+  	sntp_setservername(1, sSettings.sSNTP.ip2);
+
+  	sntp_init();
+}
+
+
+//
+void lwip_time_sinhro(uint32_t utime)
+{
+	printf("SNTP: sinhro hook: %u\n\r", utime);
+	utime += 3600*(int)sSettings.sSNTP.timeZone;
+    TM_RTC_SetDataTimeUnix(utime);
+}
+#endif

+ 79 - 0
fw/modules/misc/rtc.h

@@ -0,0 +1,79 @@
+#ifndef __RTC_H
+#define __RTC_H
+
+
+#include "at32f403a_407.h"
+
+
+#define TM_RTC_LEAP_YEAR(year) 			((((year) % 4 == 0) && ((year) % 100 != 0)) || ((year) % 400 == 0))
+
+
+
+typedef struct
+{
+    __IO uint8_t  seconds;      /*!< Seconds parameter, from 00 to 59 */
+    __IO uint16_t subseconds;   /*!< Subsecond downcounter. When it reaches zero, it's reload value is the same as
+                                     @ref RTC_SYNC_PREDIV, so in our case 0x3FF = 1023, 1024 steps in one second */
+	__IO uint8_t  minutes;      /*!< Minutes parameter, from 00 to 59 */
+	__IO uint8_t  hours;        /*!< Hours parameter, 24Hour mode, 00 to 23 */
+	__IO uint8_t  day;          /*!< Day in a week, from 1 to 7 */
+	__IO uint8_t  date;         /*!< Date in a month, 1 to 31 */
+	__IO uint8_t  month;        /*!< Month in a year, 1 to 12 */
+	__IO uint8_t  year;         /*!< Year parameter, 00 to 99, 00 is 2000 and 99 is 2099 */
+	__IO uint32_t unix;         /*!< Seconds from 01.01.1970 00:00:00 */
+  
+} TM_RTC_t;
+
+
+// RTC Result enumeration
+typedef enum {
+	TM_RTC_Result_Ok,           /*!< Everything OK */
+	TM_RTC_Result_Error         /*!< An error occurred */
+} TM_RTC_Result_t;
+
+
+
+// RTC date and time format
+typedef enum {
+	TM_RTC_Format_BIN = 0x00, /*!< RTC data in binary format */
+	TM_RTC_Format_BCD         /*!< RTC data in binary-coded decimal format */
+} TM_RTC_Format_t;
+
+
+
+//
+uint8_t TM_RTC_Init(void);
+
+//
+void TM_RTC_SetDataTimeUnix(uint32_t unixTime);
+
+//
+TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data);
+
+//
+TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str);
+
+//
+void TM_RTC_GetDateTime(TM_RTC_t* data, TM_RTC_Format_t format);
+
+//
+uint32_t TM_RTC_GetUnixTimeStamp(TM_RTC_t* data);
+
+//
+void TM_RTC_GetDateTimeFromUnix(TM_RTC_t* data, uint32_t unix);
+
+//
+void TM_RTC_PrintTime(void);
+
+//
+uint32_t RTC_GetUnixTime(void);
+
+#if 0
+//
+void sntp_config(void);
+
+//
+void lwip_time_sinhro(uint32_t utime);
+#endif
+
+#endif

+ 16 - 55
fw/modules/misc/uptime.c

@@ -1,13 +1,10 @@
-#include "uptime.h" 
+#include "uptime.h"
+#include "rtc.h"
+#include <stdio.h>
 
-#define ONE_DAY_RESET_SEC       86400
 
-#define TASK_LIST_SIZE          6
-
-static uint32_t uptime = 0;
-
-task_list_t task_list[TASK_LIST_SIZE];
-static uint8_t task_number = 0;
+uint32_t uptime = 0;
+uint32_t rtc_unix = 0;
 
 //
 void get_uptime(uint32_t *value)
@@ -21,67 +18,31 @@ void uptime_init(void)
 {
     crm_clocks_freq_type crm_clocks_freq_struct = {0};
     
-    crm_periph_clock_enable(CRM_TMR6_PERIPH_CLOCK, TRUE);
+    crm_periph_clock_enable(CRM_TMR10_PERIPH_CLOCK, TRUE);
 
     crm_clocks_freq_get(&crm_clocks_freq_struct);
-    tmr_base_init(TMR6, 9999, (crm_clocks_freq_struct.ahb_freq / 20000) - 1);
-    tmr_cnt_dir_set(TMR6, TMR_COUNT_UP);
+    tmr_base_init(TMR10, 9999, (crm_clocks_freq_struct.ahb_freq / 10000) - 1);
+    tmr_cnt_dir_set(TMR10, TMR_COUNT_UP);
         
-    tmr_flag_clear(TMR6, TMR_OVF_FLAG);
+    tmr_flag_clear(TMR10, TMR_OVF_FLAG);
 
     nvic_priority_group_config(NVIC_PRIORITY_GROUP_4);
-    nvic_irq_enable(TMR6_GLOBAL_IRQn, 5, 0);
+    nvic_irq_enable(TMR1_OVF_TMR10_IRQn, 5, 0);
        
-    tmr_counter_enable(TMR6, TRUE);
+    tmr_counter_enable(TMR10, TRUE);
     
-    tmr_interrupt_enable(TMR6, TMR_OVF_INT, TRUE);
+    tmr_interrupt_enable(TMR10, TMR_OVF_INT, TRUE);
 }
 
 
-//
-#if 0
-void TMR6_GLOBAL_IRQHandler(void)
+void TMR1_OVF_TMR10_IRQHandler(void)
 {
-    if(tmr_flag_get(TMR6, TMR_OVF_FLAG) != RESET)
+    if(tmr_flag_get(TMR10, TMR_OVF_FLAG) != RESET)
     {
-        tmr_flag_clear(TMR6, TMR_OVF_FLAG);
+        tmr_flag_clear(TMR10, TMR_OVF_FLAG);
         uptime++;
-        
-        if (uptime >= ONE_DAY_RESET_SEC) {
-            nvic_system_reset();
-        }
-        
-        wdt_task_process();
+        rtc_unix = RTC_GetUnixTime();
     }
 }
-#endif
-
-//
-uint8_t wdt_add_task(uint32_t max)
-{
-    if (task_number == TASK_LIST_SIZE)
-        return 0;
-    task_list[task_number++].max_cnt = max;
-    return task_number - 1;
-}
 
 
-//
-void wdt_reset_cnt(uint8_t id)
-{
-    task_list[id].cnt = 0;
-}
-
-
-//
-void wdt_task_process(void) 
-{
-    for (uint8_t i = 0; i < task_number; i++)
-    {
-        if (task_list[i].cnt++ > task_list[i].max_cnt) 
-        {
-            //printf("Alarm! Task id %u wdt error!\r\n", i);
-            NVIC_SystemReset();
-        }
-    }
-}

+ 3 - 14
fw/modules/misc/uptime.h

@@ -1,29 +1,18 @@
-/* Define to prevent recursive  ----------------------------------------------*/
 #ifndef UPTIME_H
 #define UPTIME_H
 
 #include "at32f403a_407.h"
 
 
-typedef struct 
-{   
-    uint32_t id;
-    uint32_t cnt;
-    uint32_t max_cnt;
-    
-} task_list_t;
-
-
-
 //
 void uptime_init(void);
   
 void get_uptime(uint32_t *value);
 
-uint8_t wdt_add_task(uint32_t max);
 
-void wdt_reset_cnt(uint8_t id);
+extern uint32_t uptime;
+
+extern uint32_t rtc_unix;
 
-void wdt_task_process(void);
 
 #endif /* #ifndef UPTIME */

+ 119 - 9
fw/modules/modbus/modbus_params.c

@@ -1,22 +1,70 @@
 #include "at32f403a_407.h"
 #include "modbus_params.h"
+#include "settings_api.h"
 #include "io.h"
+#include "uptime.h"
+#include "rtc.h"
 #include <string.h>
 
 
 mb_param_t mb_param[MB_PARAM_MAX];
 
+uint32_t rtc_sinhro;
+
+void get_time(uint8_t* buf, uint8_t size);
+void get_din_mode(uint8_t* buf, uint8_t size);
 
 
 //
 void mb_init_params(void)
 {
-    mb_param[0].reg = 0x0100;
-	mb_param[0].size = 1;
-	mb_param[0].param = (uint8_t*)&input_state[0];  // Текущее состояние входа
-	mb_param[0].set_handler = NULL;
-    mb_param[0].check_handler = mb_check_dummy;
+    uint16_t index = 0;
+    uint16_t addr = 0;
+  
+    mb_param[index].reg = 0x0100;
+	mb_param[index].size = 1;
+	mb_param[index].param = (uint8_t*)&input_state_bit;  // Текущее состояние входа
+	mb_param[index].set = NULL;
+    mb_param[index].get = NULL;
+    mb_param[index].check_handler = mb_check_dummy;
+    
+    index++;
+    
+    // Счетчики импульсов. Регистры 0x0102 - 0x0111
+    addr = 0x0102;
+    for (int i = 0; i < DI_NUMBER; i++)
+    {
+        mb_param[index].reg = addr;
+        mb_param[index].size = 2;
+        mb_param[index].param = (uint8_t*)&input_cnt[i];  // Счетчик ипульсов
+        mb_param[index].set = NULL;
+        mb_param[index].get = NULL;
+        mb_param[index].check_handler = mb_check_dummy;
+        
+        addr += 2;
+        index++;
+    } 
+    
+    mb_param[index].reg = 0x0120;
+	mb_param[index].size = 1;
+	mb_param[index].param = (uint8_t*)&settings.mode_bits;  // Текущее состояние входа
+	mb_param[index].set = NULL;
+    mb_param[index].get = NULL;
+    mb_param[index].check_handler = mb_check_dummy;
+    
+    index++;
     
+    mb_param[index].reg = 0x0122;
+	mb_param[index].size = 1;
+	mb_param[index].param = (uint8_t*)&settings.mode_bits;  // Текущее состояние входа
+	mb_param[index].set = NULL;
+    mb_param[index].get = NULL;
+    mb_param[index].check_handler = mb_check_dummy;
+    
+    index++;
+    
+    
+#if 0
     mb_param[1].reg = 0x0101;
 	mb_param[1].size = 1;
 	mb_param[1].param = (uint8_t*)&input_state[1];  // Текущее состояние входа
@@ -106,6 +154,28 @@ void mb_init_params(void)
 	mb_param[15].param = (uint8_t*)&input_cnt[0];  // Счетчик ипульсов
 	mb_param[15].set_handler = NULL;
     mb_param[15].check_handler = mb_check_dummy;
+    
+    // ---------------------------------------------------------------------- //
+    // Системные параметры
+    
+    mb_param[16].reg = 0x0800;
+	mb_param[16].size = 2;
+	mb_param[16].param = (uint8_t*)&uptime;     // Uptime
+	mb_param[16].set_handler = NULL;
+    mb_param[16].check_handler = mb_check_dummy;
+    
+    mb_param[17].reg = 0x0802;
+	mb_param[17].size = 2;
+	mb_param[17].param = (uint8_t*)&rtc_unix;   // Unix time stamp
+	mb_param[17].set_handler = NULL;
+    mb_param[17].check_handler = mb_check_dummy;
+    
+    mb_param[18].reg = 0x0804;
+	mb_param[18].size = 2;
+	mb_param[18].param = (uint8_t*)&rtc_sinhro;   // Unix time stamp
+	mb_param[18].set_handler = mb_set_time;
+    mb_param[18].check_handler = mb_check_dummy;
+#endif    
 }
 
 
@@ -147,8 +217,8 @@ mb_delay_action_t mb_set_param(uint8_t *buf, uint16_t index)
     
     mb_param[index].check_handler();
     
-    if (mb_param[index].set_handler != NULL)
-        return mb_param[index].set_handler();
+    if (mb_param[index].set != NULL)
+        return mb_param[index].set();
     else
         return MB_NO_ACTION;
     
@@ -164,7 +234,14 @@ mb_delay_action_t mb_set_param(uint8_t *buf, uint16_t index)
 //
 void mb_get_param(uint8_t *buf, uint16_t index)
 {
-	uint8_t *ptr = mb_param[index].param + 2*mb_param[index].size - 1;
+    uint8_t *ptr;
+	
+    if (mb_param[index].get != NULL) {
+        mb_param[index].get(buf, mb_param[index].size);
+        return;
+    }
+
+    ptr = mb_param[index].param + 2*mb_param[index].size - 1;
 
 	for (uint16_t i = 0; i < 2*mb_param[index].size; i++)
 	{
@@ -172,7 +249,6 @@ void mb_get_param(uint8_t *buf, uint16_t index)
 		buf++;
 		ptr--;
 	}
-
 }
 
 
@@ -252,6 +328,39 @@ uint8_t mb_get_info(uint8_t *buf)
 	return ret;
 }
 
+// -------------------------------------------------------------------------- //
+//                          Чтение параметров
+// -------------------------------------------------------------------------- //
+
+void get_time(uint8_t* buf, uint8_t size)
+{
+    uint32_t rtc_unix = RTC_GetUnixTime();
+    uint8_t *ptr = (uint8_t*)&rtc_unix + 2*size - 1;
+
+    for (uint16_t i = 0; i < 2*size; i++)
+	{
+		*buf = *ptr;
+		buf++;
+		ptr--;
+	}
+}
+
+void get_din_mode(uint8_t* buf, uint8_t size)
+{
+    
+}
+
+// -------------------------------------------------------------------------- //
+//                          Установка параметров
+// -------------------------------------------------------------------------- //
+
+//
+mb_delay_action_t mb_set_time(void)
+{
+    TM_RTC_SetDataTimeUnix(rtc_sinhro);
+    
+    return MB_NO_ACTION;
+}
 
 
 
@@ -266,3 +375,4 @@ void mb_check_dummy(void)
 
 
 
+

+ 4 - 202
fw/modules/modbus/modbus_params.h

@@ -9,7 +9,7 @@
 #include <stdbool.h>
 
 
-#define MB_PARAM_MAX			16
+#define MB_PARAM_MAX			10
 
 
 //
@@ -19,7 +19,8 @@ typedef struct {
 	uint16_t size;
 	uint8_t *param;
 	bool f_activity;	
-	mb_delay_action_t (*set_handler)(void);
+	mb_delay_action_t (*set)(void);
+    void (*get)(uint8_t* buf, uint8_t size);
     void (*check_handler)(void);
 
 } mb_param_t;
@@ -55,35 +56,7 @@ bool mb_set_addr_serial(uint8_t *buf, uint8_t *addr);
 // -------------------------------------------------------------------------- //
 
 //
-mb_delay_action_t mb_set_pwm_freq_1(void);
-
-//
-mb_delay_action_t mb_set_pwm_freq_2(void);
-
-//
-mb_delay_action_t mb_set_pwm_freq_3(void);
-
-//
-mb_delay_action_t mb_set_duty(void);
-
-//
-mb_delay_action_t mb_set_port(void);
-
-//
-mb_delay_action_t mb_password(void);
-
-//
-mb_delay_action_t mb_sys_settings_save(void);
-
-//
-mb_delay_action_t mb_control(void);
-
-//
-mb_delay_action_t mb_relay(void);
-
-//
-mb_delay_action_t mb_led(void);
-
+mb_delay_action_t mb_set_time(void);
 
 // -------------------------------------------------------------------------- //
 //                      Проверка параметров                                   //
@@ -92,176 +65,5 @@ mb_delay_action_t mb_led(void);
 //
 void mb_check_dummy(void);
 
-// ---------------------------------------------------------------------- //
-// Каналы управления вентиляторами
-
-//
-void mb_check_pwm_freq_1(void);
-
-//
-void mb_check_pwm_freq_2(void);
-
-//
-void mb_check_pwm_freq_3(void);
-
-//
-void mb_check_tacho_speed_1(void);
-
-//
-void mb_check_tacho_speed_2(void);
-
-//
-void mb_check_tacho_speed_3(void);
-
-//
-void mb_check_noise_limit_1(void);
-
-//
-void mb_check_noise_limit_2(void);
-
-//
-void mb_check_noise_limit_3(void);
-
-//
-void mb_check_crash_val_1(void);
-
-//
-void mb_check_crash_val_2(void);
-
-//
-void mb_check_crash_val_3(void);
-
-//
-void mb_check_pulse_number_1(void);
-
-//
-void mb_check_pulse_number_2(void);
-
-//
-void mb_check_pulse_number_3(void);
-
-//
-void mb_check_duty_1(void);
-
-//
-void mb_check_duty_2(void);
-
-//
-void mb_check_duty_3(void);
-
-// 
-void mb_check_pwm_type_1(void);
-
-// 
-void mb_check_pwm_type_2(void);
-
-// 
-void mb_check_pwm_type_3(void);
-
-// ---------------------------------------------------------------------- //
-// Конфигурация подключений
-
-//
-void mb_check_output_cnt(void);
-
-//
-void mb_check_input_4(void);
-
-//
-void mb_check_input_5(void);
-
-//
-void mb_check_input_6(void);
-
-// ---------------------------------------------------------------------- //
-// Температура
-
-//
-void mb_check_temp_alg(void);
-
-//
-void mb_check_temp_low_limit(void);
-
-//
-void mb_check_temp_low_hyst(void);
-
-// ---------------------------------------------------------------------- //
-// Алгоритм управления вентиляторами
-
-//
-void mb_check_temp_limit(void);
-
-//
-void mb_check_alg_max_limit(void);
-
-//
-void mb_check_alg_max_hyst(void);
-
-//
-void mb_check_con_timeout(void);
-
-//
-void mb_check_max_limit_hyst(void);
-
-// ---------------------------------------------------------------------- //
-// PID регулятор
-
-//
-void mb_check_p_factor(void);
-
-//
-void mb_check_i_factor(void);
-
-//
-void mb_check_d_factor(void);
-
-// ---------------------------------------------------------------------- //
-// Дискретные входы
-
-//
-void mb_check_input_1(void);
-
-//
-void mb_check_input_2(void);
-
-// ---------------------------------------------------------------------- //
-// Реле
-
-//
-void mb_check_relay(void);
-
-// ---------------------------------------------------------------------- //
-// Время
-
-void mb_check_time(void);
-
-// ---------------------------------------------------------------------- //
-// Системные переменные
-
-//
-void mb_check_model(void);
-
-//
-void mb_check_proddate(void);
-
-//
-void mb_check_serial(void);
-
-//
-void mb_check_fw_version(void);
-
-//
-void mb_check_state(void);
-
-//
-void mb_check_reley(void);
-
-
-/*
-extern bool psw_ok;
-extern bool set_sys_settings_flag;
-extern sys_settings_t temp_sys_settings;
-extern uint16_t temp_modbus_port;
-*/
 
 #endif // __MODBUS_PARAMS_H

+ 19 - 1
fw/modules/settings/settings_api.c

@@ -107,10 +107,16 @@ void settings_set_all_default(void)
 {
     settings_set_modbus_def(&settings.com_settings.mb_port);
     
+    memset(settings.com_settings.model, 0, MODEL_LEN);
+    memcpy(settings.com_settings.model, MODEL_STR, strlen(MODEL_STR));
+        
     settings.settings_version = SETTINGS_VERSION;
     settings.critical_section_crc = settings_get_crit_sec_crc(&settings);
     settings.control_word = SETTINGS_CONTROL_WORD;
-      
+
+    // Дискретные/счетные входы
+    settings_din_def(&settings);
+    
 #if 0  
     SETTINGS_SetWebParamsDef();
     SETTINGS_SetTempWebParamsDef();
@@ -209,6 +215,18 @@ void settings_conv_modbus_def(modbus_t *mb_settings, uint16_t *mb_port)
 	*mb_port = param;
 }
 
+// Установить параметры дискретных входов по умолчанию
+void settings_din_def(settings_t *settings)
+{
+    settings->mode_bits = 0;
+    settings->norm_state_bits = 0;
+    
+    for (int i = 0; i < DI_NUMBER; i++) {
+        settings->di_debounce[i] = 50;
+    }
+}
+
+
 // -------------------------------------------------------------------------- //
 
 // Запись структуры настроек во flash

+ 37 - 186
fw/modules/settings/settings_api.h

@@ -2,14 +2,29 @@
 #define SETTINGS_API_H
 
 #include "at32f403a_407.h"
-#include <stdbool.h>
+#include "model_cfg.h"
 #include "usart.h"
 #include "sys_api.h"
-
+#include "io.h"
+#include <stdbool.h>
 
 
 // Изменить версию если поменялась структура настроек
-#define SETTINGS_VERSION   0x01
+#define SETTINGS_VERSION    0x01
+
+
+
+// ------------------------------------------------------------------- //
+//					 		Draft
+// ------------------------------------------------------------------- //
+
+/*
+1. Uptime (uint32_t)                    // +
+2. Realtime (unix timestamp, uint32_t)  // +
+3. Версия прошивки                      // +
+4. Модель (char 16 байт)                // +
+
+*/
 
 
 
@@ -32,10 +47,18 @@ typedef struct
 typedef struct
 {
     uint16_t    mb_port;    // Настройки порта для modbus
-    
+    char model[MODEL_LEN];  // Модель
 } com_settings_t;
 
 
+#if 0
+// Дискретные входы
+typedef struct
+{
+    uint16_t debounce_time; // период антидребезга в мс (0 - 10 сек)
+} dinput_t;
+#endif
+
 
 // Полная структура настроек
 typedef struct
@@ -50,6 +73,12 @@ typedef struct
 * В случае повреждения критического сектора, загружаются параметры по умолчанию. */    
     uint16_t        settings_version;   // Версия структуры настроек 
     uint32_t        control_word;       // Слово для контроля целостности структуры настроек
+    
+    uint16_t        mode_bits;          // режим работы, 0 - вход, 1 - счетчик импульсов
+    uint16_t        norm_state_bits;    // нормальное состояние (0 - разомкнут, 1 - замкнут)        
+    uint16_t        di_debounce[DI_NUMBER];   // Дискретные входы
+    
+      
 } settings_t;
 
 
@@ -82,6 +111,9 @@ void settings_set_modbus_def(uint16_t *mb_port);
 //
 void settings_conv_modbus_def(modbus_t *mb_settings, uint16_t *mb_port);
 
+// Установить параметры дискретных входов по умолчанию
+void settings_din_def(settings_t *settings);
+
 // -------------------------------------------------------------------------- //
 
 // Запись структуры настроек во flash
@@ -94,192 +126,11 @@ void settings_write_to_flash(uint8_t *data, uint32_t size);
 void settings_erase_flash_sector(void);
 
 
-#if 0
-
-// Общая структура настроек
-typedef struct
-{
-    //uint32_t    
-  WEB_PARAMS_t  sWebParams;
-  WEB_PARAMS_t  sWebTempParams;
-  DEVICE_INFO_t sInfo;
-  uint32_t      CritSecCRC;
-/* WARNING! До поля CritSecCRC включительно структура настроек должна быть
-* идентичной между бутлоадером и основным ПО и не должна изменяться при обновлении ПО.
-* Контроль целостности настроек внутри IAP выполняется только для критической секции,
-* т.к. контроль целостности всей структуры не имеет смысла
-* (структура настроек всегда будет отличаться внутри основного ПО).
-* В случае повреждения критического сектора, загружаются параметры по умолчанию. */
-  GSM_t         sGSM[NUM_GSM]; 
-  FLAGS_t       sFlags;
-  ETHERNET_t    sEthernet;      //настройка подключения Ethernet 
-  SERVER_t      sServer;
-  PROXY_t       sProxy;
-  AUTH_t        sAuth[MAX_WEB_USERS];
-  PORTGW_t      sPortGw[NUM_PORTGW];        // Настройки прозрачного порта
-  SNTP_t        sSNTP;   
-  PSD_t         sPSD;   
-  uint16_t      settVer;       // Версия структуры настроек 
-  uint32_t      controlWorld;  // Слово для контроля целостности структуры настроек
-} SETTINGS_t;
-
-/**
-  * @brief  Общая структура настроек
-  */
-
-
-/**
-  * @brief
-  * @retval
-  */
-uint32_t SETTINGS_GetCritSecCRC(void);
-
-/**
-  * @brief  Установить параметры сетевого подключения по умолчанию
-  */
-void SETTINGS_SetWebParamsDef(void);
-
-/**
-  * @brief  Установить временные параметры сетевого подключения по умолчанию
-  */
-void SETTINGS_SetTempWebParamsDef(void);
-
-/**
-  * @brief  Установить Информацию об устройстве по умолчанию
-  */
-void SETTINGS_SetInfoDef(void);
-
-/**
-  * @brief  Установить параметры сетевого подключения по умолчанию
-  */
-void SETTINGS_SetEthternetSwitchDef(void);
-
-/**
-  * @brief  Установить параметры GSM подключения по умолчанию
-  */
-void SETTINGS_SetGSMDef(void);
-
-/**
-  * @brief  Установить параметры SNTP по умолчанию
-  */
-void SETTINGS_SetSntpDef(void);
-
-/**
-  * @brief  Установить параметры подключения к серверу по умолчанию
-  */
-void SETTINGS_SetServerParamsDef(void);
-
-/**
-  * @brief  Установить параметры PROXY по умолчанию
-  */
-void SETTINGS_SetProxyParamsDef(void);
-
-/**
-  * @brief  Установить значение пароля по умолчанию
-  */
-void SETTINGS_SetServiceDef(void);
-
-/**
-  * @brief  Установить значение настроек прозрачного порта по умолчанию
-  */
-void SETTINGS_SetPortGwDef(void);
-
-/**
-  * @brief  Установить значение системы параллельной диспетчеризации по умолчанию
-  */
-void SETTINGS_SetPDSDef(void);
-
-/**
-  * @brief  Сброс всех настроек в значения по умолчанию кроме сетевых настроек
-  */
-void SETTINGS_SetPartDefault(void);
-
-/**
-  * @brief  Сброс всех настроек в значения по умолчанию
-  */
-void SETTINGS_SetAllDefault(void);
-
-/**
-  * @brief  Запись структуры настроек во flesh
-  */
-void SETTINGS_Save(void);
-
-
-/**
-  * @brief  
-  */
-void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size);
-
-/**
-  * @brief  
-  */
-void SETTINGS_ReadFromFlash(uint8_t *data, uint32_t size);
-
-/**
-  * @brief  
-  */
-uint32_t SETTINGS_GetCRC(void);
-
-/**
-  * @brief  Сброс флага boottry и сохранение структуры настроек
-  */
-void SETTINGS_ResetBootTry(void);
-
-/**
-  * @brief  Преобразует mac адрес строкового формата в массив uint8_t
-  * @param  mac - буфер для вывода mac адреса
-  */
-void SETTINGS_GetMac(uint8_t *mac);
-
-/**
-  * @brief  Установить дату производства
-  */
-void SETTINGS_SetProDate(char *proDate, uint8_t len);
-
-/**
-  * @brief  Установить серийный номер
-  */
-void SETTINGS_SetSerialNumber(char *sn, uint8_t len);
-
-/**
-  * @brief  Установить MAC
-  */
-void SysSETTINGS_SetMAC(char *mac, uint8_t len);
-
-/**
-  * @brief  Установить статус тестирования
-  */
-void SETTINGS_StatusTest(char *status, uint8_t len);
-
-/**
-  * @brief  Установить статус тестирования "T2OK"
-  */
-void SETTINGS_SetT2OK(void);
-
-/**
-  * @brief  Сбросить статус тестирования "T2OK"
-  */
-void SETTINGS_ResetT2OK(void);
-
-/**
-  * @brief  Устанавливает mac адрес исходя из unique id
-  */
-void COM_SetTestMAC(void);
-
-/**
-  * @brief  Включить DHCP
-  */
-void SETTINGS_SetDHCPOn(void);
-
-
-//
-void SETTINGS_Print(void);
-#endif
 
 // Системные настройки
 extern sys_settings_t sys_settings;
 
-//
+// Общая структура настроек
 extern settings_t settings;
 
 

+ 40 - 17
fw/user/main.c

@@ -66,15 +66,16 @@ int main(void)
 
 void init_task(void *argument)
 {
-    // -------------------------------------------------------------------------
-    // Загрузка и проверка настроек
-    crm_periph_clock_enable(CRM_CRC_PERIPH_CLOCK, TRUE);
+    // Для теста
+    //sys_clear();
     
+// -------------------------------------------------------------------------- //    
+// Загрузка и проверка настроек
+
+    crm_periph_clock_enable(CRM_CRC_PERIPH_CLOCK, TRUE);
+  
     // Мьютекс для работы с настройками
     init_settings(); 
-
-    // Для теста
-    //sys_clear();
     
     // Системные настройки
     sys_settings_load(&sys_settings);
@@ -82,19 +83,46 @@ void init_task(void *argument)
     // Основные настройки
     settings_load(&settings);
     
-    // -------------------------------------------------------------------------
-    // RNDIS
+// -------------------------------------------------------------------------- //
+// Uptime    
     
-    //usb_eth_init();
+    uptime_init();
+
+// -------------------------------------------------------------------------- //
+// RTC    
+    
+    TM_RTC_Init();
+    
+// -------------------------------------------------------------------------- //    
+// Мультиплексор
     
     mux_gpio_init();
     
-    // Тесты таймеров
-    //mux_led_test_init();
+// -------------------------------------------------------------------------- //        
+// Modbus    
     
-    // Modbus
     mb_init();
     
+// -------------------------------------------------------------------------- //            
+// Базовая инициализация входов/выходов
+// TODO потом брать значения из настроек
+
+    io_init();
+    
+// -------------------------------------------------------------------------- //        
+// Сброс счетчика попыток загрузок
+    
+    update_reset_boot_try();    
+    
+    
+// -------------------------------------------------------------------------- //    
+// RNDIS
+    
+    //usb_eth_init();
+        
+    // Тесты таймеров
+    //mux_led_test_init();
+    
     // Тесты SPI flash
     //common_spi_init();
     //InitFS(PRIM_DRIVE);
@@ -103,12 +131,7 @@ void init_task(void *argument)
     // Тесты USB
     //usb_eth_init();
     
-    // Базовая инициализация входов/выходов
-    // TODO потом брать значения из настроек
-    io_init();
     
-    // Сброс счетчика попыток загрузок
-    update_reset_boot_try();
       
     //vTaskDelete(NULL);
     

+ 2 - 0
fw/user/main.h

@@ -25,6 +25,8 @@
 #include "sys_api.h"
 #include "settings_api.h"
 #include "update.h"
+#include "uptime.h"
+#include "rtc.h"
 #include <stdio.h>
 #include <stdbool.h>
 #include <string.h>

+ 1 - 1
iap/modules/settings/settings_api.c

@@ -40,7 +40,7 @@ void settings_load(settings_t *settings)
     settings_read_from_flash((uint8_t*)settings, sizeof(settings_t));
     
     // Считываем CRC из флеш памяти
-    loadCRC = (*(uint32_t*)CRC_ADDRESS);
+    loadCRC = settings->critical_section_crc;
     
     // Рассчитываем CRC для структуры настроек
     newCRC = settings_get_crc(settings);

+ 4 - 1
iap/modules/settings/settings_api.h

@@ -9,6 +9,8 @@
 #include "mbport.h"
 
 
+#define MODEL_LEN           16
+
 
 // ------------------------------------------------------------------- //
 //					 		Modbus
@@ -29,7 +31,8 @@ typedef struct
 typedef struct
 {
     uint16_t    mb_port;    // Настройки порта для modbus
-    
+    char model[MODEL_LEN];  // Модель
+      
 } com_settings_t;
 
 

+ 2 - 2
iap/user/main.c

@@ -35,7 +35,7 @@ int main()
     boot_try = bpr_data_read(BPR_DATA2);
     
     DBG printf("[IAP] load_mode: %u, boot_try: %u\r\n", load_mode, boot_try);
-    
+#if 1    
     // Если есть попытки, то пытаемся загрузить FW.
 	// Используем ограниченное число попыток загрузить основное FW.
     if (boot_try > 1)
@@ -69,7 +69,7 @@ int main()
         DBG printf("Go to main FW...\r\n");
         jump_to_app(USER_FLASH_FIRST_PAGE_ADDRESS);
     }
-    
+#endif    
         
     DBG printf("IAP starting...\r\n");
 

BIN
output/fw.bin


+ 709 - 706
project/ewarm/iap/iap.dep

@@ -5,511 +5,521 @@
     <configuration>
         <name>Debug</name>
         <outputs>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_misc.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_i2c.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_i2c.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\tim_delay.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\ascii\mbascii.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crm.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_spi.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_acc.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dac.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbutils.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crm.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usb.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbcrc.h</file>
-            <file>$TOOLKIT_DIR$\lib\m7M_tls.a</file>
-            <file>$PROJ_DIR$\Debug\List\iap.map</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_bpr.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dac.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dma.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\main.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_usb.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncholding.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wwdt.o</file>
-            <file>$PROJ_DIR$\..\..\..\shared\utils\extended_sram.h</file>
-            <file>$TOOLKIT_DIR$\inc\c\stdlib.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_can.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_adc.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncdiag.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\wdt.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\shared\utils\at32f403a_407_board.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_dma.h</file>
-            <file>$TOOLKIT_DIR$\inc\c\DLib_Config_Full.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\fr_timers.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_wdt.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\tasks.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\board\common_config.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_tmr.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\ascii\mbascii.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncdiag.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncdisc.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\FreeRTOS-openocd.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\list.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfunccoils.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_rtc.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_misc.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_xmc.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\port.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_spi.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_sdio.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_wwdt.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\portmacro.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\croutine.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_i2c.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\event_groups.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\memmang\heap_4.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_usb.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\queue.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_pwc.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\system\at32f403a_407_conf.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\system\at32f403a_407_clock.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\portasm.s</file>
-            <file>$PROJ_DIR$\..\..\..\shared\board\common.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_usart.c</file>
-            <file>$PROJ_DIR$\Debug\Obj\list.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\fr_timers.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\sys_api.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\port.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\fr_timers.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\sys_api.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\portasm.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\tasks.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\sys_hal.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\shared\peripherals\inc\usart.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\modbus_params.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\modbus_params.o</file>
-            <file>$PROJ_DIR$\..\..\..\iap\modules\settings\settings_api.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\port.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\sys_hal.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\FreeRTOS-openocd.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\iap\modules\iap\iap.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\fr_timers.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\list.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\modbus.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\sys_hal.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\event_groups.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\queue.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\tasks.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_sdio.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usb.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_adc.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\StackMacros.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wdt.__cstat.et</file>
+            <file>$TOOLKIT_DIR$\inc\c\ycheck.h</file>
+            <file>$TOOLKIT_DIR$\lib\shb_l.a</file>
+            <file>$PROJ_DIR$\Debug\Obj\heap_4.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_flash.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_def.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_gpio.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_flash.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\porttimer.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\FreeRTOS-openocd.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usart.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_xmc.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\extended_sram.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\croutine.__cstat.et</file>
             <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\event_groups.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\sys_api.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\settings_api.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\FreeRTOS-openocd.o</file>
-            <file>$PROJ_DIR$\..\..\..\iap\user\main.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_board.__cstat.et</file>
             <file>$PROJ_DIR$\Debug\Obj\croutine.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\croutine.xcl</file>
-            <file>$TOOLKIT_DIR$\inc\c\DLib_Product_stdlib.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\semphr.h</file>
-            <file>$PROJ_DIR$\AT32F403AxG.icf</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_tmr.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_adc.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\mb.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\modbus.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncdisc.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\portable.h</file>
             <file>$PROJ_DIR$\Debug\Obj\mbfunccoils.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\portevent.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_xmc.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_xmc.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_exint.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_tmr.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_acc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\portserial.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_pwc.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\shared\sys\sys_hal.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_gpio.xcl</file>
             <file>$PROJ_DIR$\Debug\Obj\startup_at32f403a_407.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wdt.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\main.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\core_cm4.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\tim_delay.o</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_tmr.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_clock.__cstat.et</file>
             <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dma.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncdisc.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_rtc.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\portother.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\fr_timers.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\cmsis_iccarm.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\cmsis_version.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\portother.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\list.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\tasks.__cstat.et</file>
+            <file>$TOOLKIT_DIR$\inc\c\stdio.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_spi.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\wdt.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_xmc.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncholding.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus_params.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_tmr.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\utility.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\portother.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_int.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\iap.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\queue.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\iap.o</file>
+            <file>$PROJ_DIR$\..\..\..\fw\modules\io\io.h</file>
+            <file>$PROJ_DIR$\..\..\..\fw\user\main.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\task.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dac.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_xmc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\tasks.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_pwc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\wdt.xcl</file>
             <file>$TOOLKIT_DIR$\inc\c\DLib_Product.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usb.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\common_gpio.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\list.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_board.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\porttimer.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\portevent.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\sys_hal.__cstat.et</file>
             <file>$PROJ_DIR$\Debug\Obj\mbascii.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\list.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_flash.h</file>
-            <file>$TOOLKIT_DIR$\lib\shb_l.a</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_pwc.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\porttimer.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\croutine.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\queue.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\fr_timers.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\sys_hal.o</file>
+            <file>$PROJ_DIR$\AT32F403AxG.icf</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wdt.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crc.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_emac.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\FreeRTOS.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_acc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usb.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\utility.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\shared\utils\at32f403a_407_board.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\tim_delay.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_debug.o</file>
+            <file>$PROJ_DIR$\..\..\..\iap\user\main.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\semphr.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\peripherals\inc\common_gpio.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\port.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\mb.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\settings_api.__cstat.et</file>
             <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_spi.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_rtc.h</file>
             <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_sdio.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\settings_api.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\tim_delay.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\queue.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbutils.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\mb.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\common_gpio.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\event_groups.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbrtu.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_gpio.__cstat.et</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\croutine.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\portserial.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\wdt.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncdisc.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\portevent.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_exint.h</file>
             <file>$PROJ_DIR$\Debug\Obj\mbfuncdiag.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncother.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_clock.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\heap_4.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\utility.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbcrc.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_board.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\event_groups.__cstat.et</file>
-            <file>$PROJ_DIR$\..\..\..\shared\peripherals\inc\common_gpio.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_pwc.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\tasks.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncinput.__cstat.et</file>
-            <file>$PROJ_DIR$\..\..\..\iap\user\at32f403a_407_int.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\modbus.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\modbus.o</file>
             <file>$PROJ_DIR$\Debug\Obj\settings_api.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\StackMacros.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\porttimer.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_flash.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncdisc.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_i2c.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\extended_sram.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\portevent.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\modbus.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncholding.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_tmr.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\iap.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\iap.o</file>
-            <file>$PROJ_DIR$\..\..\..\shared\sys\sys_api.h</file>
-            <file>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_sdio.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usart.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\croutine.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\queue.__cstat.et</file>
             <file>$PROJ_DIR$\Debug\Obj\port.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\FreeRTOS-openocd.__cstat.et</file>
-            <file>$PROJ_DIR$\..\..\..\shared\sys\sys_hal.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\modbus.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_int.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_xmc.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usb.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\sys_api.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_dma.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_tmr.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\tasks.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncother.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\sys_hal.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\core_cm4.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\FreeRTOS-openocd.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_gpio.__cstat.et</file>
             <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_misc.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\list.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_spi.__cstat.et</file>
-            <file>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus_params.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\fr_timers.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_rtc.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\portother.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wdt.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbascii.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wwdt.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfunccoils.__cstat.et</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\mb.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mb.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\peripherals\src\common_gpio.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\utils\utility.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portevent.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbcrc.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\utils\at32f403a_407_board.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\wdt\wdt.c</file>
-            <file>$PROJ_DIR$\Debug\Obj\portserial.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbutils.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncholding.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncother.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\port.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncinput.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portother.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbutils.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\porttimer.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\tim_delay.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbframe.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbproto.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbconfig.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbfunc.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbport.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\tim_delay.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbrtu.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\sys\sys_api.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\sys\sys_hal.c</file>
-            <file>$PROJ_DIR$\..\..\..\shared\utils\extended_sram.c</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncinput.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_gpio.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portserial.c</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbutils.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncother.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\system\at32f403a_407_clock.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\mb.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\system_at32f403a_407.o</file>
-            <file>$TOOLKIT_DIR$\inc\c\stdio.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_debug.xcl</file>
+            <file>$TOOLKIT_DIR$\inc\c\DLib_Product_stdlib.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\sys\sys_api.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbutils.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_sdio.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\mb.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usart.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\common_gpio.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\extended_sram.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dma.o</file>
+            <file>$TOOLKIT_DIR$\inc\c\DLib_Config_Full.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usart.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_i2c.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncinput.o</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\queue.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\peripherals\inc\usart.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_acc.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\system_at32f403a_407.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\iap\user\at32f403a_407_int.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\portevent.__cstat.et</file>
+            <file>$TOOLKIT_DIR$\inc\c\intrinsics.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wdt.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_bpr.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\event_groups.__cstat.et</file>
             <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_acc.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usart.o</file>
             <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_misc.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\portother.o</file>
-            <file>$TOOLKIT_DIR$\inc\c\stdbool.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_xmc.xcl</file>
-            <file>$TOOLKIT_DIR$\lib\rt7M_tl.a</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_gpio.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_gpio.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_sdio.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\cmsis_version.h</file>
-            <file>$TOOLKIT_DIR$\inc\c\ycheck.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\portother.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\cmsis_iccarm.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_def.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\portable.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usart.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_rtc.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncdisc.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbcrc.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_debug.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_clock.o</file>
-            <file>$PROJ_DIR$\..\..\..\shared\utils\utility.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\system_at32f403a_407.xcl</file>
-            <file>$TOOLKIT_DIR$\inc\c\DLib_Product_string.h</file>
-            <file>$TOOLKIT_DIR$\lib\dl7M_tlf.a</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_flash.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_usart.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wwdt.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_can.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\settings_api.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbrtu.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dma.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbrtu.o</file>
             <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\mpu_wrappers.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfunccoils.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\croutine.h</file>
+            <file>$TOOLKIT_DIR$\inc\c\string.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_adc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\port.xcl</file>
+            <file>$TOOLKIT_DIR$\inc\c\DLib_Product_string.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\system_at32f403a_407.xcl</file>
+            <file>$PROJ_DIR$\Debug\List\iap.map</file>
+            <file>$TOOLKIT_DIR$\inc\c\stddef.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crm.xcl</file>
+            <file>$TOOLKIT_DIR$\inc\c\DLib_Defaults.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_acc.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_bpr.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbcrc.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_emac.h</file>
             <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_pwc.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbcrc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbrtu.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_can.o</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\cmsis_compiler.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_exint.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_flash.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_bpr.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_rtc.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\sys_api.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\iap\modules\settings\settings_api.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_i2c.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\portasm.o</file>
             <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\deprecated_definitions.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\tim_delay.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_debug.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_usb.xcl</file>
             <file>$PROJ_DIR$\Debug\Obj\portserial.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_rtc.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\shared\wdt\wdt.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\utility.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\modbus_params.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\shared\utils\utility.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\event_groups.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncdiag.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbascii.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\heap_4.xcl</file>
+            <file>$TOOLKIT_DIR$\lib\dl7M_tlf.a</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_debug.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\wdt.o</file>
             <file>$PROJ_DIR$\Debug\Obj\mbfunccoils.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_emac.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_can.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncholding.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\common_gpio.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_exint.o</file>
             <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_adc.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_crm.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_dac.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_sdio.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crc.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbrtu.xcl</file>
-            <file>$TOOLKIT_DIR$\inc\c\stddef.h</file>
-            <file>$TOOLKIT_DIR$\inc\c\DLib_Defaults.h</file>
             <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_emac.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_misc.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_exint.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_tmr.o</file>
-            <file>$PROJ_DIR$\Debug\Exe\iap.out</file>
-            <file>$TOOLKIT_DIR$\inc\c\iar_intrinsics_common.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_flash.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_wwdt.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\mpu_armv7.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crm.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\main.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_rtc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbutils.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_dac.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_usart.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\utility.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crc.xcl</file>
             <file>$TOOLKIT_DIR$\inc\c\iccarm_builtin.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_exint.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\system_at32f403a_407.c</file>
-            <file>$PROJ_DIR$\..\..\..\iap\modules\iap\iap.c</file>
-            <file>$PROJ_DIR$\..\..\..\iap\user\at32f403a_407_int.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\at32f403a_407.h</file>
-            <file>$PROJ_DIR$\..\..\..\iap\user\FreeRTOSConfig.h</file>
-            <file>$PROJ_DIR$\..\..\..\iap\modules\settings\settings_api.c</file>
-            <file>$PROJ_DIR$\..\..\..\iap\user\main.c</file>
-            <file>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus.c</file>
-            <file>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus_params.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\startup\iar\startup_at32f403a_407.s</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncdisc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dac.o</file>
+            <file>$TOOLKIT_DIR$\inc\c\iar_intrinsics_common.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wwdt.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_clock.o</file>
+            <file>$PROJ_DIR$\..\..\..\shared\wdt\wdt.h</file>
             <file>$PROJ_DIR$\Debug\Obj\heap_4.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_bpr.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crc.xcl</file>
             <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_can.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\main.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_int.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\utility.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_i2c.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crm.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_bpr.o</file>
             <file>$TOOLKIT_DIR$\inc\c\yvals.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_emac.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncother.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_int.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_xmc.h</file>
             <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_adc.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_acc.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_flash.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\heap_4.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_crc.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_debug.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_can.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncholding.xcl</file>
             <file>$PROJ_DIR$\Debug\Obj\extended_sram.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\common_gpio.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dac.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_debug.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_bpr.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\cmsis_compiler.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\common_gpio.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_board.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_i2c.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_clock.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_misc.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_wdt.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\projdefs.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_tmr.o</file>
+            <file>$TOOLKIT_DIR$\inc\c\ysizet.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_sdio.o</file>
             <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_exint.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dma.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crc.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncdiag.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\system_at32f403a_407.__cstat.et</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_acc.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_crm.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_emac.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbcrc.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_crc.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\main.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_can.h</file>
+            <file>$PROJ_DIR$\Debug\Exe\iap.out</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\list.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\modbus_params.o</file>
+            <file>$TOOLKIT_DIR$\inc\c\stdint.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\fr_timers.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\FreeRTOS-openocd.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_spi.o</file>
+            <file>$PROJ_DIR$\..\..\..\iap\modules\settings\settings_api.c</file>
+            <file>$PROJ_DIR$\..\..\..\iap\user\main.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_can.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_crc.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_emac.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\at32f403a_407.h</file>
             <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\system_at32f403a_407.h</file>
+            <file>$PROJ_DIR$\..\..\..\iap\user\FreeRTOSConfig.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_acc.c</file>
             <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_adc.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_crc.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_dma.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_flash.c</file>
             <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_dac.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\system_at32f403a_407.c</file>
             <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_debug.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_emac.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_can.c</file>
             <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_exint.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_bpr.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_crm.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_flash.c</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_dma.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\startup\iar\startup_at32f403a_407.s</file>
             <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_gpio.c</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbrtu.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\wdt.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbcrc.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_wwdt.h</file>
-            <file>$TOOLKIT_DIR$\inc\c\intrinsics.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncinput.o</file>
-            <file>$TOOLKIT_DIR$\inc\c\stdint.h</file>
-            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbrtu.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\FreeRTOS.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_emac.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbascii.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wdt.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\projdefs.h</file>
-            <file>$TOOLKIT_DIR$\inc\c\string.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\extended_sram.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\task.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_clock.xcl</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\core_support\mpu_armv7.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_board.o</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_bpr.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_wdt.h</file>
-            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\include\queue.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\portevent.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_pwc.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\iap.pbd</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_spi.o</file>
-            <file>$TOOLKIT_DIR$\inc\c\ysizet.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_board.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\porttimer.xcl</file>
-            <file>$PROJ_DIR$\Debug\Obj\mbfuncother.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_i2c.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_crm.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_misc.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_pwc.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_rtc.c</file>
+            <file>$PROJ_DIR$\..\..\..\iap\modules\iap\iap.c</file>
+            <file>$PROJ_DIR$\..\..\..\iap\user\at32f403a_407_int.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_bpr.c</file>
+            <file>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus.c</file>
+            <file>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus_params.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncdisc.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncholding.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncinput.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncother.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_sdio.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_usart.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\event_groups.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\fr_timers.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_tmr.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\tasks.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbutils.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\list.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mb.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_xmc.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_usb.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\portmacro.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\system\at32f403a_407_conf.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\croutine.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\FreeRTOS-openocd.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_wdt.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\queue.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_spi.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\system\at32f403a_407_clock.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\memmang\heap_4.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_wwdt.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\port.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\portasm.s</file>
+            <file>$PROJ_DIR$\..\..\..\shared\board\common.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\board\common_config.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\ascii\mbascii.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfunccoils.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncdiag.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\sys\sys_api.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\porttimer.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\tim_delay.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portother.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbframe.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbport.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\port.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbcrc.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\utils\extended_sram.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\utils\utility.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\wdt\wdt.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_usb.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\ascii\mbascii.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbrtu.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\utils\extended_sram.h</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_spi.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbproto.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\utils\at32f403a_407_board.c</file>
+            <file>$PROJ_DIR$\Debug\Obj\queue.o</file>
+            <file>$PROJ_DIR$\..\..\..\shared\peripherals\src\common_gpio.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\sys\sys_hal.c</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_misc.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\sys_api.o</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbutils.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\list.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\tim_delay.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portserial.c</file>
+            <file>$TOOLKIT_DIR$\lib\m7M_tls.a</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbfunc.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\include\mbconfig.h</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portevent.c</file>
+            <file>$PROJ_DIR$\..\..\..\shared\freemodbus\mb.c</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\system\at32f403a_407_clock.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_pwc.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbascii.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncinput.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbrtu.__cstat.et</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_rtc.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\main.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\tim_delay.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\system_at32f403a_407.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncinput.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_gpio.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_debug.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbutils.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_crm.o</file>
+            <file>$TOOLKIT_DIR$\inc\c\stdlib.h</file>
+            <file>$PROJ_DIR$\..\..\..\iap\modules\iap\iap.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\porttimer.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncholding.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wwdt.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\fr_timers.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_dac.xcl</file>
+            <file>$TOOLKIT_DIR$\inc\c\stdbool.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\event_groups.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\mb.xcl</file>
+            <file>$PROJ_DIR$\..\..\..\libs\artery\drivers\inc\at32f403a_407_i2c.h</file>
+            <file>$TOOLKIT_DIR$\lib\rt7M_tl.a</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncother.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbcrc.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\at32f403a_407_wwdt.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\portserial.xcl</file>
+            <file>$PROJ_DIR$\Debug\Obj\mbfuncdiag.o</file>
+            <file>$PROJ_DIR$\..\..\..\fw\modules\modbus\modbus_params.h</file>
+            <file>$PROJ_DIR$\..\..\..\fw\modules\modbus\update.h</file>
             <file>$PROJ_DIR$\..\..\..\fw\modules\modbus\modbus_params.c</file>
-            <file>$PROJ_DIR$\..\..\..\fw\user\main.c</file>
+            <file>$PROJ_DIR$\Debug\Obj\iap.pbd</file>
         </outputs>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\fr_timers.c</name>
+            <name>[ROOT_NODE]</name>
             <outputs>
                 <tool>
-                    <name>ICCARM</name>
-                    <file> 66</file>
-                </tool>
-                <tool>
-                    <name>__cstat</name>
-                    <file> 179</file>
+                    <name>ILINK</name>
+                    <file> 235 149</file>
                 </tool>
+            </outputs>
+        </file>
+        <file>
+            <name>$PROJ_DIR$\Debug\Exe\iap.out</name>
+            <outputs>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 63</file>
+                    <name>ILINK</name>
+                    <file> 149</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
-                    <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 342 269 340 283 346 239 256 49 338 277 276 254 349 116 355 79</file>
+                    <name>ILINK</name>
+                    <file> 75 80 145 66 212 160 208 165 347 205 85 120 191 189 163 10 169 50 323 61 197 227 241 225 117 81 76 352 59 118 20 356 119 239 240 210 54 65 340 90 70 158 24 364 204 351 124 360 140 346 99 237 89 170 68 49 175 12 320 100 29 324 74 342 105 84 201 184 6 359 329 182</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_wdt.c</name>
+            <name>$PROJ_DIR$\..\..\..\iap\modules\settings\settings_api.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 107</file>
+                    <file> 100</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 182</file>
+                    <file> 91</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 345</file>
+                    <file> 137</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 168 355 126 79 150 226 249 224 23 171 285 131 206 141 87 125 113 282 308 57 236 307 318 298 297 144 147 348 112 41</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\tasks.c</name>
+            <name>$PROJ_DIR$\..\..\..\iap\user\main.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 85</file>
+                    <file> 340</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 146</file>
+                    <file> 196</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 69</file>
+                    <file> 233</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 342 269 340 283 346 239 256 49 338 277 276 254 349 116 79 150 222</file>
+                    <file> 86 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 83 41 226 334 298 79 150 249 224 23 171 285 131 206 141 57 236 125 87 53 88 168 355 126 113 282 308 307 318 144 147</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_tmr.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_can.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 274</file>
+                    <file> 160</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 159</file>
+                    <file> 211</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 104</file>
+                    <file> 186</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\ascii\mbascii.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_crc.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 115</file>
+                    <file> 165</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 183</file>
+                    <file> 77</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 344</file>
+                    <file> 202</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 198 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 283 346 239 256 49 338 276 254 349 116 187 208 205 206 4 204 12</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncdiag.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_emac.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 26</file>
+                    <file> 191</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 136</file>
+                    <file> 230</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 318</file>
+                    <file> 78</file>
                 </tool>
             </outputs>
+            <inputs>
+                <tool>
+                    <name>ICCARM</name>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
+                </tool>
+            </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncdisc.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_acc.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 242</file>
+                    <file> 80</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
@@ -517,1383 +527,1376 @@
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 112</file>
+                    <file> 135</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 198 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 283 346 239 256 49 338 276 254 349 116 187 208 205 204 206</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\FreeRTOS-openocd.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_adc.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 89</file>
+                    <file> 145</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 169</file>
+                    <file> 217</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 77</file>
+                    <file> 2</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 342 269 235 298 270 30 113 360 340 283 346 239 256 49 338 277 276 254</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\list.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_dma.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 80</file>
+                    <file> 120</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 176</file>
+                    <file> 139</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 62</file>
+                    <file> 32</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 342 269 340 283 346 239 256 49 338 277 276 254 116</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfunccoils.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_flash.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 99</file>
+                    <file> 163</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 185</file>
+                    <file> 11</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 261</file>
+                    <file> 192</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 198 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 283 346 239 256 49 338 276 254 349 116 187 208 205 204 206</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_rtc.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_dac.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 241</file>
+                    <file> 205</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 180</file>
+                    <file> 58</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 258</file>
+                    <file> 354</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_misc.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\system_at32f403a_407.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 0</file>
+                    <file> 342</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 175</file>
+                    <file> 128</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 226</file>
+                    <file> 148</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_xmc.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_debug.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 102</file>
+                    <file> 85</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 173</file>
+                    <file> 183</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 229</file>
+                    <file> 345</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\port.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_exint.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 65</file>
+                    <file> 189</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 168</file>
+                    <file> 228</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 75</file>
+                    <file> 162</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 338 277 298 270 30 113 276 342 269 235 360 340 283 346 239 256 49 254 349 116</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_spi.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\startup\iar\startup_at32f403a_407.s</name>
             <outputs>
                 <tool>
-                    <name>ICCARM</name>
-                    <file> 359</file>
-                </tool>
-                <tool>
-                    <name>__cstat</name>
-                    <file> 177</file>
-                </tool>
-                <tool>
-                    <name>BICOMP</name>
-                    <file> 121</file>
+                    <name>AARM</name>
+                    <file> 29</file>
                 </tool>
             </outputs>
-            <inputs>
-                <tool>
-                    <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
-                </tool>
-            </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_sdio.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_gpio.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 266</file>
+                    <file> 10</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 164</file>
+                    <file> 110</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 233</file>
+                    <file> 28</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_wwdt.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_i2c.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 21</file>
+                    <file> 169</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 184</file>
+                    <file> 123</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 252</file>
+                    <file> 220</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\croutine.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_crm.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 91</file>
+                    <file> 347</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 166</file>
+                    <file> 195</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 92</file>
+                    <file> 151</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 342 269 235 298 270 30 113 360 340 283 346 239 256 49 338 277 276 254 349 116 133</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_i2c.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_misc.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 2</file>
+                    <file> 323</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 154</file>
+                    <file> 111</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 296</file>
+                    <file> 136</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\event_groups.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_pwc.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 130</file>
+                    <file> 61</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 143</file>
+                    <file> 335</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 83</file>
+                    <file> 26</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 342 269 340 283 346 239 256 49 338 277 276 254 349 116 79 86</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\memmang\heap_4.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_rtc.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 289</file>
+                    <file> 197</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 139</file>
+                    <file> 33</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 303</file>
+                    <file> 166</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 342 269 340 283 346 239 256 49 338 277 276 254 349 116</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_usb.c</name>
+            <name>$PROJ_DIR$\..\..\..\iap\modules\iap\iap.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 114</file>
-                </tool>
-                <tool>
-                    <name>__cstat</name>
-                    <file> 174</file>
+                    <file> 54</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 11</file>
+                    <file> 51</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 349 168 355 126 79 150 226 249 224 23 171 285 131 206 141 87 125 113 282 308 57 236 307 318 298 73 18 138 41 144 147</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\queue.c</name>
+            <name>$PROJ_DIR$\..\..\..\iap\user\at32f403a_407_int.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 84</file>
-                </tool>
-                <tool>
-                    <name>__cstat</name>
-                    <file> 167</file>
+                    <file> 50</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 126</file>
+                    <file> 215</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 342 269 340 283 346 239 256 49 338 277 276 254 349 116 355</file>
+                    <file> 129 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_pwc.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_bpr.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 357</file>
+                    <file> 212</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 145</file>
+                    <file> 154</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 119</file>
+                    <file> 164</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\system\at32f403a_407_clock.c</name>
+            <name>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 245</file>
+                    <file> 99</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 138</file>
+                    <file> 98</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 350</file>
+                    <file> 21</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 219 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 298 53 46 282 308 79 150 226 249 224 23 171 285 131 206 141 57 236 307 318 355 138 327 168 126 87 125 113 349 41 144 147</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\portasm.s</name>
+            <name>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus_params.c</name>
             <outputs>
                 <tool>
-                    <name>AARM</name>
-                    <file> 68</file>
+                    <name>ICCARM</name>
+                    <file> 237</file>
+                </tool>
+                <tool>
+                    <name>BICOMP</name>
+                    <file> 176</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
-                    <name>AARM</name>
-                    <file> 283</file>
+                    <name>ICCARM</name>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 46 282 308 79 150 226 249 224 23 171 285 131 206 141 57 236 307 318 53 355 144 147</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_usart.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncdisc.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 225</file>
+                    <file> 204</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 165</file>
+                    <file> 22</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 240</file>
+                    <file> 94</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 308 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 249 224 23 171 285 131 206 141 57 236 282 307 318 306 331</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>[ROOT_NODE]</name>
-            <outputs>
-                <tool>
-                    <name>ILINK</name>
-                    <file> 275 14</file>
-                </tool>
-            </outputs>
-        </file>
-        <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\mb.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncholding.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 98</file>
+                    <file> 351</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 128</file>
+                    <file> 45</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 220</file>
+                    <file> 187</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 198 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 283 346 239 256 49 338 276 254 349 116 187 208 205 206 204 207 341</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 308 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 249 224 23 171 285 131 206 141 57 236 282 307 318 306 331</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\peripherals\src\common_gpio.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncinput.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 314</file>
+                    <file> 124</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 129</file>
+                    <file> 337</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 309</file>
+                    <file> 343</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 144 342 269 360 283 346 239 256 49 338 276 254 349 116 228</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 308 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 249 224 23 171 285 131 206 141 57 236 282 307 318 306 331</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\utils\utility.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncother.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 260</file>
+                    <file> 360</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 140</file>
+                    <file> 106</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 295</file>
+                    <file> 214</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 342 269 235 298 270 30 113 360 340 283 346 239 256 49 338 277 276 254 349 116 355 94 246 34 282 109 234 313 237 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 228 148 222</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 308 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 249 224 23 171 285 131 206 141 57 236 282 307 318 306 331</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portevent.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_sdio.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 356</file>
+                    <file> 227</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 156</file>
+                    <file> 0</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 100</file>
+                    <file> 115</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 342 269 235 298 270 30 113 360 340 283 346 239 256 49 338 277 276 254 349 116 355 187 198 282 109 234 313 237 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 208 205</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbcrc.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_usart.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 243</file>
+                    <file> 117</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 141</file>
+                    <file> 122</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 336</file>
+                    <file> 14</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 198 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 360 283 346 239 256 49 338 276 254 349 116</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\utils\at32f403a_407_board.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\event_groups.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 352</file>
+                    <file> 356</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 142</file>
+                    <file> 134</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 361</file>
+                    <file> 178</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 28 222 235 298 270 30 113 360 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 348 5 213 152 121 63 226 112 79 150 238 249 224 23 171 285 131 203 206 141 57 236 73 18</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\wdt\wdt.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\fr_timers.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 335</file>
+                    <file> 239</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 135</file>
+                    <file> 35</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 27</file>
+                    <file> 353</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 259</file>
+                    <file> 348 5 213 152 121 63 226 112 79 150 238 249 224 23 171 285 131 203 206 141 57 236 125 73</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbutils.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_tmr.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 217</file>
+                    <file> 225</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 127</file>
+                    <file> 47</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 9</file>
+                    <file> 104</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 198 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 283 346 239 256 49 338 276 254 349 116 187 208 205</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncholding.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\tasks.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 20</file>
+                    <file> 105</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 158</file>
+                    <file> 40</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 307</file>
+                    <file> 60</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 198 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 283 346 239 256 49 338 276 254 349 116 187 208 205 204 206</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 79 150 238 249 224 23 171 285 131 203 206 141 57 236 73 3 41</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncother.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbutils.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 218</file>
+                    <file> 346</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 137</file>
+                    <file> 114</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 363</file>
+                    <file> 198</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 198 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 283 346 239 256 49 338 276 254 349 116 187 208 205 204 206</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 308 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 249 224 23 171 285 131 206 141 57 236 282 307 318</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncinput.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\list.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 339</file>
+                    <file> 65</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 147</file>
+                    <file> 39</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 214</file>
+                    <file> 326</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 198 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 283 346 239 256 49 338 276 254 349 116 187 208 205 204 206</file>
+                    <file> 348 5 213 152 121 63 226 112 79 150 238 249 224 23 171 285 131 203 206 141 236</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portother.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_xmc.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 227</file>
+                    <file> 59</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 181</file>
+                    <file> 15</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 236</file>
+                    <file> 44</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 342 269 340 283 346 239 256 49 338 277 276 254 349 116 94 355 187 198 282 109 234 313 237 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 208 205</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\porttimer.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_usb.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 120</file>
+                    <file> 81</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 151</file>
+                    <file> 1</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 362</file>
+                    <file> 174</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 360 283 346 239 256 49 338 276 254 349 116 198 187 208 205 228</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\tim_delay.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\croutine.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 110</file>
+                    <file> 20</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 125</file>
+                    <file> 17</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 3</file>
+                    <file> 71</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 203 228</file>
+                    <file> 79 150 5 213 152 121 63 226 238 249 224 23 171 285 131 203 206 141 57 236 143</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbrtu.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\FreeRTOS-openocd.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 334</file>
+                    <file> 240</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 131</file>
+                    <file> 13</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 268</file>
+                    <file> 109</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 23 235 298 270 30 113 360 93 347 248 198 282 109 340 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 342 269 283 346 239 256 49 338 276 254 349 116 187 208 205 341 204 12</file>
+                    <file> 79 150 5 213 152 121 63 226 238 249 224 23 171 285 131 203 206 141</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\sys\sys_api.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_wdt.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 64</file>
+                    <file> 76</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 87</file>
+                    <file> 4</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 67</file>
+                    <file> 132</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 340 235 298 270 30 113 162 228 170 74 282 109 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 71 342 269 360 283 346 239 256 49 338 276 254 94 355 187 198 349 116 208 205 34 60 347 248 222</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\sys\sys_hal.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\queue.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 76</file>
+                    <file> 320</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 82</file>
+                    <file> 52</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 70</file>
+                    <file> 72</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 340 235 298 270 30 113 170 162 228 34 282 109 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 60 222 360</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 79 150 238 249 224 23 171 285 131 203 206 141 57 236 125</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\utils\extended_sram.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_spi.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 348</file>
+                    <file> 241</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 155</file>
+                    <file> 42</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 308</file>
+                    <file> 92</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 22</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portserial.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\system\at32f403a_407_clock.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 257</file>
+                    <file> 208</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 134</file>
+                    <file> 31</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 194</file>
+                    <file> 221</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 28 222 360 342 269 283 346 239 256 49 338 276 254 349 116 187 198 208 205 203 228 23 93</file>
+                    <file> 334 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\Debug\Exe\iap.out</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\memmang\heap_4.c</name>
             <outputs>
                 <tool>
-                    <name>ILINK</name>
-                    <file> 14</file>
+                    <name>ICCARM</name>
+                    <file> 210</file>
+                </tool>
+                <tool>
+                    <name>__cstat</name>
+                    <file> 7</file>
+                </tool>
+                <tool>
+                    <name>BICOMP</name>
+                    <file> 181</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
-                    <name>ILINK</name>
-                    <file> 95 105 25 352 312 253 245 267 10 8 305 17 271 273 250 231 2 172 0 357 241 266 359 274 225 114 107 21 102 314 91 130 348 66 89 289 161 80 18 98 115 243 99 26 242 20 339 218 334 217 171 73 65 68 356 227 257 120 84 149 106 64 76 221 85 110 260 335 118 230 13 249</file>
+                    <name>ICCARM</name>
+                    <file> 348 5 213 152 121 63 226 112 79 150 238 249 224 23 171 285 131 203 206 141 57 236</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\system_at32f403a_407.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_wwdt.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 221</file>
+                    <file> 352</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 319</file>
+                    <file> 362</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 247</file>
+                    <file> 207</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 286 229 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\iap\modules\iap\iap.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\port.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 161</file>
+                    <file> 89</file>
+                </tool>
+                <tool>
+                    <name>__cstat</name>
+                    <file> 101</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 160</file>
+                    <file> 146</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 78 74 228 71 342 269 360 283 346 239 256 49 338 276 254 94 355 162 187 198 349 116 208 205 34 79 86 341 222 347 248</file>
+                    <file> 131 203 213 152 121 63 206 79 150 5 226 238 249 224 23 171 285 141 57 236</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\iap\user\at32f403a_407_int.c</name>
+            <name>$PROJ_DIR$\..\..\..\libs\thirdparty\freertos\portable\IAR\ARM_CM4F\portasm.s</name>
             <outputs>
                 <tool>
-                    <name>ICCARM</name>
-                    <file> 172</file>
-                </tool>
-                <tool>
-                    <name>BICOMP</name>
-                    <file> 294</file>
+                    <name>AARM</name>
+                    <file> 170</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
-                    <name>ICCARM</name>
-                    <file> 148 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <name>AARM</name>
+                    <file> 249</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\iap\modules\settings\settings_api.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\ascii\mbascii.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 149</file>
+                    <file> 70</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 88</file>
+                    <file> 336</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 124</file>
+                    <file> 180</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 74 228 71 342 269 360 283 346 239 256 49 338 276 254 94 355 162 187 198 349 116 208 205 34 60 347 248 23 93 222</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 308 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 249 224 23 171 285 131 206 141 57 236 282 307 318 331 314 306 155</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\iap\user\main.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfunccoils.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 18</file>
+                    <file> 24</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 293</file>
+                    <file> 142</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 108</file>
+                    <file> 185</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 90 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 28 222 360 219 34 342 269 283 346 239 256 49 338 276 254 349 116 355 94 163 144 74 228 71 162 187 198 208 205 347 248</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 308 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 249 224 23 171 285 131 206 141 57 236 282 307 318 306 331</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\functions\mbfuncdiag.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 171</file>
+                    <file> 364</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 81</file>
+                    <file> 97</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 157</file>
+                    <file> 179</file>
                 </tool>
             </outputs>
-            <inputs>
-                <tool>
-                    <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 34 163 178 187 198 342 269 360 283 346 239 256 49 338 276 254 349 116 208 205 228 341 203 74 71 94 355 162 78 222 347 248</file>
-                </tool>
-            </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\iap\modules\modbus\modbus_params.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\sys\sys_api.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 73</file>
+                    <file> 324</file>
+                </tool>
+                <tool>
+                    <name>__cstat</name>
+                    <file> 102</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 72</file>
+                    <file> 167</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 57 264 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262 178 187 198 342 269 360 283 346 239 256 49 338 276 254 349 116 208 205 163 228 347 248</file>
+                    <file> 238 5 213 152 121 63 113 355 27 168 247 108 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 126 79 150 226 249 224 23 171 285 131 206 141 87 125 282 308 57 236 307 318 298 297 144 147 41</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\cmsis\cm4\device_support\startup\iar\startup_at32f403a_407.s</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\porttimer.c</name>
             <outputs>
                 <tool>
-                    <name>AARM</name>
-                    <file> 106</file>
+                    <name>ICCARM</name>
+                    <file> 12</file>
+                </tool>
+                <tool>
+                    <name>__cstat</name>
+                    <file> 350</file>
+                </tool>
+                <tool>
+                    <name>BICOMP</name>
+                    <file> 67</file>
                 </tool>
             </outputs>
+            <inputs>
+                <tool>
+                    <name>ICCARM</name>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 226 249 224 23 171 285 131 206 141 57 236 308 282 307 318 355</file>
+                </tool>
+            </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_acc.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\tim_delay.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 105</file>
+                    <file> 84</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 301</file>
+                    <file> 341</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 224</file>
+                    <file> 172</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 327 355</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_adc.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portother.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 25</file>
+                    <file> 49</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 300</file>
+                    <file> 38</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 97</file>
+                    <file> 34</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 348 5 213 152 121 63 226 112 79 150 238 249 224 23 171 285 131 203 206 141 57 236 87 125 282 308 247 108 37 161 36 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 307 318</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_crc.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbcrc.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 267</file>
+                    <file> 158</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 317</file>
+                    <file> 361</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 291</file>
+                    <file> 231</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 308 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 226 249 224 23 171 285 131 206 141 57 236</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_dac.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\utils\extended_sram.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 8</file>
+                    <file> 119</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 310</file>
+                    <file> 16</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 16</file>
+                    <file> 218</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 316</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_debug.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\utils\utility.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 305</file>
+                    <file> 201</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 311</file>
+                    <file> 48</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 223</file>
+                    <file> 82</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 79 150 5 213 152 121 63 226 238 249 224 23 171 285 131 203 206 141 57 236 125 87 177 298 247 108 37 161 36 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 355 129 41</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_emac.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\wdt\wdt.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 271</file>
+                    <file> 184</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 299</file>
+                    <file> 43</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 343</file>
+                    <file> 62</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 209</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_can.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\rtu\mbrtu.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 253</file>
+                    <file> 140</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 292</file>
+                    <file> 338</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 306</file>
+                    <file> 159</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 308 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 249 224 23 171 285 131 206 141 57 236 282 307 318 138 306 155</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_exint.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\utils\at32f403a_407_board.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 273</file>
+                    <file> 66</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 315</file>
+                    <file> 19</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 278</file>
+                    <file> 219</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 83 41 5 213 152 121 63 226 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_bpr.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\peripherals\src\common_gpio.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 312</file>
+                    <file> 118</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 290</file>
+                    <file> 64</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 15</file>
+                    <file> 188</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 88 79 150 226 249 224 23 171 285 131 206 141 57 236 355</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_crm.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\sys\sys_hal.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 10</file>
+                    <file> 74</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 297</file>
+                    <file> 69</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 5</file>
+                    <file> 107</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 238 5 213 152 121 63 27 113 355 298 247 108 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 297 41 226</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_flash.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portserial.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 250</file>
+                    <file> 175</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 152</file>
+                    <file> 25</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 302</file>
+                    <file> 363</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 247 108 238 5 213 152 121 63 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 83 41 226 79 150 249 224 23 171 285 131 206 141 57 236 282 308 307 318 327 355 348 112</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_dma.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\port\portevent.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 17</file>
+                    <file> 68</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 316</file>
+                    <file> 130</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 111</file>
+                    <file> 95</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 79 150 5 213 152 121 63 226 238 249 224 23 171 285 131 203 206 141 57 236 125 282 308 247 108 37 161 36 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 307 318</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\..\..\..\libs\artery\drivers\src\at32f403a_407_gpio.c</name>
+            <name>$PROJ_DIR$\..\..\..\shared\freemodbus\mb.c</name>
             <outputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 231</file>
+                    <file> 90</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
-                    <file> 132</file>
+                    <file> 116</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 232</file>
+                    <file> 357</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCARM</name>
-                    <file> 57 264 282 109 340 235 298 270 30 113 234 313 237 277 351 321 238 96 122 353 215 1 251 255 24 263 265 6 29 244 117 304 337 354 103 123 101 7 272 19 262</file>
+                    <file> 348 5 213 152 121 63 226 112 144 147 308 247 108 238 37 161 36 203 194 248 9 286 229 30 339 133 344 358 200 157 234 190 199 317 103 173 8 232 193 223 96 93 216 127 222 313 156 79 150 249 224 23 171 285 131 206 141 57 236 282 307 318 331 306 330 138</file>
                 </tool>
             </inputs>
         </file>

File diff suppressed because it is too large
+ 886 - 861
project/ewarm/module_universal_io.dep


+ 10 - 0
project/ewarm/module_universal_io.ewp

@@ -362,6 +362,7 @@
                     <state>$PROJ_DIR$\..\..\shared\wdt</state>
                     <state>$PROJ_DIR$\..\..\shared\board</state>
                     <state>$PROJ_DIR$\..\..\shared\utils</state>
+                    <state>$PROJ_DIR$\..\..\shared\model</state>
                     <state>$PROJ_DIR$\..\..\shared\freemodbus</state>
                     <state>$PROJ_DIR$\..\..\shared\freemodbus\ascii</state>
                     <state>$PROJ_DIR$\..\..\shared\freemodbus\functions</state>
@@ -2178,6 +2179,9 @@
                 <file>
                     <name>$PROJ_DIR$\..\..\fw\modules\misc\misc.c</name>
                 </file>
+                <file>
+                    <name>$PROJ_DIR$\..\..\fw\modules\misc\rtc.c</name>
+                </file>
                 <file>
                     <name>$PROJ_DIR$\..\..\fw\modules\misc\uptime.c</name>
                 </file>
@@ -2675,6 +2679,12 @@
                 <name>$PROJ_DIR$\..\..\shared\freemodbus\mb.c</name>
             </file>
         </group>
+        <group>
+            <name>model</name>
+            <file>
+                <name>$PROJ_DIR$\..\..\shared\model\model_cfg.h</name>
+            </file>
+        </group>
         <group>
             <name>peripherals</name>
             <file>

+ 9 - 0
project/ewarm/module_universal_io.ewt

@@ -2399,6 +2399,9 @@
                 <file>
                     <name>$PROJ_DIR$\..\..\fw\modules\misc\misc.c</name>
                 </file>
+                <file>
+                    <name>$PROJ_DIR$\..\..\fw\modules\misc\rtc.c</name>
+                </file>
                 <file>
                     <name>$PROJ_DIR$\..\..\fw\modules\misc\uptime.c</name>
                 </file>
@@ -2896,6 +2899,12 @@
                 <name>$PROJ_DIR$\..\..\shared\freemodbus\mb.c</name>
             </file>
         </group>
+        <group>
+            <name>model</name>
+            <file>
+                <name>$PROJ_DIR$\..\..\shared\model\model_cfg.h</name>
+            </file>
+        </group>
         <group>
             <name>peripherals</name>
             <file>

+ 1 - 1
shared/board/common_config.h

@@ -34,7 +34,7 @@
 /**
   * @brief  Версия прошивки
   */
-#define VERSION                         "1.01t"
+#define VERSION                         "1.00.01"
 
 /**
   * @brief  MD5 CRC

+ 16 - 0
shared/model/model_cfg.h

@@ -0,0 +1,16 @@
+#ifndef MODEL_CFG_H
+#define MODEL_CFG_H
+
+#include "at32f403a_407.h"
+#include <stdbool.h>
+
+
+#define MODEL_STR           "MDIO-88"
+
+
+#define MODEL_LEN           16
+
+
+
+#endif /* #ifndef MODEL_CFG_H */
+

+ 0 - 4
shared/sys/sys_api.c

@@ -15,7 +15,6 @@
 //
 bool sys_set_default(sys_settings_t *settings) 
 {
-    settings->model = 0;
     memcpy(settings->sn, SN_DEFAULT, SN_LEN);
 	snprintf(settings->prod_date, PROD_LEN, "00.00.00");
 	memset(settings->test_state, 0, TS_LEN);
@@ -100,9 +99,6 @@ void sys_print(sys_settings_t *settings)
     printf("\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n");
     printf("   Системные настройки:\r\n");
     
-    printf("\tМодель: ");
-    printf("%u\r\n", settings->model);
-    
     memset(str, 0, 20);
     memcpy(str, settings->sn, SN_LEN);
     printf("\tСерийный номер: %s\r\n", str);

+ 0 - 1
shared/sys/sys_api.h

@@ -15,7 +15,6 @@
 // Cтруктура системных настроек
 typedef struct
 {
-    uint16_t model;			    // Модель
     char sn[SN_LEN];            // Серийный номер
     char prod_date[PROD_LEN];	// Дата производства
     char test_state[TS_LEN];    // Статус тестирования

Some files were not shown because too many files changed in this diff