haitao пре 1 година
родитељ
комит
bb9ca5b554
75 измењених фајлова са 5536 додато и 7807 уклоњено
  1. 11 10
      app/App/PC.c
  2. 15 18
      app/App/ec800m.c
  3. 1 1
      app/App/ec800m.h
  4. 6 7
      app/App/gd32f10x_it.c
  5. 22 15
      app/App/main.c
  6. 4 0
      app/App/mqttRecv.c
  7. 0 1
      app/App/otaEvent.c
  8. 49 72
      app/App/parseDeviceMessage.c
  9. 1 1
      app/App/parseDeviceMessage.h
  10. 763 2528
      app/Proj/JLinkLog.txt
  11. 965 1336
      app/Proj/Listings/Ringzle.map
  12. 25 25
      app/Proj/Listings/startup_gd32f10x_xd.lst
  13. BIN
      app/Proj/Objects/Ringzle.axf
  14. BIN
      app/Proj/Objects/Ringzle.bin
  15. 8 16
      app/Proj/Objects/Ringzle.build_log.htm
  16. 1086 1213
      app/Proj/Objects/Ringzle.htm
  17. 0 5
      app/Proj/Objects/Ringzle.lnp
  18. 1374 1497
      app/Proj/Objects/Ringzle_GD32F103C8T6.dep
  19. 2 2
      app/Proj/Objects/Ringzle_sct.Bak
  20. BIN
      app/Proj/Objects/cjson.crf
  21. BIN
      app/Proj/Objects/device_message.crf
  22. BIN
      app/Proj/Objects/dlt645.crf
  23. BIN
      app/Proj/Objects/dlt645_1997.crf
  24. BIN
      app/Proj/Objects/dlt645_2007.crf
  25. BIN
      app/Proj/Objects/dlt645_data.crf
  26. BIN
      app/Proj/Objects/dlt645_port.crf
  27. BIN
      app/Proj/Objects/ec800m.crf
  28. BIN
      app/Proj/Objects/gd32f10x_adc.crf
  29. BIN
      app/Proj/Objects/gd32f10x_bkp.crf
  30. BIN
      app/Proj/Objects/gd32f10x_can.crf
  31. BIN
      app/Proj/Objects/gd32f10x_crc.crf
  32. BIN
      app/Proj/Objects/gd32f10x_dac.crf
  33. BIN
      app/Proj/Objects/gd32f10x_dbg.crf
  34. BIN
      app/Proj/Objects/gd32f10x_dma.crf
  35. BIN
      app/Proj/Objects/gd32f10x_enet.crf
  36. BIN
      app/Proj/Objects/gd32f10x_exmc.crf
  37. BIN
      app/Proj/Objects/gd32f10x_exti.crf
  38. BIN
      app/Proj/Objects/gd32f10x_fmc.crf
  39. BIN
      app/Proj/Objects/gd32f10x_fwdgt.crf
  40. BIN
      app/Proj/Objects/gd32f10x_gpio.crf
  41. BIN
      app/Proj/Objects/gd32f10x_i2c.crf
  42. BIN
      app/Proj/Objects/gd32f10x_it.crf
  43. BIN
      app/Proj/Objects/gd32f10x_misc.crf
  44. BIN
      app/Proj/Objects/gd32f10x_pmu.crf
  45. BIN
      app/Proj/Objects/gd32f10x_rcu.crf
  46. BIN
      app/Proj/Objects/gd32f10x_rtc.crf
  47. BIN
      app/Proj/Objects/gd32f10x_sdio.crf
  48. BIN
      app/Proj/Objects/gd32f10x_spi.crf
  49. BIN
      app/Proj/Objects/gd32f10x_timer.crf
  50. BIN
      app/Proj/Objects/gd32f10x_usart.crf
  51. BIN
      app/Proj/Objects/gd32f10x_wwdgt.crf
  52. BIN
      app/Proj/Objects/key.crf
  53. BIN
      app/Proj/Objects/led.crf
  54. BIN
      app/Proj/Objects/log.crf
  55. BIN
      app/Proj/Objects/main.crf
  56. BIN
      app/Proj/Objects/mmodbus.crf
  57. BIN
      app/Proj/Objects/mqttrecv.crf
  58. BIN
      app/Proj/Objects/otaevent.crf
  59. BIN
      app/Proj/Objects/parsedevicemessage.crf
  60. BIN
      app/Proj/Objects/pc.crf
  61. BIN
      app/Proj/Objects/ring_buffer.crf
  62. BIN
      app/Proj/Objects/spi.crf
  63. BIN
      app/Proj/Objects/system_gd32f10x.crf
  64. BIN
      app/Proj/Objects/systick.crf
  65. BIN
      app/Proj/Objects/usart.crf
  66. BIN
      app/Proj/Objects/w25q32.crf
  67. 367 349
      app/Proj/Ringzle.uvguix.16936
  68. 39 7
      app/Proj/Ringzle.uvoptx
  69. 2 2
      app/Startup/startup_gd32f10x_xd.s
  70. 1 1
      app/bsp/ring_buffer.h
  71. 28 0
      app/bsp/usart.c
  72. 2 1
      app/bsp/usart.h
  73. 2 2
      bootloader/OBJ/bootloader.build_log.htm
  74. 529 464
      bootloader/USER/JLinkLog.txt
  75. 234 234
      bootloader/USER/bootloader.uvguix.16936

+ 11 - 10
app/App/PC.c

@@ -23,14 +23,15 @@ void readGatewayConfig(void);    //读取设备系列DTU/LORA等等
 void readGatewayMessage(void);	//读取sim卡相关信息
 void readSIMCARD(void);
 void read_json_config();
-void write_json_config();
+
+void	write_json_config(char *json);
 
 void ec800m_4G_Data_read(uint8_t *str,uint16_t len);
 
 volatile int RxState;
 
 usart2_data_buf_t RxPacket;
-volatile uint32_t uart2_json_buf_num;//串口232配置数据长度
+volatile uint32_t json_buf_num;//串口232配置数据长度
 /*
 	此中断处理逻辑较为复杂
 	总共有两条线路
@@ -47,6 +48,7 @@ volatile uint32_t uart2_json_buf_num;//串口232配置数据长度
 */
 void USART2_IRQHandler(void)
 {
+	char *writeJSON=NULL;
 	if (RESET != usart_interrupt_flag_get(USART2, USART_INT_FLAG_RBNE)) // 接收寄存器不空
 	{
 		uint8_t Serial_RxData;
@@ -81,8 +83,8 @@ void USART2_IRQHandler(void)
 				if (RxPacket.data[1] == WIRTE_GATEWAY_JSON_CONFIG) // 当为写入json数据后进入状态3、将对应数据放到usart0_buf中
 				{
 					RxState = 3;
-					dma_channel_disable(DMA0, DMA_CH4);
-					uart2_json_buf_num = 0;
+					writeJSON=malloc(40*1024);
+					json_buf_num = 0;
 				}
 				else if (RxPacket.data[1] == OTA_EVENT) // 进入了OTA事件此时的状态会处于接收程序状态、一直等待OTA的结束标志位
 				{
@@ -100,8 +102,7 @@ void USART2_IRQHandler(void)
 		}
 		else if (RxState == 3) // 接收到json信息进入进行处理
 		{
-			UART0_RX_STAT = 0x01;
-			UART0_RX_BUF[uart2_json_buf_num++] = Serial_RxData;
+			writeJSON[json_buf_num++]=Serial_RxData;
 		}
 		else if (RxState == 4) //进入OTA升级路线
 		{
@@ -130,8 +131,7 @@ void USART2_IRQHandler(void)
 				read_json_config();
 				break;
 			case WIRTE_GATEWAY_JSON_CONFIG:
-				dma_channel_enable(DMA0, DMA_CH4);
-				write_json_config();
+				write_json_config(writeJSON);
 				break;
 			case SET_GATEWAY_PLATFORM:
 				break;
@@ -370,9 +370,10 @@ void	read_json_config()
  *  返回值:无
  *  函数作用:读取内部json配置
  */
-void	write_json_config()
+void	write_json_config(char *json)
 {
-	bool success=WaitForUpData();
+	UART0_RX_STAT=0x01;   //复用代码
+	bool success=WaitForUpData(json);
 	int8_t resp[10];
 	memset(resp,0,10);
 	resp[0]=Top;

+ 15 - 18
app/App/ec800m.c

@@ -256,14 +256,14 @@ void EC800MSetPDP()
  *  返回值:无
  *  函数作用:从对应的http获取信息
  */
-bool EC800MGetUrl(char *url)
+bool EC800MGetUrl(char *url,char *dmaBuffer,uint32_t bufferSize)
 {
 	// Set url
 	char command[100];
 	sprintf(command, CMD_SET_URL, strlen(url)); // CMD_SET_URL "%d\r\n"
 
 	EC800MSendCmd(command, strlen(command)); // 设置服务器URL   响应若参数格式正确,且不发送 HTTP(S) GET/POST 请求:CONNECT
-	WaitResponse(RSP_CONNECT, 0);
+	WaitResponse(RSP_CONNECT, 100);
 	delay_1ms(200);
 	EC800MSendCmd(url, strlen(url)); // 输入URL
 	if (WaitResponse(RSP_OK, 5000) == false)
@@ -276,6 +276,7 @@ bool EC800MGetUrl(char *url)
 		return false;
 
 	// read to UFS
+
 	delay_1ms(200);
 	EC800MSendCmd(CMD_GET_TO_FILE, strlen(CMD_GET_TO_FILE)); //"AT+QHTTPREADFILE=\"UFS:http.txt\",80\r\n"
 	if (WaitResponse("QHTTPREADFILE:", 5000) == false)
@@ -283,12 +284,13 @@ bool EC800MGetUrl(char *url)
 
 	// get data from UFS
 	delay_1ms(1000);
+
+	dma_config_change(dmaBuffer,bufferSize);
 	EC800MSendCmd(CMD_READ_FILE, strlen(CMD_READ_FILE)); //"AT+QFDWL=http.txt\r\n"
 	delay_1ms(6000);
 
 	return true;
 }
-
 /*
  *  函数名:void ConnectMQTTSever(uint8_t *host, uint16_t port, uint8_t keepalive, uint8_t *clientid)
  *  输入参数:host:mqtt服务器IP port:mqtt端口,keepalive mqtt心跳时间,clientid设备id
@@ -495,8 +497,7 @@ void ConnectMQTTSever(uint8_t *host, uint16_t port, uint8_t keepalive, uint8_t *
  */
 void MQTTPublish(CONFIG_PARAMS *gateway)
 {
-	char *payload_out=malloc(2*1024);         //要发送的字符串
-	memset(payload_out,0,2*1024);
+	char *payload_out=malloc(25*1024);         //要发送的字符串
 	char mqtt_publish[200];        //发送字符串的指令
 	sprintf((char *)payload_out,"{\"deviceId\":\"%s\",\"data\":[",gateway->deviceId);//组成json头部
 	for (int i = 0; i < gateway->device_read_data_num; i++)
@@ -583,21 +584,17 @@ void MQTTPublish(CONFIG_PARAMS *gateway)
 		}
 	}
 }
-	sprintf(payload_out+strlen(payload_out)-1,"]}");
-	sprintf((char *)mqtt_publish, "AT+QMTPUBEX=0,0,0,0,\"%s\",%d\r\n", gateway->messageTopic, strlen(payload_out));
-	EC800MSendCmd(mqtt_publish, strlen(mqtt_publish));
-	WaitResponse("QMTPUBEX", 1000);	
-	delay_1ms(50);
-	EC800MSendCmd(payload_out, strlen(payload_out));
-	free(payload_out);
-	payload_out=NULL;
-
-	
-	//特殊处理2023、6、28日添加publish失败重新订阅MQTT平台
-	if(WaitResponse("QMTPUBEX", 1000)==false)
+	if(strlen(payload_out)>30)//小于这个值组成的字符串证明没有数据采集到、就不进行发布
 	{
-		NVIC_SystemReset();
+		sprintf(payload_out+strlen(payload_out)-1,"]}");
+		sprintf((char *)mqtt_publish, "AT+QMTPUBEX=0,0,0,0,\"%s\",%d\r\n", gateway->messageTopic, strlen(payload_out));
+		EC800MSendCmd(mqtt_publish, strlen(mqtt_publish));
+		WaitResponse("QMTPUBEX", 1000);	
+		delay_1ms(50);
+		EC800MSendCmd(payload_out, strlen(payload_out));
 	}
+		free(payload_out);
+		payload_out=NULL;
 }
 /*
  *  函数名:void MQTTSubTopic(uint8_t *commandTopic)

+ 1 - 1
app/App/ec800m.h

@@ -63,7 +63,7 @@ bool WaitResponse(char * expectStr, int timeout);
 void ConnectMQTTSever(uint8_t *host,uint16_t port,uint8_t keepalive,uint8_t *clientid);
 void EC800MSetPDP(void);
 
-bool EC800MGetUrl(char * url);
+bool EC800MGetUrl(char *url,char *dmaBuffer,uint32_t bufferSize);
 void MQTTPublish(CONFIG_PARAMS *device);
 void MQTTSubTopic(uint8_t *commandTopic);
 void ec800m_information_service(CONFIG_PARAMS *gateway);

+ 6 - 7
app/App/gd32f10x_it.c

@@ -161,15 +161,14 @@ void USART0_IRQHandler(void)
         usart_interrupt_flag_clear(USART0, USART_INT_FLAG_IDLE); /* 清除空闲中断标志位 */
         usart_data_receive(USART0);                              /* 清除接收完成标志位 */
         dma_channel_disable(DMA0, DMA_CH4);                      /* 关闭DMA传输 */
-
-        UART0_RX_NUM = sizeof(UART0_RX_BUF) - dma_transfer_number_get(DMA0, DMA_CH4);
-        UART0_RX_BUF[UART0_RX_NUM] = '\0'; /* 添加字符串结束符 */
+//        UART0_RX_NUM = sizeof(UART0_RX_BUF) - dma_transfer_number_get(DMA0, DMA_CH4);
+//        UART0_RX_BUF[UART0_RX_NUM] = '\0'; /* 添加字符串结束符 */
         UART0_RX_STAT = 0x01;              /* 接受状态 0x01:已接收到数据 */
-
-        dma_memory_address_config(DMA0, DMA_CH4, (uint32_t)UART0_RX_BUF);
-        dma_transfer_number_config(DMA0, DMA_CH4, sizeof(UART0_RX_BUF));
-        dma_channel_enable(DMA0, DMA_CH4);
+//        dma_memory_address_config(DMA0, DMA_CH4, (uint32_t)UART0_RX_BUF);
+//        dma_transfer_number_config(DMA0, DMA_CH4, sizeof(UART0_RX_BUF));
+			  dma_channel_enable(DMA0, DMA_CH4);
         Receive_MQTT_DataPack(); // 判别是否为mqtt触发的中断
+			  
     }
 }
 

+ 22 - 15
app/App/main.c

@@ -105,17 +105,17 @@ int main(void)
 	free(httpURL);
 	
 	
-	if (load_config_params() == -1)
-	{
-		check_ota_event();
-		strcpy(gateway->deviceId, strID);
-		strcpy(gateway->version, VERSION);
-		strcpy(gateway->gatewayMode, GATEWAYMODE);
-		strcpy(gateway->gateName,GATEWAYNAME);
-		LogPrint(LOG_ERROR, __func__, __LINE__, "No information in flash");
-		while (1) // flash中不含信息则会等待看门狗
-			;
-	}
+//	if (load_config_params() == -1)
+//	{
+//		check_ota_event();
+//		strcpy(gateway->deviceId, strID);
+//		strcpy(gateway->version, VERSION);
+//		strcpy(gateway->gatewayMode, GATEWAYMODE);
+//		strcpy(gateway->gateName,GATEWAYNAME);
+//		LogPrint(LOG_ERROR, __func__, __LINE__, "No information in flash");
+//		while (1) // flash中不含信息则会等待看门狗
+//			;
+//	}
 	//跳出获取信息循环后重新加载一下网关配置
 	gateway = get_config_params();
 	strcpy(gateway->deviceId, strID);
@@ -239,14 +239,20 @@ void readID(char *strId)
  */
 void http_load_config(uint8_t *httpURL)
 {
-	if (EC800MGetUrl(httpURL) == true) // 从http获取信息,获取成功则保存到本地
+	uint32_t BufferSize=50*1024;//最大获取的数据空间
+	char *dmabuffer=malloc(BufferSize);
+	if (EC800MGetUrl(httpURL,dmabuffer,BufferSize) == true) // 从http获取信息,获取成功则保存到本地
 	{
-		WaitForUpData();
+		WaitForUpData(dmabuffer);
 	}
-	else
+	else//如果没有从http拉取到配置则直接读取文件系统内的json数据
 	{
-		LogPrint(LOG_INFO, __func__, __LINE__, "Http failed to obtain information");
+			dma_config_change(dmabuffer,BufferSize);
+			EC800MSendCmd(CMD_READ_FILE, strlen(CMD_READ_FILE)); //"AT+QFDWL=http.txt\r\n"
+			delay_1ms(6000);
 	}
+	dma_config();
+	free(dmabuffer);
 }
 /*
  *  函数名:void fwdgt_init(void)
@@ -269,6 +275,7 @@ void task_fwdgt_reload(void)
 	/* feed fwdgt */
 	fwdgt_counter_reload();	
 }
+
 #if 0 // 本地信息调试使用
 	gateway->dataSource=MODBUS;
 	gateway->baudrate=9600;

+ 4 - 0
app/App/mqttRecv.c

@@ -32,6 +32,10 @@ void Receive_MQTT_DataPack(void)
         }
         Clear_DMA_Buffer();
     }
+		else if(strstr((const char *)UART0_RX_BUF, "QMTSTAT:")!=NULL)//为MQTT链路产生变化
+		{
+			NVIC_SystemReset();//暂时不做区分
+		}
 }
 /*
  *  函数名:bool MQTT_BUFFER_READ(uint8_t* json)

+ 0 - 1
app/App/otaEvent.c

@@ -33,7 +33,6 @@ int8_t check_ota_event()
 		int8_t recvSta = xmodem(1000);
 		if (recvSta == 0)
 		{
-			
 			return 0;
 		}
 		else  

+ 49 - 72
app/App/parseDeviceMessage.c

@@ -15,7 +15,7 @@ ring_buffer mqttRecv;
 void processHTTPjson(cJSON *json);
 char *processStringData(cJSON *data_obj, const char *key);
 int processIntData(cJSON *data_obj, const char *key);
-void processHttp(uint8_t *data);
+void processHttp(const uint8_t *data);
 
 static void extract_data_from_buffer(const char *buffer, uint32_t *len_ptr, uint16_t *checkCode_ptr);
 //static void extract_data_from_buffer232(const char *buffer, uint32_t *len_ptr, uint16_t *checkCode_ptr);
@@ -60,41 +60,18 @@ int processIntData(cJSON *data_obj, const char *key)
  *  函数作用:等待更新本地flash信息
  */
 
-bool WaitForUpData(void)
+bool WaitForUpData(char *dmaBuffer)
 {
 	if (UART0_RX_STAT > 0)
   {
     UART0_RX_STAT = 0;
     uint32_t len;
     uint16_t checkCode;
-    extract_data_from_buffer(UART0_RX_BUF, &len, &checkCode);
-		
-    uint16_t jsonCheck = checksum(UART0_RX_BUF, len);
+    extract_data_from_buffer(dmaBuffer, &len, &checkCode);
+    uint16_t jsonCheck = checksum(dmaBuffer, len);
     if (checkCode == jsonCheck)
     {
-				memset(UART0_RX_BUF + len, 0, sizeof(UART0_RX_BUF) - len);
-			if(UART0_RX_NUM<1024)
-				{
-					cJSON *json = cJSON_Parse(UART0_RX_BUF);
-					if (json != NULL)
-					{
-						processHTTPjson(json);
-						cJSON_Delete(json);
-						Clear_DMA_Buffer();
-						return true;
-					}
-					else
-					{
-						cJSON_Delete(json);
-						Clear_DMA_Buffer();
-						LogPrint(LOG_INFO, __func__, __LINE__, "json is to long");
-						return false;
-					}
-			}
-			else
-			{
-				processHttp(UART0_RX_BUF);
-			}
+				processHttp(dmaBuffer);
 		}
   }
 }
@@ -103,7 +80,6 @@ bool WaitForUpData(void)
 
 
 
-
 /*
  *  函数名:static void extract_data_from_buffer(const char* buffer, uint32_t *len_ptr, uint16_t *checkCode_ptr)
  *  输入参数:buffer字符串
@@ -237,43 +213,45 @@ void parseCommandData();
 
 
 
-void processHttp(uint8_t *data)
+void processHttp(const uint8_t *data)
 {
-		CONFIG_PARAMS gateway;
-		gateway.data_valid_flag = 0xF1; 
+		CONFIG_PARAMS *gateway;
+		gateway=get_config_params();
+		gateway->data_valid_flag = 0xF1; 
     char* ptr = (char*)data;
    
 		
-		gateway.dataSource=parseIntField(ptr,"\"dataSource\":");
-		gateway.baudrate=parseIntField(ptr,"\"baudrate\":");
-		gateway.checkBit=parseIntField(ptr,"\"checkBit\":");
-		parseStringField(ptr,"\"commandTopic\":\"",(char *)&gateway.commandTopic);
-		gateway.dataBits=parseIntField(ptr,"\"dataBit\":");
-		parseStringField(ptr,"\"deviceId\":\"",(char *)&gateway.deviceId);
-		parseStringField(ptr,"\"host\":\"",(char *)&gateway.host);
-		gateway.inboundTime=parseIntField(ptr,"\"inboundTime\":");
-		parseStringField(ptr,"\"messageTopic\":\"",(char *)&gateway.messageTopic);
-		gateway.pollTime=parseIntField(ptr,"\"pollTime\":");
-		gateway.port=parseIntField(ptr,"\"port\":");
-		if(gateway.dataSource==2)											//为MODBUS
+		gateway->dataSource=parseIntField(ptr,"\"dataSource\":");
+		gateway->baudrate=parseIntField(ptr,"\"baudrate\":");
+		gateway->checkBit=parseIntField(ptr,"\"checkBit\":");
+		gateway->stopBit=parseIntField(ptr,"\"stopBit\":");
+		parseStringField(ptr,"\"commandTopic\":\"",(char *)&gateway->commandTopic);
+		gateway->dataBits=parseIntField(ptr,"\"dataBit\":");
+//		parseStringField(ptr,"\"deviceId\":\"",(char *)&gateway->deviceId);
+		parseStringField(ptr,"\"host\":\"",(char *)&gateway->host);
+		gateway->inboundTime=parseIntField(ptr,"\"inboundTime\":");
+		parseStringField(ptr,"\"messageTopic\":\"",(char *)&gateway->messageTopic);
+		gateway->pollTime=parseIntField(ptr,"\"pollTime\":");
+		gateway->port=parseIntField(ptr,"\"port\":");
+		if(gateway->dataSource==2)											//为MODBUS
 		{
 			ptr = strstr(ptr, "\"commandData\":[");                 
 			int i=0;
 			while(1)
 			{
-				gateway.device_write_data[i].bigLittleFormat=parseIntField(ptr,"\"bigLittleFormat\":");
-				parseStringField(ptr,"\"deviceId\":\"",(char *)&gateway.device_write_data[i].deviceId);
-				parseStringField(ptr,"\"identifier\":\"",(char *)&gateway.device_write_data[i].keyword);
-				gateway.device_write_data[i].registerLength =parseIntField(ptr,"\"registerByteNum\":\"");
-				gateway.device_write_data[i].mdbRegister=parseIntField(ptr,"\"registerAddress\":");
-				gateway.device_write_data[i].mdbSlave =parseIntField(ptr,"\"slaveAddress\":");
-				gateway.device_write_data[i].mdbFunctionCode=parseIntField(ptr,"\"wFunctionCode\":");
+				gateway->device_write_data[i].bigLittleFormat=parseIntField(ptr,"\"bigLittleFormat\":");
+				parseStringField(ptr,"\"deviceId\":\"",(char *)&gateway->device_write_data[i].deviceId);
+				parseStringField(ptr,"\"identifier\":\"",(char *)&gateway->device_write_data[i].keyword);
+				gateway->device_write_data[i].registerLength =parseIntField(ptr,"\"registerByteNum\":\"");
+				gateway->device_write_data[i].mdbRegister=parseIntField(ptr,"\"registerAddress\":");
+				gateway->device_write_data[i].mdbSlave =parseIntField(ptr,"\"slaveAddress\":");
+				gateway->device_write_data[i].mdbFunctionCode=parseIntField(ptr,"\"wFunctionCode\":");
 				ptr=strstr(ptr,"}");									//移动位置到结束
 				ptr++;
 				if(ptr[0]==']')
 				{
 					i++;
-				  gateway.device_write_data_num=i;
+				  gateway->device_write_data_num=i;
 					ptr = (char*)data;
 					break;
 				}
@@ -283,7 +261,7 @@ void processHttp(uint8_t *data)
 				if (!ptr)
 				{
 					i++;
-					gateway.device_write_data_num=i;
+					gateway->device_write_data_num=i;
 					ptr = (char*)data;
 					break;
 				}
@@ -293,20 +271,20 @@ void processHttp(uint8_t *data)
 			i=0;
 			while(*ptr != ']')
 			{
-				gateway.device_read_data[i].bigLittleFormat=parseIntField(ptr,"\"bigLittleFormat\":");
-				parseStringField(ptr,"\"deviceId\":\"",(char *)&gateway.device_read_data[i].deviceId);
-				parseStringField(ptr,"\"identifier\":\"",(char *)&gateway.device_read_data[i].keyword);
-				gateway.device_read_data[i].mdbRegister=parseIntField(ptr,"\"registerAddress\":");
-				gateway.device_read_data[i].mdbSlave =parseIntField(ptr,"\"slaveAddress\":");
-				gateway.device_read_data[i].registerLength =parseIntField(ptr,"\"registerByteNum\":");
-				gateway.device_read_data[i].mdbFunctionCode=parseIntField(ptr,"\"rFunctionCode\":");
-				gateway.device_read_data[i].decimalPoint=parseIntField(ptr,"\"precise\":");
+				gateway->device_read_data[i].bigLittleFormat=parseIntField(ptr,"\"bigLittleFormat\":");
+				parseStringField(ptr,"\"deviceId\":\"",(char *)&gateway->device_read_data[i].deviceId);
+				parseStringField(ptr,"\"identifier\":\"",(char *)&gateway->device_read_data[i].keyword);
+				gateway->device_read_data[i].mdbRegister=parseIntField(ptr,"\"registerAddress\":");
+				gateway->device_read_data[i].mdbSlave =parseIntField(ptr,"\"slaveAddress\":");
+				gateway->device_read_data[i].registerLength =parseIntField(ptr,"\"registerByteNum\":");
+				gateway->device_read_data[i].mdbFunctionCode=parseIntField(ptr,"\"rFunctionCode\":");
+				gateway->device_read_data[i].decimalPoint=parseIntField(ptr,"\"precise\":");
 				ptr=strstr(ptr,"}");									//移动位置到结束
 				ptr++;
 				if(ptr[0]==']')
 				{
 					i++;
-				  gateway.device_read_data_num=i;
+				  gateway->device_read_data_num=i;
 					ptr = (char*)data;
 					break;
 				}
@@ -316,7 +294,7 @@ void processHttp(uint8_t *data)
 				if (!ptr)
 				{
 					i++;
-					gateway.device_read_data_num=i;
+					gateway->device_read_data_num=i;
 					ptr = (char*)data;
 					break;
 				}
@@ -324,9 +302,9 @@ void processHttp(uint8_t *data)
 			}
 		}
 		
-		else if(gateway.dataSource==1)               //为dlt645协议
+		else if(gateway->dataSource==1)               //为dlt645协议
 		{
-			gateway.dataType645=parseIntField(ptr,"\"version645\":");
+			gateway->dataType645=parseIntField(ptr,"\"version645\":");
 			ptr=strstr(ptr,"\"sensorData\":[");
 			int i=0;
 			while(*ptr != ']')
@@ -338,19 +316,19 @@ void processHttp(uint8_t *data)
           {
             uint8_t byte;
             sscanf((const char *)&string[j * 2], "%2hhx", &byte);
-            gateway.device_read_data[i].deviceID645[j] = byte;
+            gateway->device_read_data[i].deviceID645[j] = byte;
           }
         }
 				free(string);
-				parseStringField(ptr, "\"deviceId\":\"",(char *)&gateway.device_read_data[i].deviceId);
-				parseStringField(ptr, "\"identifier\":\"",(char *)&gateway.device_read_data[i].keyword);
-				gateway.device_read_data[i].dataType645=parseIntField(ptr,"\"identifier645\":");
+				parseStringField(ptr, "\"deviceId\":\"",(char *)&gateway->device_read_data[i].deviceId);
+				parseStringField(ptr, "\"identifier\":\"",(char *)&gateway->device_read_data[i].keyword);
+				gateway->device_read_data[i].dataType645=parseIntField(ptr,"\"identifier645\":");
 				ptr=strstr(ptr,"}");
 				ptr++;
 				if(ptr[0]==']')
 				{
 					i++;
-				  gateway.device_read_data_num=i;
+				  gateway->device_read_data_num=i;
 					ptr = (char*)data;
 					break;
 				}
@@ -360,7 +338,7 @@ void processHttp(uint8_t *data)
 				if (!ptr)
 				{
 					i++;
-					gateway.device_read_data_num=i;
+					gateway->device_read_data_num=i;
 					ptr = (char*)data;
 					break;
 				}
@@ -368,7 +346,6 @@ void processHttp(uint8_t *data)
 			}
 		}
 		ptr=NULL;
-		save_config_params(&gateway);
 }
 /*
  *  函数名: void mmodbusRead(CONFIG_PARAMS * gateway)

+ 1 - 1
app/App/parseDeviceMessage.h

@@ -10,7 +10,7 @@
 #define  MODBUS  2
 #define DLT645   1
 
-bool WaitForUpData(void);
+bool WaitForUpData(char *dmaBuffer);
 void modbusRead(CONFIG_PARAMS * gateway);
 extern ring_buffer mqttRecv;
 void parseMQTTData(CONFIG_PARAMS *gateway);

Разлика између датотеке није приказан због своје велике величине
+ 763 - 2528
app/Proj/JLinkLog.txt


Разлика између датотеке није приказан због своје велике величине
+ 965 - 1336
app/Proj/Listings/Ringzle.map


+ 25 - 25
app/Proj/Listings/startup_gd32f10x_xd.lst

@@ -70,39 +70,39 @@ ARM Macro Assembler    Page 2
 
 
    42 00000000         
-   43 00000000 00000400 
+   43 00000000 00000800 
                        Stack_Size
-                               EQU              0x0000400
+                               EQU              0x0000800
    44 00000000         
    45 00000000                 AREA             STACK, NOINIT, READWRITE, ALIGN
  = 3
    46 00000000         Stack_Mem
                                SPACE            Stack_Size
-   47 00000400         __initial_sp
-   48 00000400         
-   49 00000400         
-   50 00000400         ; <h> Heap Configuration
-   51 00000400         ;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
-   52 00000400         ; </h>
-   53 00000400         
-   54 00000400 00009000 
+   47 00000800         __initial_sp
+   48 00000800         
+   49 00000800         
+   50 00000800         ; <h> Heap Configuration
+   51 00000800         ;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
+   52 00000800         ; </h>
+   53 00000800         
+   54 00000800 00010000 
                        Heap_Size
-                               EQU              0x00009000
-   55 00000400         
-   56 00000400                 AREA             HEAP, NOINIT, READWRITE, ALIGN 
+                               EQU              0x00010000
+   55 00000800         
+   56 00000800                 AREA             HEAP, NOINIT, READWRITE, ALIGN 
 = 3
    57 00000000         __heap_base
    58 00000000         Heap_Mem
                                SPACE            Heap_Size
-   59 00009000         __heap_limit
-   60 00009000         
-   61 00009000         
-   62 00009000                 PRESERVE8
-   63 00009000                 THUMB
-   64 00009000         
-   65 00009000         ;                   /* reset Vector Mapped to at Address
+   59 00010000         __heap_limit
+   60 00010000         
+   61 00010000         
+   62 00010000                 PRESERVE8
+   63 00010000                 THUMB
+   64 00010000         
+   65 00010000         ;                   /* reset Vector Mapped to at Address
                         0 */
-   66 00009000                 AREA             RESET, DATA, READONLY
+   66 00010000                 AREA             RESET, DATA, READONLY
    67 00000000                 EXPORT           __Vectors
    68 00000000                 EXPORT           __Vectors_End
    69 00000000                 EXPORT           __Vectors_Size
@@ -636,7 +636,7 @@ Symbol: Stack_Mem
    Uses
       None
 Comment: Stack_Mem unused
-__initial_sp 00000400
+__initial_sp 00000800
 
 Symbol: __initial_sp
    Definitions
@@ -676,7 +676,7 @@ Symbol: __heap_base
    Uses
       At line 351 in file ..\Startup\startup_gd32f10x_xd.s
 Comment: __heap_base used once
-__heap_limit 00009000
+__heap_limit 00010000
 
 Symbol: __heap_limit
    Definitions
@@ -1437,7 +1437,7 @@ Symbol: WWDGT_IRQHandler
 ARM Macro Assembler    Page 1 Alphabetic symbol ordering
 Absolute symbols
 
-Heap_Size 00009000
+Heap_Size 00010000
 
 Symbol: Heap_Size
    Definitions
@@ -1445,7 +1445,7 @@ Symbol: Heap_Size
    Uses
       At line 58 in file ..\Startup\startup_gd32f10x_xd.s
 Comment: Heap_Size used once
-Stack_Size 00000400
+Stack_Size 00000800
 
 Symbol: Stack_Size
    Definitions

BIN
app/Proj/Objects/Ringzle.axf


BIN
app/Proj/Objects/Ringzle.bin


+ 8 - 16
app/Proj/Objects/Ringzle.build_log.htm

@@ -21,8 +21,8 @@ Target DLL:      Segger\JL2CM3.dll V2.99.36.0
 Dialog DLL:      TCM.DLL V1.36.5.0
  
 <h2>Project:</h2>
-D:\Project\dtu\Proj\Ringzle.uvprojx
-Project File Date:  06/28/2023
+D:\Project\dtu_gateway\app\Proj\Ringzle.uvprojx
+Project File Date:  08/15/2023
 
 <h2>Output:</h2>
 *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\workSoftware\stm32Software\mdk\mdkcore\ARM\ARMCC\Bin'
@@ -44,14 +44,6 @@ compiling main.c...
   	strcpy(gateway->gateName,GATEWAYNAME);
 ..\App\main.c(104): warning:  #167-D: argument of type "char *" is incompatible with parameter of type "uint8_t *"
    	http_load_config(httpURL);
-..\App\main.c(111): warning:  #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *restrict"
-  		strcpy(gateway->deviceId, strID);
-..\App\main.c(112): warning:  #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *restrict"
-  		strcpy(gateway->version, VERSION);
-..\App\main.c(113): warning:  #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *restrict"
-  		strcpy(gateway->gatewayMode, GATEWAYMODE);
-..\App\main.c(114): warning:  #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *restrict"
-  		strcpy(gateway->gateName,GATEWAYNAME);
 ..\App\main.c(121): warning:  #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *restrict"
   	strcpy(gateway->deviceId, strID);
 ..\App\main.c(122): warning:  #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *restrict"
@@ -60,14 +52,14 @@ compiling main.c...
   	strcpy(gateway->gatewayMode, GATEWAYMODE);
 ..\App\main.c(124): warning:  #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *restrict"
   	strcpy(gateway->gateName,GATEWAYNAME);
-..\App\main.c(242): warning:  #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *"
-  	if (EC800MGetUrl(httpURL) == true) // 从http获取信息,获取成功则保存到本地
-..\App\main.c: 17 warnings, 0 errors
+..\App\main.c(244): warning:  #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *"
+  	if (EC800MGetUrl(httpURL,dmabuffer,BufferSize) == true) // 从http获取信息,获取成功则保存到本地
+..\App\main.c: 13 warnings, 0 errors
 linking...
-Program Size: Code=38444 RO-data=2680 RW-data=224 ZI-data=90320  
+Program Size: Code=36596 RO-data=2648 RW-data=224 ZI-data=97232  
 FromELF: creating hex file...
 After Build - User command #1: fromelf --bin --output ./Objects/Ringzle.bin ./Objects/Ringzle.axf
-".\Objects\Ringzle.axf" - 0 Error(s), 17 Warning(s).
+".\Objects\Ringzle.axf" - 0 Error(s), 13 Warning(s).
 
 <h2>Software Packages used:</h2>
 
@@ -81,7 +73,7 @@ Package Vendor: GigaDevice
   D:\workSoftware\stm32Software\mdk\mdkpack\GigaDevice\GD32F10x_DFP\2.0.3\Device\Include
 
 <h2>Collection of Component Files used:</h2>
-Build Time Elapsed:  00:00:00
+Build Time Elapsed:  00:00:01
 </pre>
 </body>
 </html>

Разлика између датотеке није приказан због своје велике величине
+ 1086 - 1213
app/Proj/Objects/Ringzle.htm


+ 0 - 5
app/Proj/Objects/Ringzle.lnp

@@ -41,11 +41,6 @@
 ".\objects\ring_buffer.o"
 ".\objects\w25q32.o"
 ".\objects\key.o"
-".\objects\dhcp.o"
-".\objects\dns.o"
-".\objects\socket.o"
-".\objects\w5500.o"
-".\objects\wizchip_conf.o"
 ".\objects\cjson.o"
 ".\objects\dlt645.o"
 ".\objects\dlt645_2007.o"

Разлика између датотеке није приказан због своје велике величине
+ 1374 - 1497
app/Proj/Objects/Ringzle_GD32F103C8T6.dep


+ 2 - 2
app/Proj/Objects/Ringzle_sct.Bak

@@ -2,8 +2,8 @@
 ; *** Scatter-Loading Description File generated by uVision ***
 ; *************************************************************
 
-LR_IROM1 0x08000000 0x00100000  {    ; load region size_region
-  ER_IROM1 0x08000000 0x00100000  {  ; load address = execution address
+LR_IROM1 0x08005000 0x00100000  {    ; load region size_region
+  ER_IROM1 0x08005000 0x00100000  {  ; load address = execution address
    *.o (RESET, +First)
    *(InRoot$$Sections)
    .ANY (+RO)

BIN
app/Proj/Objects/cjson.crf


BIN
app/Proj/Objects/device_message.crf


BIN
app/Proj/Objects/dlt645.crf


BIN
app/Proj/Objects/dlt645_1997.crf


BIN
app/Proj/Objects/dlt645_2007.crf


BIN
app/Proj/Objects/dlt645_data.crf


BIN
app/Proj/Objects/dlt645_port.crf


BIN
app/Proj/Objects/ec800m.crf


BIN
app/Proj/Objects/gd32f10x_adc.crf


BIN
app/Proj/Objects/gd32f10x_bkp.crf


BIN
app/Proj/Objects/gd32f10x_can.crf


BIN
app/Proj/Objects/gd32f10x_crc.crf


BIN
app/Proj/Objects/gd32f10x_dac.crf


BIN
app/Proj/Objects/gd32f10x_dbg.crf


BIN
app/Proj/Objects/gd32f10x_dma.crf


BIN
app/Proj/Objects/gd32f10x_enet.crf


BIN
app/Proj/Objects/gd32f10x_exmc.crf


BIN
app/Proj/Objects/gd32f10x_exti.crf


BIN
app/Proj/Objects/gd32f10x_fmc.crf


BIN
app/Proj/Objects/gd32f10x_fwdgt.crf


BIN
app/Proj/Objects/gd32f10x_gpio.crf


BIN
app/Proj/Objects/gd32f10x_i2c.crf


BIN
app/Proj/Objects/gd32f10x_it.crf


BIN
app/Proj/Objects/gd32f10x_misc.crf


BIN
app/Proj/Objects/gd32f10x_pmu.crf


BIN
app/Proj/Objects/gd32f10x_rcu.crf


BIN
app/Proj/Objects/gd32f10x_rtc.crf


BIN
app/Proj/Objects/gd32f10x_sdio.crf


BIN
app/Proj/Objects/gd32f10x_spi.crf


BIN
app/Proj/Objects/gd32f10x_timer.crf


BIN
app/Proj/Objects/gd32f10x_usart.crf


BIN
app/Proj/Objects/gd32f10x_wwdgt.crf


BIN
app/Proj/Objects/key.crf


BIN
app/Proj/Objects/led.crf


BIN
app/Proj/Objects/log.crf


BIN
app/Proj/Objects/main.crf


BIN
app/Proj/Objects/mmodbus.crf


BIN
app/Proj/Objects/mqttrecv.crf


BIN
app/Proj/Objects/otaevent.crf


BIN
app/Proj/Objects/parsedevicemessage.crf


BIN
app/Proj/Objects/pc.crf


BIN
app/Proj/Objects/ring_buffer.crf


BIN
app/Proj/Objects/spi.crf


BIN
app/Proj/Objects/system_gd32f10x.crf


BIN
app/Proj/Objects/systick.crf


BIN
app/Proj/Objects/usart.crf


BIN
app/Proj/Objects/w25q32.crf


Разлика између датотеке није приказан због своје велике величине
+ 367 - 349
app/Proj/Ringzle.uvguix.16936


+ 39 - 7
app/Proj/Ringzle.uvoptx

@@ -157,25 +157,57 @@
         <Bp>
           <Number>0</Number>
           <Type>0</Type>
+          <LineNumber>182</LineNumber>
+          <EnabledFlag>1</EnabledFlag>
+          <Address>134270926</Address>
+          <ByteObject>0</ByteObject>
+          <HtxType>0</HtxType>
+          <ManyObjects>0</ManyObjects>
+          <SizeOfObject>0</SizeOfObject>
+          <BreakByAccess>0</BreakByAccess>
+          <BreakIfRCount>1</BreakIfRCount>
+          <Filename>..\App\PC.c</Filename>
+          <ExecCommand></ExecCommand>
+          <Expression>\\Ringzle\../App/PC.c\182</Expression>
+        </Bp>
+        <Bp>
+          <Number>1</Number>
+          <Type>0</Type>
           <LineNumber>183</LineNumber>
           <EnabledFlag>1</EnabledFlag>
-          <Address>0</Address>
+          <Address>134270936</Address>
           <ByteObject>0</ByteObject>
           <HtxType>0</HtxType>
           <ManyObjects>0</ManyObjects>
           <SizeOfObject>0</SizeOfObject>
           <BreakByAccess>0</BreakByAccess>
-          <BreakIfRCount>0</BreakIfRCount>
+          <BreakIfRCount>1</BreakIfRCount>
           <Filename>..\App\PC.c</Filename>
           <ExecCommand></ExecCommand>
-          <Expression></Expression>
+          <Expression>\\Ringzle\../App/PC.c\183</Expression>
+        </Bp>
+        <Bp>
+          <Number>2</Number>
+          <Type>0</Type>
+          <LineNumber>500</LineNumber>
+          <EnabledFlag>1</EnabledFlag>
+          <Address>134245252</Address>
+          <ByteObject>0</ByteObject>
+          <HtxType>0</HtxType>
+          <ManyObjects>0</ManyObjects>
+          <SizeOfObject>0</SizeOfObject>
+          <BreakByAccess>0</BreakByAccess>
+          <BreakIfRCount>1</BreakIfRCount>
+          <Filename>..\App\ec800m.c</Filename>
+          <ExecCommand></ExecCommand>
+          <Expression>\\Ringzle\../App/ec800m.c\500</Expression>
         </Bp>
       </Breakpoint>
       <MemoryWindow1>
         <Mm>
           <WinNumber>1</WinNumber>
           <SubType>8</SubType>
-          <ItemText>gateway</ItemText>
+          <ItemText>payload_out</ItemText>
           <AccSizeX>0</AccSizeX>
         </Mm>
       </MemoryWindow1>
@@ -246,7 +278,7 @@
 
   <Group>
     <GroupName>Startup</GroupName>
-    <tvExp>0</tvExp>
+    <tvExp>1</tvExp>
     <tvExpOptDlg>0</tvExpOptDlg>
     <cbSel>0</cbSel>
     <RteFlg>0</RteFlg>
@@ -266,7 +298,7 @@
 
   <Group>
     <GroupName>App</GroupName>
-    <tvExp>0</tvExp>
+    <tvExp>1</tvExp>
     <tvExpOptDlg>0</tvExpOptDlg>
     <cbSel>0</cbSel>
     <RteFlg>0</RteFlg>
@@ -790,7 +822,7 @@
 
   <Group>
     <GroupName>dlt</GroupName>
-    <tvExp>1</tvExp>
+    <tvExp>0</tvExp>
     <tvExpOptDlg>0</tvExpOptDlg>
     <cbSel>0</cbSel>
     <RteFlg>0</RteFlg>

+ 2 - 2
app/Startup/startup_gd32f10x_xd.s

@@ -40,7 +40,7 @@
 ;   <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
 ; </h>
 
-Stack_Size          EQU     0x0000400
+Stack_Size          EQU     0x0000800
 
                     AREA    STACK, NOINIT, READWRITE, ALIGN = 3
 Stack_Mem           SPACE   Stack_Size
@@ -51,7 +51,7 @@ __initial_sp
 ;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
 ; </h>
 
-Heap_Size           EQU     0x00009000
+Heap_Size           EQU     0x00010000
 
                     AREA    HEAP, NOINIT, READWRITE, ALIGN = 3
 __heap_base

+ 1 - 1
app/bsp/ring_buffer.h

@@ -4,7 +4,7 @@
 
 #include "gd32f10x.h"
 
-#define BUFFER_SIZE 256        /* 环形缓冲区的大小 */
+#define BUFFER_SIZE 4*1024        /* 环形缓冲区的大小 */
 typedef struct
 {
     volatile unsigned int pW;           /* 写地址 */

+ 28 - 0
app/bsp/usart.c

@@ -239,6 +239,34 @@ void dma_config(void)
     dma_channel_enable(DMA0, DMA_CH4);
 	 
 
+}
+//手动控制dma搬运的数据地址和大小,在使用完成后需要恢复到默认的dma配置
+void dma_config_change(char *dmaBuffer,uint32_t bufferSize)
+{
+	  dma_parameter_struct dma_init_struct;
+
+    rcu_periph_clock_enable(RCU_DMA0);
+
+    dma_deinit(DMA0, DMA_CH4);
+    dma_init_struct.direction = DMA_PERIPHERAL_TO_MEMORY;		
+    dma_init_struct.memory_addr = (uint32_t)dmaBuffer;		
+    dma_init_struct.memory_inc = DMA_MEMORY_INCREASE_ENABLE;	
+    dma_init_struct.memory_width = DMA_MEMORY_WIDTH_8BIT;		
+    dma_init_struct.number = bufferSize;						
+    dma_init_struct.periph_addr = (uint32_t)(&USART_DATA(USART0));// ((uint32_t)0x40013804);		
+    dma_init_struct.periph_inc = DMA_PERIPH_INCREASE_DISABLE;	
+    dma_init_struct.periph_width = DMA_PERIPHERAL_WIDTH_8BIT;	
+    dma_init_struct.priority = DMA_PRIORITY_ULTRA_HIGH;			
+    dma_init(DMA0, DMA_CH4, &dma_init_struct);
+    
+    dma_circulation_disable(DMA0, DMA_CH4);
+    dma_memory_to_memory_disable(DMA0, DMA_CH4);
+
+    usart_dma_transmit_config(USART0, USART_DENT_ENABLE|USART_DENR_ENABLE);
+		//nvic_irq_enable(DMA0_Channel4_IRQn, 2, 2);
+	
+    dma_interrupt_enable(DMA0, DMA_CH4, DMA_INT_FTF|DMA_INT_ERR);
+    dma_channel_enable(DMA0, DMA_CH4);
 }
 /*
  *  函数名:void config_485_port(uint32_t com,uint32_t baudrate, uint8_t databits, uint8_t stopbits, uint8_t parity, uint8_t flowcontrol)

+ 2 - 1
app/bsp/usart.h

@@ -81,7 +81,7 @@ void gd_com_485_send(uint8_t *message,uint16_t size);
 
 void dma_config(void);
 void Clear_DMA_Buffer(void);
-#define UART0_RX_LEN		1024 * 30	
+#define UART0_RX_LEN		1024 * 4	
 extern uint8_t UART0_RX_BUF[UART0_RX_LEN];
 extern uint8_t UART0_RX_STAT ;					
 extern uint32_t UART0_RX_NUM ;	
@@ -94,4 +94,5 @@ void config_485_port(uint32_t com,uint32_t baudrate, uint8_t databits, uint8_t s
 void nvic_config(void);
 void gd_com_232_Receive(void);
 void gd_com_232_send(uint8_t *message,uint16_t size);
+void dma_config_change(char *dmaBuffer,uint32_t bufferSize);
 #endif   

+ 2 - 2
bootloader/OBJ/bootloader.build_log.htm

@@ -21,7 +21,7 @@ Target DLL:      Segger\JL2CM3.dll V2.99.36.0
 Dialog DLL:      TCM.DLL V1.36.5.0
  
 <h2>Project:</h2>
-D:\Project\dtu\Bootloader\USER\bootloader.uvprojx
+D:\Project\dtu_gateway\bootloader\USER\bootloader.uvprojx
 Project File Date:  08/11/2023
 
 <h2>Output:</h2>
@@ -41,7 +41,7 @@ Package Vendor: GigaDevice
   D:\workSoftware\stm32Software\mdk\mdkpack\GigaDevice\GD32F10x_DFP\2.0.3\Device\Include
 
 <h2>Collection of Component Files used:</h2>
-Build Time Elapsed:  00:00:00
+Build Time Elapsed:  00:00:01
 </pre>
 </body>
 </html>

Разлика између датотеке није приказан због своје велике величине
+ 529 - 464
bootloader/USER/JLinkLog.txt


Разлика између датотеке није приказан због своје велике величине
+ 234 - 234
bootloader/USER/bootloader.uvguix.16936