zhaodecheng hai 1 ano
pai
achega
a4462e3b97
Modificáronse 100 ficheiros con 5365 adicións e 10619 borrados
  1. BIN=BIN
      CMSIS/License.doc
  2. 0 0
      DebugConfig/Target_1_STM32F103C8_1.0.0.dbgconf
  3. 194 0
      Drivers/AT.c
  4. 60 0
      Drivers/AT.h
  5. 129 0
      Drivers/Business/PumpBusiness.c
  6. 9 0
      Drivers/Business/PumpBusiness.h
  7. 312 0
      Drivers/Business/pump_dicts.c
  8. 72 0
      Drivers/Business/pump_dicts.h
  9. 406 0
      Drivers/CoAP.c
  10. 56 0
      Drivers/CoAP.h
  11. 618 0
      Drivers/EC800M_UDP_Client5.c
  12. 31 0
      Drivers/EC800M_UDP_Client5.h
  13. 1661 0
      Drivers/Ec800m/ec800m.c
  14. 75 0
      Drivers/Ec800m/ec800m.h
  15. 78 78
      Drivers/Encrypt/4GAES.c
  16. 6 6
      Drivers/Encrypt/4GAES.h
  17. 52 13
      Drivers/Encrypt/mbedtls_util.c
  18. 1 0
      Drivers/Encrypt/mbedtls_util.h
  19. 125 0
      Drivers/INflash.c
  20. 35 0
      Drivers/INflash.h
  21. 228 0
      Drivers/Regist.c
  22. 12 0
      Drivers/Regist.h
  23. 14 9
      Drivers/Utils/cJSON.c
  24. 8 1
      Drivers/Utils/cJSON.h
  25. 34 28
      Drivers/Utils/sys.c
  26. 5 4
      Drivers/Utils/sys.h
  27. 9 0
      EventRecorderStub.scvd
  28. 62 0
      Examples/Demo001.c
  29. 25 0
      Hardware/Buzzer.c
  30. 9 0
      Hardware/Buzzer.h
  31. 20 0
      Hardware/GPIOA.c
  32. 7 0
      Hardware/GPIOA.h
  33. 47 0
      Hardware/InfraredSensor.c
  34. 8 0
      Hardware/InfraredSensor.h
  35. 37 0
      Hardware/Key.c
  36. 9 0
      Hardware/Key.h
  37. 60 0
      Hardware/LED.c
  38. 12 0
      Hardware/LED.h
  39. 20 0
      Hardware/LightSensor.c
  40. 9 0
      Hardware/LightSensor.h
  41. 339 0
      Hardware/OLED.c
  42. 15 0
      Hardware/OLED.h
  43. 294 0
      Hardware/OLED_Font.h
  44. 82 0
      Hardware/Usart1.c
  45. 16 0
      Hardware/Usart1.h
  46. 50 0
      Hardware/Usart2.c
  47. 10 0
      Hardware/Usart2.h
  48. 4 0
      JLinkSettings.ini
  49. 0 473
      Libraries/Startup/TrueSTUDIO/startup_stm32f10x_cl.s
  50. 0 469
      Libraries/Startup/TrueSTUDIO/startup_stm32f10x_hd.s
  51. 0 451
      Libraries/Startup/TrueSTUDIO/startup_stm32f10x_hd_vl.s
  52. 0 347
      Libraries/Startup/TrueSTUDIO/startup_stm32f10x_ld.s
  53. 0 392
      Libraries/Startup/TrueSTUDIO/startup_stm32f10x_ld_vl.s
  54. 0 363
      Libraries/Startup/TrueSTUDIO/startup_stm32f10x_md.s
  55. 0 408
      Libraries/Startup/TrueSTUDIO/startup_stm32f10x_md_vl.s
  56. 0 467
      Libraries/Startup/TrueSTUDIO/startup_stm32f10x_xl.s
  57. 0 307
      Libraries/Startup/arm/startup_stm32f10x_md.s
  58. 0 468
      Libraries/Startup/gcc_ride7/startup_stm32f10x_cl.s
  59. 0 465
      Libraries/Startup/gcc_ride7/startup_stm32f10x_hd.s
  60. 0 442
      Libraries/Startup/gcc_ride7/startup_stm32f10x_hd_vl.s
  61. 0 343
      Libraries/Startup/gcc_ride7/startup_stm32f10x_ld.s
  62. 0 383
      Libraries/Startup/gcc_ride7/startup_stm32f10x_ld_vl.s
  63. 0 358
      Libraries/Startup/gcc_ride7/startup_stm32f10x_md.s
  64. 0 399
      Libraries/Startup/gcc_ride7/startup_stm32f10x_md_vl.s
  65. 0 465
      Libraries/Startup/gcc_ride7/startup_stm32f10x_xl.s
  66. 0 507
      Libraries/Startup/iar/startup_stm32f10x_cl.s
  67. 0 496
      Libraries/Startup/iar/startup_stm32f10x_hd.s
  68. 0 461
      Libraries/Startup/iar/startup_stm32f10x_hd_vl.s
  69. 0 366
      Libraries/Startup/iar/startup_stm32f10x_ld.s
  70. 0 369
      Libraries/Startup/iar/startup_stm32f10x_ld_vl.s
  71. 0 391
      Libraries/Startup/iar/startup_stm32f10x_md.s
  72. 0 394
      Libraries/Startup/iar/startup_stm32f10x_md_vl.s
  73. 0 496
      Libraries/Startup/iar/startup_stm32f10x_xl.s
  74. 0 0
      Library/misc.c
  75. 0 0
      Library/misc.h
  76. 0 0
      Library/stm32f10x_adc.c
  77. 0 0
      Library/stm32f10x_adc.h
  78. 0 0
      Library/stm32f10x_bkp.c
  79. 0 0
      Library/stm32f10x_bkp.h
  80. 0 0
      Library/stm32f10x_can.c
  81. 0 0
      Library/stm32f10x_can.h
  82. 0 0
      Library/stm32f10x_cec.c
  83. 0 0
      Library/stm32f10x_cec.h
  84. 0 0
      Library/stm32f10x_crc.c
  85. 0 0
      Library/stm32f10x_crc.h
  86. 0 0
      Library/stm32f10x_dac.c
  87. 0 0
      Library/stm32f10x_dac.h
  88. 0 0
      Library/stm32f10x_dbgmcu.c
  89. 0 0
      Library/stm32f10x_dbgmcu.h
  90. 0 0
      Library/stm32f10x_dma.c
  91. 0 0
      Library/stm32f10x_dma.h
  92. 0 0
      Library/stm32f10x_exti.c
  93. 0 0
      Library/stm32f10x_exti.h
  94. 0 0
      Library/stm32f10x_flash.c
  95. 0 0
      Library/stm32f10x_flash.h
  96. 0 0
      Library/stm32f10x_fsmc.c
  97. 0 0
      Library/stm32f10x_fsmc.h
  98. 0 0
      Library/stm32f10x_gpio.c
  99. 0 0
      Library/stm32f10x_gpio.h
  100. 0 0
      Library/stm32f10x_i2c.c

BIN=BIN
CMSIS/License.doc


+ 0 - 0
Project/DebugConfig/PECAHeadHost_STM32F103VE_1.0.0.dbgconf → DebugConfig/Target_1_STM32F103C8_1.0.0.dbgconf


+ 194 - 0
Drivers/AT.c

@@ -0,0 +1,194 @@
+#include "stm32f10x.h"
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "AT.h"
+#include "sys.h"
+#include "ec800m.h"
+
+uint8_t DEBUG = 1; // Debug开关
+
+
+
+// AT指令
+struct AT_Struct AT = {
+	.status = AT_Status_None,
+	.result_length = 0
+};
+
+
+// 获取AT指令返回的长度
+uint16_t AT_result_length(void)
+{
+	return AT.result_length;
+}
+// 获取AT指令返回的内容
+uint8_t * AT_result(void)
+{
+	return AT.result;
+}
+
+// 发送AT指令的函数,配置串口
+static void USART_SendByte(uint8_t Byte)
+{
+	USART_SendData(USART2, Byte);
+	while(USART_GetFlagStatus(USART2, USART_FLAG_TXE) == RESET);
+}
+// 发送字节数组
+static void USART_Send_Bytes(uint8_t * bytes, uint16_t Length)
+{
+	uint16_t i;
+	for(i = 0; i < Length; i ++)
+	{
+		USART_SendByte(bytes[i]);
+	}
+}
+
+// 串口中断函数
+void USART2_IRQHandler(void)
+{
+	if(USART_GetFlagStatus(USART2, USART_IT_RXNE) == SET)
+	{
+		uint8_t RxData = USART_ReceiveData(USART2);
+		// 写入缓存
+		AT.result[AT.result_length++] = RxData;
+		
+		// 串口的一些设置
+		USART_ClearITPendingBit(USART2, USART_IT_RXNE);
+	}
+}
+
+// 发送AT指令,二进制
+void AT_Send_Bytes(uint8_t * CMD, uint16_t length)
+{
+	// 状态
+	AT.status = AT_Status_Using;
+	// 发送AT指令
+	USART_Send_Bytes(CMD, length);
+}
+// 发送AT指令,字符串
+void AT_Send_String(char * CMD)
+{
+	AT_Send_Bytes((uint8_t * )CMD, strlen(CMD));
+}
+
+// 清空AT指令
+void AT_Clear()
+{
+	AT.status = AT_Status_None;
+	// 清除AT指令返回
+	memset(AT.result, 0, sizeof(AT.result));
+	AT.result_length = 0;
+}
+// 清空AT指令返回的结果
+void AT_Clear_Result()
+{
+	// 清除AT指令返回
+	memset(AT.result, 0, sizeof(AT.result));
+	AT.result_length = 0;
+}
+
+// 设置AT指令的状态
+void AT_Set_Status(enum AT_Status status)
+{
+	AT.status = status;
+}
+
+
+// 串口打印日志
+void Log_SendByte(uint8_t Byte)
+{
+	USART_SendData(USART1, Byte);
+	while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET);
+}
+void Log_SendString(char *String)
+{
+	uint16_t i;
+	for(i = 0; String[i] != '\0'; i ++)
+//	for(i = 0; i<5; i ++)
+	{
+		Log_SendByte(String[i]);
+	}
+}
+// 打印字节
+void Log_SendArray(uint8_t * arr, uint16_t len)
+{
+	uint16_t i;
+	for(i = 0; i < len; i ++)
+	{
+		Log_SendByte(arr[i]);
+	}
+}
+char Log_String[512];
+void Log_Printf(char *format, ...)
+{
+	memset(Log_String, 0, sizeof(Log_String));
+	va_list arg;
+	va_start(arg, format);
+	vsprintf(Log_String, format, arg);
+	va_end(arg);
+	Log_SendString(Log_String);
+}
+// 打印字节
+void Log_SendArray_Debug(uint8_t * arr, uint16_t len)
+{
+	if(DEBUG == 0) return; // 调试开关
+	Log_SendArray(arr, len);
+}
+// 打印的缓存
+void Log_Printf_Debug(char *format, ...)
+{
+	if(DEBUG == 0) return; // 调试开关
+	memset(Log_String, 0, sizeof(Log_String));
+	va_list arg;
+	va_start(arg, format);
+	vsprintf(Log_String, format, arg);
+	va_end(arg);
+	Log_SendString(Log_String);
+}
+
+// AT监听
+void AT_Handle()
+{
+	if(AT.status == AT_Status_None && AT.result_length > 0)
+	{
+		// 发送日志
+		Log_Printf_Debug("未处理数据:\r\n");
+		Log_SendArray_Debug(AT.result, AT.result_length);
+		AT_Clear();
+	}
+}
+
+// 定时器
+uint32_t timer_ms = 0;
+extern uint32_t Client5_timer_ms;
+extern uint32_t Business_timer_ms;
+extern struct EC800M ec800m;
+void my_timer()
+{
+	Client5_timer_ms++;
+	Business_timer_ms++;
+	ec800m.timer_ms++;
+	timer_ms++;
+}
+
+uint32_t get_time(void)
+{
+	return timer_ms;
+}
+
+uint32_t get_time_diff(uint32_t time)
+{
+	if(timer_ms >= time)
+	{
+		return timer_ms - time;
+	}
+	else
+	{
+		return 0xFFFFFFFF - time + timer_ms;
+	}
+}
+
+

+ 60 - 0
Drivers/AT.h

@@ -0,0 +1,60 @@
+#ifndef __AT_H
+#define __AT_H
+#include <stdint.h>
+
+
+#define WAKE_GPIO GPIOE
+#define WAKE_GPIO_Pin GPIO_Pin_5 // 睡眠的引脚
+
+
+
+// AT指令状态
+enum AT_Status
+{
+	AT_Status_None, // 空闲
+	AT_Status_Using, // 使用
+};
+
+struct AT_Struct
+{
+	enum AT_Status status;
+	uint8_t result[512];
+	uint16_t result_length;
+};
+
+// 获取AT指令返回的长度
+uint16_t AT_result_length(void);
+// 获取AT指令返回的内容
+uint8_t * AT_result(void);
+
+
+// 发送AT指令,二进制
+void AT_Send_Bytes(uint8_t * CMD, uint16_t length);
+// 发送AT指令,字符串
+void AT_Send_String(char * CMD);
+// 清空AT指令
+void AT_Clear(void);
+// 清空AT指令返回的结果
+void AT_Clear_Result(void);
+// 设置AT指令的状态
+void AT_Set_Status(enum AT_Status status);
+
+// AT监听
+void AT_Handle(void);
+
+
+// 日志
+void Log_SendArray(uint8_t * arr, uint16_t len);
+void Log_SendArray_Debug(uint8_t * arr, uint16_t len);
+void Log_Printf(char *format, ...);
+void Log_Printf_Debug(char *format, ...);
+
+
+// 定时器
+void my_timer(void);
+uint32_t get_time(void);
+uint32_t get_time_diff(uint32_t time);
+
+
+
+#endif

+ 129 - 0
Drivers/Business/PumpBusiness.c

@@ -0,0 +1,129 @@
+#include "stm32f10x.h"
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "Usart1.h"
+
+#include "AT.h"
+#include "EC800M_UDP_Client5.h"
+#include "INflash.h"
+// 计时相关的变量
+uint8_t Business_time_flag = 0;
+uint32_t Business_timer_ms = 0;
+uint32_t Business_wait_time = 1200; // 秒
+uint8_t network_switch = 0;//0代表开,1代表关
+static uint8_t send_data_switch = 1; // 发送数据的开关,0表示发送数据
+static struct Pump_Params pump_params; // 泵参数
+
+static uint16_t Data_Number = 1; // 数据编号
+extern Coefficient_Data flashdata;
+
+// 泵参数初始化
+void Pump_Params_Init(void)
+{
+	pump_params.userId = 0;
+	pump_params.pumpType = 0;
+	pump_params.infusionId = 0;
+	
+	//报警初始化
+	pump_params.alarm_BubbleOrAneroid = 0;
+	pump_params.alarm_Blocked = 0;
+	pump_params.alarm_Total = 0;
+	pump_params.alarm_Ultimate = 0;
+	pump_params.alarm_LowPower = 0;
+	pump_params.alarm_Finished = 0;
+	pump_params.alarm_MotorOutofcontrol = 0;
+	pump_params.alarm_MechanicalBreakdown = 0;
+	pump_params.alarm_UnfilledPillBox = 0;
+	
+	//预报初始化
+	pump_params.forcast_WillFinished = 0;
+	pump_params.forcast_InsufficientAnalgesia = 0;
+	pump_params.forcast_LowPowerForecast = 0;
+}
+
+
+// 刷新泵数据
+void Pump_Params_Refresh(void)
+{
+	pump_params.userId = 1000;
+	pump_params.pumpType = 1;
+	pump_params.infusionId = 234;
+	
+	pump_params.dataNumber = Data_Number;
+}
+
+
+
+
+// 业务处理
+void PumpBusines_Handle(void)
+{
+	
+	// 定时发送数据
+	if(Business_time_flag == 0)
+	{
+		Business_timer_ms = 0; // 初始化计时变量
+		Business_time_flag = 1;
+	}
+	else if(Business_timer_ms > 1000 * Business_wait_time) // // 定时时间,20分钟
+	{
+		// 20分钟计时完成,处理业务
+		send_data_switch = 1; // 发送数据标志
+	}
+	
+	
+	
+	
+	
+	// 发送数据的逻辑
+	if(send_data_switch == 1)
+	{
+//		Pump_Data_Refresh(); // 刷新数据
+		if(UDP_Client5_Status() == Client_Status_None)
+		{
+			Business_time_flag = 0; // 继续定时
+			// 初始化参数
+			Pump_Params_Init();
+			// 更新参数
+			Pump_Params_Refresh();
+			// 发送参数
+			UDP_Client5_Send(pump_params);
+		}
+		else if(UDP_Client5_Status() == Client_Status_Success) // 成功
+		{
+			Log_Printf("发送成功:%s\r\n", UDP_Client5.info);
+			UDP_Client5_Clear(); // 清除
+			
+			send_data_switch = 0; // 关闭发送
+			Data_Number++; // 数据编号加1
+		}
+		else if(UDP_Client5_Status() == Client_Status_Failure) // 失败
+		{
+			Log_Printf("发送失败:%s\r\n", UDP_Client5.info);
+			UDP_Client5_Clear(); // 清除
+			
+			send_data_switch = 0; // 关闭发送
+			Data_Number++; // 数据编号加1
+		}
+	}
+}
+
+
+
+// 循环执行
+void pump_business_loop_execution()
+{
+	if(flashdata.read_flag==0)return;//注册失败或flash存储失败
+	if(network_switch==1)return;//关闭网络状态
+	// 业务处理
+	PumpBusines_Handle();
+	// 客户端
+	UDP_Client5_Handle();
+	// 处理AT指令
+	AT_Handle();
+	
+}
+

+ 9 - 0
Drivers/Business/PumpBusiness.h

@@ -0,0 +1,9 @@
+#ifndef __PUMPBUSINESS_H
+#define __PUMPBUSINESS_H
+
+#include <stdint.h>
+
+// Ñ­»·Ö´ÐÐ
+void pump_business_loop_execution(void);
+
+#endif

+ 312 - 0
Drivers/Business/pump_dicts.c

@@ -0,0 +1,312 @@
+/*--------------------------------------------------------------------------------------
+*  @file     pump_dicts.c
+*  @author   ZhaoDecheng
+*  @version  base on stm32f0x   
+*  @date     2024.01.03
+*  @brief    协议封装
+---------------------------------------------------------------------------------------*/
+
+#include "stm32f10x.h"
+#include <stdio.h>
+
+#include "AT.h"
+
+#include "pump_dicts.h"
+
+uint16_t  LastIDNumber = 0; //上一个编号
+
+void computeOptionDelta(uint32_t OptionNumber,uint8_t *OptionDelta,uint16_t *ExOptionDelta)
+{
+	if(OptionNumber <= 12)
+	{
+		*OptionDelta = OptionNumber;
+		*ExOptionDelta = 0;
+		//Log_Printf("发送成功:%d\r\n", *OptionDelta);
+	}
+	else if(OptionNumber >= 13 && OptionNumber <= 268)
+	{
+		*OptionDelta = 13;
+		*ExOptionDelta = OptionNumber - 13;
+	}
+	else if(OptionNumber >= 269 && OptionNumber <= 655349)
+	{
+		*OptionDelta = 14;
+		*ExOptionDelta = OptionNumber - 255;
+	}
+}
+
+void computeOptionLength(uint32_t Length,uint8_t *OptionLength,uint16_t *ExOptionLength)
+{
+	if(Length <= 12)
+	{
+		*OptionLength = Length;
+		*ExOptionLength = 0;
+		//Log_Printf("发送成功:%d\r\n", *OptionLength);
+	}
+	else if(Length >= 13  && Length <= 268)
+	{
+		*OptionLength = 13;
+		*ExOptionLength = Length - 13;
+	}
+	else if(Length >= 269 && Length <= 655349)
+	{
+		*OptionLength = 14;
+		*ExOptionLength = Length - 255;
+	}
+}
+
+void setPumpOption(uint16_t IDNumber,uint16_t Length,uint8_t * pump_data, uint16_t * pump_data_length)
+{
+	uint16_t OptionNumber = 0;
+	uint16_t ExOptionDelta = 0;
+	uint16_t ExOptionLength = 0;
+	uint8_t OptionDelta = 0;
+	uint8_t OptionLength = 0;
+	
+	uint16_t length = * pump_data_length;
+	
+	OptionNumber = IDNumber - LastIDNumber; //计算联合偏移量
+	LastIDNumber = IDNumber;
+	computeOptionDelta(OptionNumber,&OptionDelta,&ExOptionDelta); //计算OptionDelta和ExOptionDelta
+	computeOptionLength(Length,&OptionLength,&ExOptionLength); //计算OptionLength和ExOptionLength
+	pump_data[length++] = OptionDelta << 4 | (OptionLength & 0x0f);
+	
+	//设置ExOptionDelta
+	if(OptionDelta >= 13)
+	{
+		pump_data[length++] = (uint8_t)(ExOptionDelta & 0x00ff);
+	}
+	if(OptionDelta == 14)
+	{
+		pump_data[length++] = (uint8_t)(ExOptionDelta & 0xff00) >> 8;
+	}
+	
+	//设置ExOptionLength
+	if(OptionLength >= 13)
+	{
+		pump_data[length++] = (uint8_t)(ExOptionLength & 0x00ff);
+	}
+	if(OptionLength == 14)
+	{
+		pump_data[length++] = (uint8_t)(ExOptionLength & 0xff00) >> 8;
+	}
+	
+	*pump_data_length = length;
+	
+}
+
+/** 
+* 协议编码
+* 输入<<
+* pump_params 泵参数。
+* 输出>>
+* pump_data 编码后的二进制数据。
+* pump_data_length 编码后的二进制数据的长度。
+**/
+
+void business_protocol_encode(struct Pump_Params pump_params, uint8_t * pump_data, uint16_t * pump_data_length)
+{
+	uint16_t length = 0;
+	LastIDNumber = 0;
+	pump_data[length++] = 0x54; //大写字母“T”。“驼”字的首字母。
+  pump_data[length++] = 0x52; //大写字母“R”。“人”字的首字母。
+  pump_data[length++] = 0x01; //协议版本。
+  pump_data[length++] = 0x01; //数据类型。
+	
+  //泵类型
+  setPumpOption(101,1,pump_data,&length);
+  pump_data[length++] = pump_params.pumpType;
+
+  //输注编号
+  setPumpOption(103,4,pump_data,&length);
+  pump_data[length++] = (uint8_t)( ( pump_params.infusionId & 0xff000000 ) >> 24 );
+  pump_data[length++] = (uint8_t)( ( pump_params.infusionId & 0x00ff0000 ) >> 16 );
+  pump_data[length++] = (uint8_t)( ( pump_params.infusionId & 0x0000ff00 ) >> 8 );
+  pump_data[length++] = (uint8_t)( pump_params.infusionId & 0x000000ff );
+	
+  //数据编号
+  setPumpOption(104,4,pump_data,&length);
+  pump_data[length++] = (uint8_t)( ( pump_params.dataNumber & 0xff000000 ) >> 24 );
+  pump_data[length++] = (uint8_t)( ( pump_params.dataNumber & 0x00ff0000 ) >> 16 );
+  pump_data[length++] = (uint8_t)( ( pump_params.dataNumber & 0x0000ff00) >> 8 );
+  pump_data[length++] = (uint8_t)( pump_params.dataNumber & 0x000000ff );
+	
+  //住院号
+  setPumpOption(105,4,pump_data,&length);
+  pump_data[length++] = (uint8_t)( ( pump_params.patientCode & 0xff000000 ) >> 24 );
+  pump_data[length++] = (uint8_t)( ( pump_params.patientCode & 0x00ff0000 ) >> 16 );
+  pump_data[length++] = (uint8_t)( ( pump_params.patientCode & 0x0000ff00 ) >> 8 );
+  pump_data[length++] = (uint8_t)( ( pump_params.patientCode & 0x000000ff ) ); 
+  
+  //持续量
+  setPumpOption(106,2,pump_data,&length);
+  pump_data[length++] = (uint8_t)( ( pump_params.continueDose & 0xff00 ) >> 8 );
+  pump_data[length++] = (uint8_t)( ( pump_params.continueDose & 0x00ff ) ); 
+	
+  //锁定时间
+  setPumpOption(107,1,pump_data,&length);
+  pump_data[length++] = pump_params.lockTime; 
+	 
+  //极限量
+	setPumpOption(108,1,pump_data,&length);
+	pump_data[length++] = pump_params.ultimateDose; 
+	
+	//首次量 
+	setPumpOption(109,1,pump_data,&length);
+	pump_data[length++] = pump_params.firstDose; 
+	
+	//追加量	
+	setPumpOption(110,1,pump_data,&length);
+	pump_data[length++] = pump_params.appendDose; 
+	
+	//总量
+	setPumpOption(111,2,pump_data,&length);
+	pump_data[length++] = (uint8_t)( ( pump_params.totalDose & 0xff00 ) >> 8 );
+	pump_data[length++] = (uint8_t)( pump_params.totalDose & 0x00ff );
+    
+	//已输注量
+	setPumpOption(112,2,pump_data,&length);
+	pump_data[length++] = (uint8_t)( ( pump_params.finishDose & 0xff00 ) >> 8 );
+	pump_data[length++] = (uint8_t)( pump_params.finishDose & 0x00ff );
+	
+	
+	//有效追加次数
+	setPumpOption(113,1,pump_data,&length);
+	pump_data[length++] = pump_params.validTimes;
+	
+	//无效追加次数
+	setPumpOption(114,1,pump_data,&length);
+	pump_data[length++] = pump_params.invalidTimes;
+	
+	//报警
+	if(pump_params.alarm_BubbleOrAneroid == 1)
+	{
+		setPumpOption(115,1,pump_data,&length);
+		pump_data[length++] = 1; //气泡或无液报警
+	}
+	
+	if(pump_params.alarm_Blocked == 1)
+	{
+		setPumpOption(115,1,pump_data,&length);
+		pump_data[length++] = 2; //堵塞报警
+	}
+	
+	if(pump_params.alarm_Total == 1)
+	{
+		setPumpOption(115,1,pump_data,&length);
+		pump_data[length++] = 3; //输入总量报警 
+	}
+	
+	if(pump_params.alarm_Ultimate == 1)
+	{
+		setPumpOption(115,1,pump_data,&length);
+		pump_data[length++] = 4; //极限量报警 
+	}
+	
+	if(pump_params.alarm_LowPower == 1)
+	{
+		setPumpOption(115,1,pump_data,&length);
+		pump_data[length++] = 5; //电量耗尽报警
+	}
+	
+	if(pump_params.alarm_Finished == 1)
+	{
+		setPumpOption(115,1,pump_data,&length);
+		pump_data[length++] = 6; //输液结束报警
+	}
+	
+	if(pump_params.alarm_MotorOutofcontrol ==1)
+	{
+		setPumpOption(115,1,pump_data,&length);
+		pump_data[length++] = 7; //电机失控报警
+	}
+	
+	if(pump_params.alarm_MechanicalBreakdown ==1)
+	{
+		setPumpOption(115,1,pump_data,&length);
+		pump_data[length++] = 8; //机械故障报警
+	}
+	
+	if(pump_params.alarm_UnfilledPillBox ==1)
+	{
+		setPumpOption(115,1,pump_data,&length);
+		pump_data[length++] = 9; //未装药盒报警
+	}
+	
+	//预报
+	if(pump_params.forcast_WillFinished ==1)
+	{
+		setPumpOption(116,1,pump_data,&length);
+		pump_data[length++] = 1; //输液将结束
+	}
+	
+	if(pump_params.forcast_InsufficientAnalgesia ==1)
+	{
+		setPumpOption(116,1,pump_data,&length);
+		pump_data[length++] = 2; //镇痛不足
+	}
+	
+	if(pump_params.forcast_LowPowerForecast ==1)
+	{
+		setPumpOption(116,1,pump_data,&length);
+		pump_data[length++] = 3; //电量偏低
+	}
+	//运行状态
+	setPumpOption(117,1,pump_data,&length);
+	
+	if( pump_params.runStatus == 0 )pump_data[length++] = 0; //关机
+	
+	if( pump_params.runStatus == 1 )pump_data[length++] = 1; //开机
+	
+	if( pump_params.runStatus == 2 )pump_data[length++] = 2; //运行
+	
+	if( pump_params.runStatus == 3 )pump_data[length++] = 3; //暂停
+
+	if( pump_params.runStatus == 4 )pump_data[length++] = 4; //待机
+	
+	//电量
+	setPumpOption(118,1,pump_data,&length);
+	pump_data[length++] = pump_params.electricity;
+	
+	// 基站位置区号
+	setPumpOption(119,2,pump_data,&length);
+	pump_data[length++] = (uint8_t)( ( pump_params.lac & 0xff00 ) >> 8 );
+	pump_data[length++] = (uint8_t)( pump_params.lac & 0x00ff );
+		
+	// 基站小区ID
+  setPumpOption(120,4,pump_data,&length);
+  pump_data[length++] = (uint8_t)( ( pump_params.ci & 0xff000000 ) >> 24 );
+  pump_data[length++] = (uint8_t)( ( pump_params.ci & 0x00ff0000 ) >> 16 );
+  pump_data[length++] = (uint8_t)( ( pump_params.ci & 0x0000ff00 ) >> 8 );
+  pump_data[length++] = (uint8_t)( ( pump_params.ci & 0x000000ff ) ); 
+  
+  //脉冲量锁时
+	setPumpOption(121,1,pump_data,&length);
+	pump_data[length++] = pump_params.pulseLockTime; 
+	
+	//脉冲首次锁时
+	setPumpOption(122,1,pump_data,&length);
+	pump_data[length++] = pump_params.firstLockTime; 
+	
+	//脉冲量
+	setPumpOption(123,1,pump_data,&length);
+	pump_data[length++] = pump_params.pulseDose; 
+	
+	*pump_data_length = length;
+	Log_Printf("发送成功:%s\r\n", length);
+}
+
+/** 
+* 协议解码
+* 输出<<
+* pump_data 编码后的二进制数据。
+* pump_data_length 编码后的二进制数据的长度。
+* 输出>>
+* pump_params 泵参数。
+**/
+struct Pump_Params business_protocol_decode(uint8_t * pump_data, uint16_t * pump_data_length)
+{
+	struct Pump_Params pump_params;
+	return pump_params;
+}
+

+ 72 - 0
Drivers/Business/pump_dicts.h

@@ -0,0 +1,72 @@
+/*--------------------------------------------------------------------------------------
+*  @file     pump_dicts.h
+*  @author   ZhaoDecheng
+*  @version  base on stm32f0x   
+*  @date     2024.01.03
+*  @brief    协议封装
+---------------------------------------------------------------------------------------*/
+
+#ifndef __PUMP_DICTS_H
+#define __PUMP_DICTS_H
+#include <stdint.h>
+
+struct Pump_Params{
+	uint16_t userId; // 编号1,用户编号;医院编号。
+	uint8_t pumpType; // 编号101,泵类型。
+	uint32_t infusionId; // 编号103,输注编号。
+	uint32_t dataNumber; //编号104,数据编号。
+	uint32_t patientCode; //编号105,住院号。
+	uint16_t continueDose; //编号106,持续量。
+	uint8_t lockTime; //编号107,锁定时间。
+	uint8_t ultimateDose; //编号108,极限量。
+	uint8_t firstDose; //编号109,首次量。
+	uint8_t appendDose; //编号110,追加量。
+	uint16_t totalDose; //编号111,总量。
+	uint16_t finishDose; //编号112,已输注量。
+	uint8_t validTimes; //编号113,有效追加次数。
+	uint8_t invalidTimes; //编号114,无效追加次数。
+	uint8_t alarm_BubbleOrAneroid; //编号115,1气泡或无液报警。
+	uint8_t alarm_Blocked; //编号115,2堵塞报警。
+	uint8_t alarm_Total; //编号115,3输入总量报警。
+	uint8_t alarm_Ultimate; //编号115,4极限量报警。
+	uint8_t alarm_LowPower; //编号115,5电量耗尽报警。
+	uint8_t alarm_Finished; //编号115,6输液结束报警。
+	uint8_t alarm_MotorOutofcontrol; //7编号115,电机失控报警。
+	uint8_t alarm_MechanicalBreakdown; //8编号115,机械故障报警。
+	uint8_t alarm_UnfilledPillBox; //9编号115,未装药盒报警。
+	uint8_t forcast_WillFinished; //1编号116,输液将结束预报。
+	uint8_t forcast_InsufficientAnalgesia; //2编号116,镇痛不足预报。
+	uint8_t forcast_LowPowerForecast; //3编号116,电量偏低预报。
+	uint8_t runStatus; //编号117,运行状态。0关机;1开机;2运行;3暂停;4待机。
+	uint8_t electricity; //编号118,电量。
+	uint16_t lac; // 编号119,基站ID。
+	uint32_t ci; // 编号120,基站小区ID。
+	uint8_t pulseLockTime; //编号121,脉冲量锁时。
+	uint8_t firstLockTime; //编号122,脉冲首次锁时。
+	uint8_t pulseDose; //编号123,脉冲量。
+};
+
+void setPumpheader(void);
+
+/** 
+* 协议编码
+* 输入<<
+* pump_params 泵参数。
+* 输出>>
+* pump_data 编码后的二进制数据。
+* pump_data_length 编码后的二进制数据的长度。
+**/
+void business_protocol_encode(struct Pump_Params pump_params, uint8_t * pump_data, uint16_t * pump_data_length);
+
+/** 
+* 协议解码
+* 输出<<
+* pump_data 编码后的二进制数据。
+* pump_data_length 编码后的二进制数据的长度。
+* 输出>>
+* pump_params 泵参数。
+**/
+struct Pump_Params business_protocol_decode(uint8_t * pump_data, uint16_t * pump_data_length);
+
+
+#endif

+ 406 - 0
Drivers/CoAP.c

@@ -0,0 +1,406 @@
+#include "stm32f10x.h"
+
+#include <string.h>
+
+uint16_t CoAP_Length;
+uint16_t Current_Option_Number;
+uint8_t CoAP_Message[512];
+
+void Insert(uint8_t * dest, uint16_t dest_start, uint8_t * source, uint16_t source_start, uint16_t len)
+{
+	uint16_t i = 0;
+	while(i < len)
+	{
+		dest[dest_start + i] = source[source_start + i];
+		i++;
+	}
+}
+void insert(uint16_t start, uint8_t * source, uint16_t len)
+{
+	Insert(CoAP_Message, start, source, 0, len);
+}
+uint8_t * CoAP_Get_Message()
+{
+	return CoAP_Message;
+}
+uint16_t CoAP_Get_Length()
+{
+	return CoAP_Length;
+}
+void CoAP_Init()
+{
+	CoAP_Length = 4;
+	Current_Option_Number = 0;
+	memset(CoAP_Message, '\0', sizeof(CoAP_Message));
+	CoAP_Message[0] |= 0x01 << 6; // 协议版本,固定为1
+}
+// 报文类型,00CON,01NON,10ACK,11Rest
+void CoAP_Set_T(uint8_t t)
+{
+	CoAP_Message[0] |= t << 4;
+}
+// 请求类型
+void CoAP_Set_Code(uint8_t code)
+{
+	CoAP_Message[1] = code;
+}
+// messageID
+void CoAP_Set_MessageID(uint16_t messageID)
+{
+	uint8_t message_id[2];
+	message_id[0] = (messageID >> 8) & 0xFF;
+	message_id[1] = messageID & 0xFF;
+	insert(2, message_id, sizeof(message_id));
+}
+// token  len不能大于8
+void CoAP_Set_Token(uint8_t * token, uint8_t len)
+{
+	if(len > 8)
+	{
+		len = 8;
+	}
+	CoAP_Message[0] |= len & 0xFF;
+	insert(CoAP_Length, token, len);
+	CoAP_Length += len;
+}
+// 设置option
+void CoAP_Set_Option(uint16_t number, uint16_t length, uint8_t * value)
+{
+	uint16_t pos_start = CoAP_Length, opt_length = 1;
+	int32_t delta = number - Current_Option_Number;
+	
+	if (delta < 0){
+		return;
+	} else if (delta < 13){
+		CoAP_Message[pos_start] |= (delta & 0xFF) << 4;
+	}else if (delta < 255+13){
+		CoAP_Message[pos_start] |= (0x0D & 0xFF) << 4;
+		uint8_t ext = delta - 0x0D;
+		CoAP_Message[pos_start + opt_length++] = ext;
+	}else if (delta < 65535){
+		CoAP_Message[pos_start] |= (0x0E & 0xFF) << 4;
+		uint16_t ext = (delta - 0x0E - 0xFF);
+		CoAP_Message[pos_start + opt_length++] = (ext >> 8) & 0xFF;
+		CoAP_Message[pos_start + opt_length++] = ext & 0xFF;
+	}
+	// length
+	if (length < 1){
+		return;
+	}else if (length < 13){
+		CoAP_Message[pos_start] |= (length & 0xFF);
+	}else if (length < 255+13){
+		CoAP_Message[pos_start] |= (0x0D & 0xFF);
+		uint8_t ext = length - 0x0D;
+		CoAP_Message[pos_start + opt_length++] = ext;
+	}else if (length < 65535){
+		CoAP_Message[pos_start] |= (0x0E & 0xFF);
+		uint16_t ext = (length - 0x0E - 0xFF);
+		CoAP_Message[pos_start + opt_length++] = (ext >> 8) & 0xFF;
+		CoAP_Message[pos_start + opt_length++] = ext & 0xFF;
+	}
+	
+	insert(pos_start + opt_length, value, length);
+	opt_length += length;
+	CoAP_Length += opt_length;
+	Current_Option_Number = number;
+}
+// 设置字符串类型的option
+void CoAP_Set_Option_Str(uint16_t number, char * message)
+{
+	uint16_t len = strlen(message);
+	uint8_t value[len];
+	for(uint16_t i = 0; i < len; i++)
+	{
+		value[i] = message[i];
+	}
+	CoAP_Set_Option(number, len, value);
+}
+
+// 设置short类型的option
+void CoAP_Set_Option_Short(uint16_t number, uint16_t num)
+{
+	if(num < 256)
+	{
+		uint8_t value[1];
+		value[0] = num;
+		CoAP_Set_Option(number, sizeof(value), value);
+	}
+	else
+	{
+		uint8_t value[2];
+		value[0] = (num >> 8) & 0xFF;
+		value[1] = num & 0xFF;
+		CoAP_Set_Option(number, sizeof(value), value);
+	}
+}
+
+// 设置payload
+void CoAP_Set_Payload(uint8_t * payload, uint16_t length)
+{
+	uint16_t pos = CoAP_Length;
+	CoAP_Message[pos] = 0xFF;
+	insert(pos + 1, payload, length);
+	CoAP_Length += length + 1;
+}
+
+void CoAP_Set_Payload_Str(char * payload)
+{
+	uint16_t len = strlen(payload);
+	uint8_t value[len];
+	for(uint16_t i = 0; i < len; i++)
+	{
+		value[i] = payload[i];
+	}
+	CoAP_Set_Payload(value, len);
+}
+
+
+
+
+
+
+
+
+// 报文解析
+// 获取版本号
+uint8_t CoAP_Get_Ver(uint8_t * coap_message)
+{
+	uint8_t ver = (coap_message[0] & 0xC0) >> 6;
+	return ver;
+}
+// 获取报文类型
+uint8_t CoAP_Get_T(uint8_t * coap_message)
+{
+	uint8_t t = (coap_message[0] & 0x30) >> 4;
+	return t;
+}
+// 获取tkl
+uint8_t CoAP_Get_Tkl(uint8_t * coap_message)
+{
+	uint8_t tkl = coap_message[0] & 0x0F;
+	return tkl;
+}
+// 获取请求方式
+uint8_t CoAP_Get_Code(uint8_t * coap_message)
+{
+	uint8_t code = coap_message[1];
+	return code;
+}
+// 获取messageID
+uint16_t CoAP_Get_MessageID(uint8_t * coap_message)
+{
+	uint16_t messageID = 0;
+	messageID = (messageID | coap_message[2]) << 8;
+	messageID = messageID | coap_message[3];
+	return messageID;
+}
+// 获取token
+uint8_t * CoAP_Get_Token(uint8_t * coap_message, uint8_t * token)
+{
+	uint8_t tkl = CoAP_Get_Tkl(coap_message);
+	for(uint8_t i = 0; i < tkl; i++)
+	{
+		token[i] = coap_message[4 + i];
+	}
+	return token;
+}
+
+
+struct Option_Struct
+{
+	uint8_t valid; // 是否合法
+	uint16_t number; // 编号
+	uint16_t length; // 长度
+	uint16_t pos; // 位置
+	uint8_t delta_ext; // 编号扩展,字节
+	uint8_t length_ext; // 长度扩展,字节
+};
+
+struct Option_Struct Get_Option(uint8_t * coap_message, uint16_t pos, uint16_t number)
+{
+	struct Option_Struct option_struct = {
+		.valid = 1,
+		.number = number,
+		.length = coap_message[pos] & 0x0F,
+		.pos = pos,
+		.delta_ext = 0,
+		.length_ext = 0,
+	};
+	uint8_t delta = (coap_message[pos] & 0xF0) >> 4;
+	if(delta < 0x0D)
+	{
+		option_struct.delta_ext = 0;
+		option_struct.number += delta;
+	}
+	else if(delta == 0x0D)
+	{
+		option_struct.delta_ext = 1;
+		uint8_t num = coap_message[pos + 1];
+		option_struct.number += (0x0D + num);
+	}
+	else if(delta == 0x0E)
+	{
+		option_struct.delta_ext = 2;
+		uint16_t num = 0;
+		num = (num | coap_message[pos + 1]) << 8;
+		num = num | coap_message[pos + 2];
+		option_struct.number += (0x0E + 0xFF + num);
+	}
+	else
+	{
+		option_struct.valid = 0;
+		return option_struct;
+	}
+	
+	if(option_struct.length < 0x0D)
+	{
+		option_struct.length_ext = 0;
+	}
+	else if(option_struct.length == 0x0D)
+	{
+		option_struct.length_ext = 1;
+		uint8_t num = coap_message[pos + option_struct.delta_ext + 1];
+		option_struct.length = (0x0D + num);
+	}
+	else if(option_struct.length == 0x0E)
+	{
+		option_struct.length_ext = 2;
+		uint16_t num = 0;
+		num = (num | coap_message[pos + option_struct.delta_ext + 1]) << 8;
+		num = num | coap_message[pos + option_struct.delta_ext + 2];
+		option_struct.length = (0x0E + 0xFF + num);
+	}
+	else
+	{
+		option_struct.valid = 0;
+		return option_struct;
+	}
+	return option_struct;
+}
+
+// 获取option长度
+struct Option_Struct CoAP_Get_Option(uint8_t * coap_message, uint16_t coap_length, uint16_t number)
+{
+	uint8_t tkl = CoAP_Get_Tkl(coap_message);
+	uint16_t pos = 4 + tkl;
+	uint16_t current_number = 0;
+	struct Option_Struct option_struct;
+	
+	while(pos < coap_length)
+	{
+		option_struct = Get_Option(coap_message, pos, current_number);
+		if(option_struct.valid == 0 || option_struct.number == number)
+		{
+			break;
+		}
+		else
+		{
+			current_number = option_struct.number;
+			pos = option_struct.pos + option_struct.delta_ext + option_struct.length_ext + option_struct.length + 1; // 下一个循环的位置起点
+		}
+	}
+	return option_struct;
+}
+
+
+
+// 获取option长度
+uint16_t CoAP_Get_Option_Length(uint8_t * coap_message, uint16_t coap_length, uint16_t number)
+{
+	uint16_t length = 0;
+	struct Option_Struct option_struct = CoAP_Get_Option(coap_message, coap_length, number);
+	if(option_struct.valid)
+	{
+		length = option_struct.length;
+	}
+	return length;
+}
+// 获取option value
+uint8_t * CoAP_Get_Option_Value(uint8_t * coap_message, uint16_t coap_length, uint16_t number, uint8_t * value)
+{
+	struct Option_Struct option_struct = CoAP_Get_Option(coap_message, coap_length, number);
+	if(option_struct.valid)
+	{
+		for(uint8_t i = 0; i < option_struct.length; i++)
+		{
+			value[i] = coap_message[option_struct.pos + option_struct.delta_ext + option_struct.length_ext + 1 + i];
+		}
+	}
+	else
+	{
+//		value[0] = 0x99;
+	}
+	return value;
+}
+
+struct Payload_Struct
+{
+	uint8_t valid;
+	uint16_t pos;
+	uint16_t length;
+};
+// 获取payload
+struct Payload_Struct Get_Payload(uint8_t * coap_message, uint16_t coap_length)
+{
+	uint8_t tkl = CoAP_Get_Tkl(coap_message);
+	uint16_t pos = 4 + tkl;
+	uint16_t current_number = 0;
+	struct Option_Struct option_struct;
+	struct Payload_Struct payload_struct = {
+		.valid = 1,
+		.pos = 0,
+		.length = 0
+	};
+	
+	while(pos < coap_length)
+	{
+		if(coap_message[pos] == 0xFF)
+		{
+			payload_struct.valid = 1;
+			payload_struct.pos = pos + 1;
+			payload_struct.length = coap_length - pos - 1;
+			break;
+		}
+		option_struct = Get_Option(coap_message, pos, current_number);
+		if(option_struct.valid == 0)
+		{
+			payload_struct.valid = 0;
+			payload_struct.length = 0;
+			payload_struct.pos = 0;
+			break;
+		}
+		else
+		{
+			current_number = option_struct.number;
+			pos = option_struct.pos + option_struct.delta_ext + option_struct.length_ext + option_struct.length + 1; // 下一个循环的位置起点
+		}
+	}
+	return payload_struct;
+}
+
+
+// 获取payload长度
+uint16_t CoAP_Get_Payload_Length(uint8_t * coap_message, uint16_t coap_length)
+{
+	struct Payload_Struct payload_struct = Get_Payload(coap_message, coap_length);
+	return payload_struct.length;
+}
+
+// 获取payload值
+uint8_t * CoAP_Get_Payload(uint8_t * coap_message, uint16_t coap_length, uint8_t * payload)
+{
+	struct Payload_Struct payload_struct = Get_Payload(coap_message, coap_length);
+	if(payload_struct.valid)
+	{
+		for(uint8_t i = 0; i < payload_struct.length; i++)
+		{
+			payload[i] = coap_message[payload_struct.pos + i];
+		}
+	}
+	else
+	{
+		
+	}
+	return payload;
+}
+

+ 56 - 0
Drivers/CoAP.h

@@ -0,0 +1,56 @@
+#ifndef __COAP_H
+#define __COAP_H
+#include <stdint.h>
+
+uint8_t * CoAP_Get_Message(void);
+uint16_t CoAP_Get_Length(void);
+
+void CoAP_Init(void);
+
+// 报文类型,00CON,01NON,10ACK,11Rest
+void CoAP_Set_T(uint8_t t);
+// 请求类型
+void CoAP_Set_Code(uint8_t code);
+// messageID
+void CoAP_Set_MessageID(uint16_t messageID);
+// token  len不能大于8
+void CoAP_Set_Token(char * token, uint8_t len);
+// 设置option
+void CoAP_Set_Option(uint16_t number, uint16_t length, uint8_t * value);
+// 设置字符串类型的option
+void CoAP_Set_Option_Str(uint16_t number, char * message);
+// 设置short类型的option
+void CoAP_Set_Option_Short(uint16_t number, uint16_t num);
+// 设置payload
+void CoAP_Set_Payload(uint8_t * payload, uint16_t length);
+void CoAP_Set_Payload_Str(char * payload);
+
+
+// 报文解析
+// 获取版本号
+uint8_t CoAP_Get_Ver(uint8_t * coap_message);
+// 获取报文类型
+uint8_t CoAP_Get_T(uint8_t * coap_message);
+// 获取tkl
+uint8_t CoAP_Get_Tkl(uint8_t * coap_message);
+// 获取请求方式
+uint8_t CoAP_Get_Code(uint8_t * coap_message);
+// 获取messageID
+uint16_t CoAP_Get_MessageID(uint8_t * coap_message);
+// 获取token
+uint8_t * CoAP_Get_Token(uint8_t * coap_message, uint8_t * token);
+// 获取option长度
+uint16_t CoAP_Get_Option_Length(uint8_t * coap_message, uint16_t coap_length, uint16_t number);
+// 获取option value
+uint8_t * CoAP_Get_Option_Value(uint8_t * coap_message, uint16_t coap_length, uint16_t number, uint8_t * value);
+
+
+// 获取payload长度
+uint16_t CoAP_Get_Payload_Length(uint8_t * coap_message, uint16_t coap_length);
+// 获取payload值
+uint8_t * CoAP_Get_Payload(uint8_t * coap_message, uint16_t coap_length, uint8_t * payload);
+
+
+
+
+#endif

+ 618 - 0
Drivers/EC800M_UDP_Client5.c

@@ -0,0 +1,618 @@
+#include "stm32f10x.h"
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "AT.h"
+#include "EC800M_UDP_Client5.h"
+#include "CoAP.h"
+
+#include "mbedtls_util.h"
+
+#include "cJSON.h"
+#include "sys.h"
+#include "ec800m.h"
+#include "pump_dicts.h"
+#include "INflash.h"
+
+
+
+// 流程
+enum Step{
+	STEP_NONE, // 空闲状态,无操作
+	STEP_START, // 开始
+	STEP_EXIT_SLEEP, // 退出睡眠
+	STEP_ENTER_SLEEP, // 进入睡眠
+	STEP_WAIT, // 等待
+	
+	STEP_STATE, // 查询状态
+	STEP_OPEN, // 打开
+	STEP_OPEN_WAIT_RESULT, // 等待打开结果
+	STEP_JUDGE_AUTH_OR_DATA, // 判断认证还是发送
+	STEP_JOIN_AUTH_MESSAGE, // 拼接认证报文
+	STEP_JOIN_DATA_MESSAGE, // 拼接数据报文
+	STEP_QUERY_SLEEP, // 查询休眠
+	STEP_SET_SLEEP, // 开启休眠
+	
+	STEP_SET_QISDE_0, // 关闭发送回显
+	STEP_SEND, // 发送
+	STEP_RECV, // 等待发送结果
+	
+	STEP_SET_CFUN_0, // 设置最小功能模式
+	STEP_WAIT_SET_CFUN_0, // 等待设置最小功能模式
+	STEP_SET_CFUN_1, // 设置全功能模式
+	STEP_WAIT_SET_CFUN_1, // 等待设置全功能模式结果
+	
+	STEP_SET_CGREG_2, // 设置ps域允许上报网络注册和位置信息
+	STEP_QUERY_CGREG, // 查询网络注册状态
+	
+	STEP_CLOSE, // 关闭
+	
+	STEP_SUCCESS, // 成功
+	STEP_FAILURE, // 失败
+	STEP_FINISH, // 流程结束
+};
+// 当前
+static enum Step step = STEP_NONE;
+// 下一步
+static enum Step next_step = STEP_NONE;
+
+// 客户端5
+struct EC800M_Client_Struct UDP_Client5 = {
+	.status = Client_Status_None,
+};
+
+// 注册后的参数
+extern Coefficient_Data flashdata;
+
+// socket ID
+static uint8_t connectID = 5;
+
+
+/** 阿里云连接参数 **/
+static char ProductKey[20] = "a1t3qlUNDcP";
+static char DeviceName[20] = "LTEcat1ceshi001";
+static char DeviceSecret[40] = "4929a78860f663ec72e2c313a4eee7ac";
+
+static char ClientID[60];
+static char Seq[10] = "666";
+
+static uint16_t Port = 5682;
+static char Host[60];
+
+static uint32_t SeqOffset;
+static char Random[20];
+static char Token[50];
+
+// payload缓存
+//static uint8_t payload[256];
+//static uint16_t payload_length;
+// coap报文
+static uint8_t coap_message[512]; 
+static uint16_t coap_message_length = 0;
+// aes cbc
+static uint8_t aes_key[16] = {0};
+static char iv[] = "543yhjy97ae7fyfg";
+
+// 泵参数
+static struct Pump_Params pump_params;
+// 待发送数据的地址和长度
+static uint8_t data[128];
+static uint16_t data_length;
+
+
+
+
+// 计时相关的变量
+uint8_t Client5_time_flag = 0;
+uint32_t Client5_timer_ms = 0;
+uint32_t Client5_wait_time = 10;
+
+
+// 初始化
+void UDP_Client5_Init(void)
+{
+	// 赋值三元组
+	strcpy(ProductKey, flashdata.productKey);
+	strcpy(DeviceName, flashdata.deviceName);
+	strcpy(DeviceSecret, flashdata.deviceSecret);
+	
+	// 设置host
+	memset(Host, '\0', sizeof(Host));
+	strcat(Host, ProductKey);
+	strcat(Host, ".coap.cn-shanghai.link.aliyuncs.com");
+	// 设置clientid
+	memset(ClientID, '\0', sizeof(ClientID));
+	strcat(ClientID, ProductKey);
+	strcat(ClientID, "&");
+	strcat(ClientID, DeviceName);
+}
+// 声明函数。步骤跳转
+void goto_step(enum Step ns);
+// 发送流程
+void UDP_Client5_Handle(void);
+// 发送数据
+void UDP_Client5_Send(struct Pump_Params params)
+{
+	if(step == STEP_NONE)
+	{
+		// 待发送数据的地址和长度
+		pump_params = params;
+		// 初始化
+		UDP_Client5_Init();
+		// 正在发送
+		UDP_Client5.status = Client_Status_Sending;
+		// 流程开始
+		goto_step(STEP_START);
+	}
+}
+// 获取状态
+enum Client_Status UDP_Client5_Status(void)
+{
+	if(UDP_Client5.status == Client_Status_None)
+	{
+		return UDP_Client5.status;
+	}
+	else if(step == STEP_FINISH)
+	{
+		return UDP_Client5.status;
+	}
+	else
+	{
+		return Client_Status_Sending;
+	}
+}
+// 清除
+void UDP_Client5_Clear(void)
+{
+	// 流程置空
+	goto_step(STEP_NONE);
+	// 空闲
+	UDP_Client5.status = Client_Status_None;
+}
+
+// 直接跳转到下一步
+static void goto_step(enum Step ns)
+{
+	// 重置ec800m状态
+	ec800m.reset();
+	step = ns; 
+}
+
+// 先等待再跳转到下一步
+static void goto_step_wait(enum Step ns, uint32_t t)
+{
+	goto_step(STEP_WAIT); // 等待
+	Client5_wait_time = t;
+	next_step = ns; // 等待之后跳转
+}
+
+// 只等待,等待之后返回原来的步骤
+static void goto_wait(uint32_t t)
+{
+	goto_step_wait(step, t);
+}
+
+// 失败
+static void goto_failure(char * info)
+{
+	Log_Printf_Debug("STEP: 数据发送失败,%s\r\n", info);
+	UDP_Client5.status = Client_Status_Failure;
+	strcpy(UDP_Client5.info, info);
+	goto_step(STEP_FAILURE);
+}
+
+// 成功
+static void goto_success(char * info)
+{
+	Log_Printf_Debug("STEP: 数据发送成功,%s\r\n", info);
+	UDP_Client5.status = Client_Status_Success;
+	strcpy(UDP_Client5.info, info);
+	goto_step(STEP_SUCCESS);
+}
+
+// 等待
+static void wait(void)
+{
+	if(Client5_time_flag == 0)
+	{
+		Client5_timer_ms = 0;
+		Client5_time_flag = 1;
+	}
+	else if(Client5_timer_ms > Client5_wait_time)
+	{
+		goto_step(next_step); // 进入下一步
+		Client5_time_flag = 0;
+	}
+}
+
+// 判断认证还是发送
+static uint8_t judge_auth_or_data(void)
+{
+	if(strlen(Token) > 0) // 已认证
+	{
+		return 1;
+	}
+	else
+	{
+		return 0;
+	}
+}
+// 拼接认证报文
+static void join_auth_message(uint8_t * coap_message, uint16_t * coap_message_length)
+{
+	SeqOffset=65535;
+	Log_Printf_Debug("STEP: 拼接认证报文,seqOffset=%d\r\n", SeqOffset);
+	// 先清除
+//	memset(coap_message, 0, sizeof(coap_message));
+//	coap_message_length = 0;
+	
+	// CoAP协议
+	CoAP_Init();
+	CoAP_Set_T(0);
+	CoAP_Set_Code(2);
+	CoAP_Set_MessageID(SeqOffset);
+	// option
+	// host
+	CoAP_Set_Option_Str(3, Host);
+	// port
+	CoAP_Set_Option_Short(7, Port);
+	// path
+	CoAP_Set_Option_Str(11, "auth");
+	// content-format
+	CoAP_Set_Option_Short(12, 50);
+	// accept
+	CoAP_Set_Option_Short(17, 50);
+	
+	// 待签名数据
+	// 签名相关
+	static char StrForSignature[100];
+	static char sign[50];
+	memset(StrForSignature, '\0', sizeof(StrForSignature));
+	sprintf((char * )StrForSignature, "clientId%sdeviceName%sproductKey%sseq%s", ClientID, DeviceName, ProductKey, Seq);
+	// 签名
+	memset(sign, '\0', sizeof(sign));
+	utils_hmac_sha1_str(StrForSignature, strlen((char * )StrForSignature), sign, DeviceSecret, strlen(DeviceSecret));
+
+	// payload
+//	memset(payload, '\0', sizeof(payload));
+	char payload[256] = {0};
+	sprintf((char * )payload, "{\"clientId\":\"%s\",\"signmethod\":\"hmacsha1\",\"sign\":\"%s\",\"productKey\":\"%s\",\"deviceName\":\"%s\",\"seq\":\"%s\"}", ClientID, sign, ProductKey, DeviceName, Seq);
+	// 设置payload
+	CoAP_Set_Payload_Str(payload);
+	
+	// 生成报文
+	* coap_message_length = CoAP_Get_Length();
+	memcpy(coap_message, CoAP_Get_Message(), * coap_message_length);
+}
+
+// 拼接数据报文
+static void join_data_message(uint8_t * data, uint8_t data_length, uint8_t * coap_message, uint16_t * coap_message_length)
+{
+	SeqOffset++;
+	Log_Printf_Debug("STEP: 拼接数据报文,seqOffset=%d\r\n", SeqOffset);
+	
+	// 先清除
+//	memset(coap_message, 0, sizeof(coap_message));
+//	coap_message_length = 0;
+	
+	char out[80]={0};
+	char sha256_source[100] = {0};
+	snprintf(sha256_source, sizeof(sha256_source), "%s,%s" ,DeviceSecret ,Random);
+	Log_Printf_Debug("sha256_source: %s\r\n", sha256_source);
+	utils_sha256(sha256_source, strlen(sha256_source), out);
+	memset(aes_key, 0, sizeof(aes_key));
+	memcpy(aes_key, out+8, 16); //获取key
+	
+	// CoAP协议
+	CoAP_Init();
+	CoAP_Set_T(0);
+	CoAP_Set_Code(2);
+	CoAP_Set_MessageID(SeqOffset);
+	// option
+	// host
+	CoAP_Set_Option_Str(3, Host);
+	// port
+	CoAP_Set_Option_Short(7, Port);
+	// path
+	CoAP_Set_Option_Str(11, "topic");
+	CoAP_Set_Option_Str(11, "sys");
+	CoAP_Set_Option_Str(11, ProductKey);
+	CoAP_Set_Option_Str(11, DeviceName);
+	CoAP_Set_Option_Str(11, "thing");
+	CoAP_Set_Option_Str(11, "model");
+	CoAP_Set_Option_Str(11, "up_raw");
+	// content-format
+	CoAP_Set_Option_Short(12, 50);
+	// accept
+	CoAP_Set_Option_Short(17, 50);
+	// 2088
+	CoAP_Set_Option_Str(2088, Token);
+	// 2089
+	char Rand2089[10] = {'\0'};
+	char Opt2089[20] = {'\0'};
+	my_itoa(SeqOffset, Rand2089, 10);
+	int Opt2089_Length = utils_aes128_cbc_enc((char * )aes_key, iv, Rand2089, Opt2089);
+	CoAP_Set_Option_Str(2089, Opt2089);
+	
+	// payload
+//	memset(payload, '\0', sizeof(payload));
+	uint8_t payload[256] = {0};
+	
+	// 
+	int payload_length = utils_aes128_cbc_enc_with_length((char * )aes_key, iv, data, data_length, payload);
+//		payload_length = utils_aes128_cbc_enc((char * )aes_key, iv, (char * )Data_Buffer, (char * )payload);
+	Log_Printf_Debug("payload_length: %d\r\n", payload_length);
+	
+	CoAP_Set_Payload(payload, payload_length);
+	
+	// 生成报文
+	* coap_message_length = CoAP_Get_Length();
+	memcpy(coap_message, CoAP_Get_Message(), * coap_message_length);
+}
+
+// 等待数据返回
+static uint8_t recv_data_handle(uint8_t * coap_message, uint16_t coap_message_length)
+{
+	uint16_t payload_length = CoAP_Get_Payload_Length(coap_message, coap_message_length);
+	uint8_t payload[256] = {0};
+	CoAP_Get_Payload(coap_message, coap_message_length, payload);
+	
+	Log_Printf_Debug("payload长度: %d\r\n", payload_length);
+	
+	// 判断是认证返回,还是数据发送返回
+	if(payload_length == 0) // 无返回
+	{
+		// 清空Token,重新认证
+		memset(Token, '\0', sizeof(Token));
+		return 0;
+	}
+	else if(payload[0] == '{' && payload[payload_length-1] == '}') // 认证返回
+	{
+		// 解析json
+		cJSON * cjson = cJSON_Parse((char * )payload);
+		Log_Printf_Debug("plaintext(%d): %s\r\n",payload_length, payload);
+		memset(Random, '\0', sizeof(Random));
+		memset(Token, '\0', sizeof(Token));
+		if(cJSON_HasObjectItem(cjson, "random"))
+		{
+			char * random = cJSON_GetObjectItem(cjson, "random")->valuestring;
+			strcpy(Random, random);
+		}
+		if(cJSON_HasObjectItem(cjson, "seqOffset"))
+		{
+			uint16_t seqOffset = cJSON_GetObjectItem(cjson, "seqOffset")->valueint;
+			SeqOffset = seqOffset;
+		}
+		if(cJSON_HasObjectItem(cjson, "token"))
+		{
+			char * token = cJSON_GetObjectItem(cjson, "token")->valuestring;
+			strcpy(Token, token);
+		}
+		Log_Printf_Debug("\r\n(%s, %s, %d)\r\n", Random, Token, SeqOffset);
+		cJSON_Delete(cjson);//清除结构体 
+		return 1;
+	}
+	else
+	{
+		// 数据发送成功返回
+		uint8_t plaintext[256] = {0}; // 明文
+		uint16_t plaintext_length = utils_aes128_cbc_dec((char * )aes_key, iv, (char * )payload, payload_length, (char * )plaintext);
+		Log_Printf_Debug("\r\nplaintext(%d): %s\r\n",plaintext_length, (char *)plaintext);
+		return 2;
+	}
+}
+// 发送数据的逻辑
+static enum Result result = Result_None;
+static uint8_t cgreg_n; 
+static uint8_t cgreg_stat; 
+static uint16_t cgreg_lac; 
+static uint32_t cgreg_ci;
+static uint8_t query_cgreg_times = 0; // 查询网络状态的次数
+static uint8_t auth_times = 0; // 认证次数
+static uint16_t socket_err = 0;
+static uint8_t auth_or_data = 0;
+void UDP_Client5_Handle(void)
+{
+	// 流程
+	switch(step)
+	{
+		case STEP_NONE: // 空闲
+			break;
+		case STEP_START: // 开始
+			query_cgreg_times = 0; // 查询网络状态的次数
+			auth_times = 0; // 认证次数
+			goto_step(STEP_EXIT_SLEEP);
+			break;
+		case STEP_EXIT_SLEEP: // 退出休眠
+			ec800m.exit_sleep();
+			goto_step_wait(STEP_SET_CFUN_1, 3);
+			break;
+		case STEP_SET_CFUN_1: // 设置全功能模式
+			result = ec800m.set_cfun(1);
+			if(result == Result_Success)
+			{
+				goto_step(STEP_SET_CGREG_2);
+			}
+			else if(result == Result_Failed)
+			{
+				goto_failure("设置全功能模式失败");
+			}
+			break;
+		case STEP_SET_CGREG_2: // 设置ps域
+			result = ec800m.set_cgreg(2);
+			if(result == Result_Success)
+			{
+				goto_step(STEP_QUERY_CGREG);
+			}
+			else if(result == Result_Failed)
+			{
+				goto_failure("设置ps域失败");
+			}
+			break;
+		case STEP_QUERY_CGREG: // 查询ps域
+			result = ec800m.query_cgreg(&cgreg_n, &cgreg_stat, &cgreg_lac, &cgreg_ci);
+			if(result == Result_Success)
+			{
+				if(cgreg_stat == 1)
+				{
+					// 参数赋值
+					pump_params.lac = cgreg_lac;
+					pump_params.ci = cgreg_ci;
+					// 编码
+					business_protocol_encode(pump_params, data, &data_length);
+					// 下一步
+					goto_step(STEP_CLOSE);
+				}
+				else if(query_cgreg_times > 10) // 最多查询20次
+				{
+					goto_failure("查询ps域次数过多");
+				}
+				else
+				{
+					goto_wait(400);
+					query_cgreg_times++;
+				}
+			}
+			else if(result == Result_Failed)
+			{
+				goto_failure("查询ps域失败");
+			}
+			break;
+		case STEP_CLOSE: // 关闭连接
+			result = ec800m.close_socket(connectID);
+			if(result == Result_Success)
+			{
+				goto_step(STEP_OPEN);
+			}
+			else if(result == Result_Failed)
+			{
+				goto_failure("关闭连接失败");
+			}
+			break;
+		case STEP_OPEN: // 打开客户端
+			result = ec800m.open_socket(connectID, "UDP", Host, Port, 1, &socket_err);
+			if(result == Result_Success)
+			{
+				if(socket_err == 0)
+				{
+					goto_step(STEP_JUDGE_AUTH_OR_DATA);
+				}
+				else
+				{
+					goto_failure("客户端打开错误");
+				}
+			}
+			else if(result == Result_Failed)
+			{
+				goto_failure("打开客户端失败");
+			}
+			break;
+		case STEP_JUDGE_AUTH_OR_DATA: // 判断认证还是发送
+			auth_or_data = judge_auth_or_data();
+			if(auth_or_data == 1) // 已认证
+			{
+				goto_step(STEP_JOIN_DATA_MESSAGE);
+			}
+			else
+			{
+				goto_step(STEP_JOIN_AUTH_MESSAGE);
+			}
+			break;
+		case STEP_JOIN_AUTH_MESSAGE: // 拼接认证报文
+			if(auth_times > 0) // 最多重新认证一次
+			{
+				goto_failure("认证次数过多");
+			}
+			else 
+			{
+				join_auth_message(coap_message, &coap_message_length);
+				goto_step(STEP_SET_QISDE_0);
+				auth_times++;
+			}
+			break;
+		case STEP_JOIN_DATA_MESSAGE: // 拼接数据报文
+			join_data_message(data, data_length, coap_message, &coap_message_length);
+			goto_step(STEP_SET_QISDE_0);
+			break;
+		case STEP_SET_QISDE_0: // 关闭发送回显
+			result = ec800m.set_qisde(0);
+			if(result == Result_Success)
+			{
+				goto_step(STEP_SEND);
+			}
+			else if(result == Result_Failed)
+			{
+				goto_failure("关闭发送回显失败");
+			}
+			break;
+		case STEP_SEND: // 发送send
+			result = ec800m.send(connectID, coap_message, coap_message_length);
+			if(result == Result_Success)
+			{
+				goto_step(STEP_RECV);
+			}
+			else if(result == Result_Failed)
+			{
+				goto_failure("发送send失败");
+			}
+			break;
+		case STEP_RECV: // 等待结果
+			result = ec800m.recv_with_time(connectID, coap_message, &coap_message_length, 10000);
+			if(result == Result_Success)
+			{
+				uint8_t res = recv_data_handle(coap_message, coap_message_length);
+				if(res == 0) // 发送失败
+				{
+					goto_step(STEP_JUDGE_AUTH_OR_DATA); // 重新认证
+				}
+				else if(res == 1) // 认证成功
+				{
+					goto_step(STEP_JOIN_DATA_MESSAGE);
+				}
+				else if(res == 2) // 发送成功
+				{
+					goto_success("发送成功");
+				}
+			}
+			else if(result == Result_Failed)
+			{
+				goto_failure("等待结果失败");
+			}
+			break;
+		case STEP_WAIT: // 等待
+			wait();
+			break;
+		case STEP_SUCCESS: // 成功
+			goto_step(STEP_SET_SLEEP);
+			break;
+		case STEP_FAILURE: // 失败
+			goto_step(STEP_SET_SLEEP);
+			break;
+		case STEP_SET_SLEEP: // 设置休眠模式
+			result = ec800m.set_sleep(1);
+			if(result != Result_None)
+			{
+				goto_step(STEP_SET_CFUN_0);
+			}
+			break;
+		case STEP_SET_CFUN_0: // 设置最小功能模式
+			result = ec800m.set_cfun(0);
+			if(result != Result_None)
+			{
+				goto_step(STEP_ENTER_SLEEP);
+			}
+			break;
+		case STEP_ENTER_SLEEP: // 进入睡眠
+			ec800m.enter_sleep();
+			goto_step(STEP_FINISH);
+			break;
+		case STEP_FINISH: // 结束流程
+			break;
+		default:
+			break;
+	}
+	
+}
+

+ 31 - 0
Drivers/EC800M_UDP_Client5.h

@@ -0,0 +1,31 @@
+#ifndef __EC800M_UDP_CLIENT5_H
+#define __EC800M_UDP_CLIENT5_H
+#include <stdint.h>
+#include "pump_dicts.h"
+
+
+
+enum Client_Status{
+	Client_Status_None, // 空闲
+	Client_Status_Sending, // 正在发送
+	Client_Status_Success, // 发送成功
+	Client_Status_Failure, // 发送失败
+};
+struct EC800M_Client_Struct{
+	enum Client_Status status; // 状态
+	char info[200]; // 备注信息
+};
+
+extern struct EC800M_Client_Struct UDP_Client5;
+
+// 获取状态
+enum Client_Status UDP_Client5_Status(void);
+// 发送数据
+void UDP_Client5_Send(struct Pump_Params params);
+// 清除
+void UDP_Client5_Clear(void);
+// 处理流程
+void UDP_Client5_Handle(void);
+
+
+#endif

+ 1661 - 0
Drivers/Ec800m/ec800m.c

@@ -0,0 +1,1661 @@
+#include "stm32f10x.h"
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "AT.h"
+#include "ec800m.h"
+
+
+/**
+* 龙三郎
+**/
+
+
+// 方法声明
+
+void ec800m_reset(void); // 重置状态。该文件中的方法共用状态,在使用下面的方法前需要重置一下状态。
+void ec800m_exit_sleep(void); // 退出休眠
+void ec800m_enter_sleep(void); // 进入休眠
+/**
+* 查询休眠模式
+* 输入<<
+* 
+* 输出>>
+* n 睡眠模式。0 禁用,默认;1 启用。
+**/
+enum Result ec800m_query_sleep(uint8_t * n); // 查询休眠模式。
+enum Result ec800m_query_sleep_sync(uint8_t * n); // 查询休眠模式。同步
+/**
+* 设置休眠模式
+* 输入<<
+* n 参数。0 禁用;1启用。
+* 输出>>
+* 
+**/
+enum Result ec800m_set_sleep(uint8_t n); // 设置休眠模式。
+enum Result ec800m_set_sleep_sync(uint8_t n); // 设置休眠模式。同步
+/**
+* 设置功能模式
+* 输入<<
+* fun 0 最小功能模式;1 全功能模式。
+* 输出>>
+* 
+**/
+enum Result ec800m_set_cfun(uint8_t fun);
+enum Result ec800m_set_cfun_sync(uint8_t fun); // 同步
+/**
+* 设置ps域网络注册状态
+* 输入<<
+* n 0 禁止上报网络注册;1 允许上报网络注册;2 允许上报网络注册和位置信息
+* 输出>>
+* 
+**/
+enum Result ec800m_set_cgreg(uint8_t n);
+enum Result ec800m_set_cgreg_sync(uint8_t n); // 同步
+/**
+* 查询ps域网络注册状态
+* 输入<<
+* 
+* 输出>>
+* n 控制指定URC的上报。0 禁止上报网络注册;1 允许上报网络注册;2 允许上报网络注册和位置信息
+* stat 网络注册状态。0 未注册;1 已注册,归属地网络; 2 未注册;3 注册被拒绝;4 未知;5 已注册,漫游。
+* lac 基站位置区号。用于基站定位,2个字节。
+* ci 基站小区ID。用于基站定位,4个字节。
+*
+**/
+enum Result ec800m_query_cgreg(uint8_t * n, uint8_t * stat, uint16_t * lac, uint32_t * ci);
+enum Result ec800m_query_cgreg_sync(uint8_t * n, uint8_t * stat, uint16_t * lac, uint32_t * ci); // 同步
+/** 
+* 查询socket服务状态
+* 输入<<
+* connectID Socket ID。范围1-11
+* 
+* 输出>>
+* state Socket服务状态。0 未连接;1 正在连接;2 已建立连接;3 服务正在监听;4 连接断开。
+*
+* 
+**/
+enum Result ec800m_query_socket_state(uint8_t connectID, uint8_t * state);
+enum Result ec800m_query_socket_state_sync(uint8_t connectID, uint8_t * state); // 同步
+/** 
+* 打开socket服务
+* 输入<<
+* connectID Socket ID。范围1-11
+* service_type Socket服务类型。取值为"UDP", "TCP"。
+* IP_address 远程服务器地址
+* remote_port 远程服务器端口
+* access_mode Socket服务的数据访问模式。0 缓存模式;1 直吐模式;2 透传模式。
+*
+* 输出>>
+* err 操作错误代码。0 表示没有错误;其余参考移远文档。
+*
+**/
+enum Result ec800m_open_socket(uint8_t connectID, char * service_type, char * IP_address, uint16_t remote_port, uint8_t access_mode, uint16_t * err);
+enum Result ec800m_open_socket_sync(uint8_t connectID, char * service_type, char * IP_address, uint16_t remote_port, uint8_t access_mode, uint16_t * err); // 同步
+/** 
+* 关闭socket服务
+* 输入<<
+* connectID Socket ID。范围1-11
+*
+* 输出>>
+* 
+**/
+enum Result ec800m_close_socket(uint8_t connectID);
+enum Result ec800m_close_socket_sync(uint8_t connectID); // 同步
+/** 
+* 解释:控制是否回显AT+QISEND要发送的数据
+* 为了便于处理返回,发送数据时需要关闭回显。
+* 输入<<
+* echo 是否回显AT+QISEND要发送的数据。0 不回显;1 回显。默认是回显
+*
+* 输出>>
+* 
+**/
+enum Result ec800m_set_qisde(uint8_t echo);
+enum Result ec800m_set_qisde_sync(uint8_t echo); // 同步
+
+/** 
+* 发送数据
+* 输入<<
+* connectID Socket ID。范围1-11。
+* send_length 发送长度。
+* data 待发送的数据。
+*
+*
+**/
+enum Result ec800m_send(uint8_t connectID, uint8_t * data, uint16_t data_length);
+enum Result ec800m_send_sync(uint8_t connectID, uint8_t * data, uint16_t data_length); // 同步
+/** 
+* 接收数据
+* 输入<<
+* connectID Socket ID。范围0-11。
+*
+* 输出>>
+* data 接收的数据。
+* data_length 接收的数据长度。
+**/
+enum Result ec800m_recv(uint8_t connectID, uint8_t * data, uint16_t * data_length); // 接收数据
+/** 
+* 接收数据。带计时
+* 输入<<
+* connectID Socket ID。范围0-11。
+*
+* 输出>>
+* data 接收的数据。
+* data_length 接收的数据长度。
+*
+**/
+enum Result ec800m_recv_with_time(uint8_t connectID, uint8_t * data, uint16_t * data_length, uint32_t time_out);
+enum Result ec800m_recv_with_time_sync(uint8_t connectID, uint8_t * data, uint16_t * data_length, uint32_t time_out); // 同步
+/** 
+* 解释:关闭模块
+* 关闭模块,关闭后会自动重启。
+* 输入<<
+* n 模块关机方式。0 立即关机;1 正常关机。默认是1
+*
+*
+**/
+enum Result ec800m_power_down(uint8_t n);
+enum Result ec800m_power_down_sync(uint8_t n); // 同步
+/** 
+* 模块是否启动成功
+* 输入<<
+*
+* 输出>>
+*
+**/
+enum Result ec800m_ready(void);
+
+/** 
+* 查询信号质量
+* 输入<<
+*
+* 输出>>
+* RSRP 
+* RSRQ
+* RSSI
+* SINR
+**/
+enum Result ec800m_qeng_servingcell(int * RSRP, int * RSRQ, int * RSSI, int * SINR);
+enum Result ec800m_qeng_servingcell_sync(int * RSRP, int * RSRQ, int * RSSI, int * SINR);
+
+
+/** 
+* 查询ICCID
+* 输入<<
+*
+* 输出>>
+* iccid SIM卡卡号
+**/
+enum Result ec800m_query_qccid(char * iccid);
+enum Result ec800m_query_qccid_sync(char * iccid);
+
+
+
+// 
+extern struct AT_Struct AT;
+
+// AT指令
+static char AT_CMD[256];
+
+
+// EC800M提供的一些方法
+struct EC800M ec800m =
+{
+	.reset = ec800m_reset,
+	.exit_sleep = ec800m_exit_sleep,
+	.enter_sleep = ec800m_enter_sleep,
+	.query_sleep = ec800m_query_sleep,
+	.query_sleep_sync = ec800m_query_sleep_sync,
+	.set_sleep = ec800m_set_sleep,
+	.set_sleep_sync = ec800m_set_sleep_sync,
+	.set_cfun = ec800m_set_cfun,
+	.set_cfun_sync = ec800m_set_cfun_sync,
+	.set_cgreg = ec800m_set_cgreg,
+	.set_cgreg_sync = ec800m_set_cgreg_sync,
+	.query_cgreg = ec800m_query_cgreg,
+	.query_cgreg_sync = ec800m_query_cgreg_sync,
+	.query_socket_state = ec800m_query_socket_state,
+	.query_socket_state_sync = ec800m_query_socket_state_sync,
+	.open_socket = ec800m_open_socket,
+	.open_socket_sync = ec800m_open_socket_sync,
+	.close_socket = ec800m_close_socket,
+	.close_socket_sync = ec800m_close_socket_sync,
+	.set_qisde = ec800m_set_qisde,
+	.set_qisde_sync = ec800m_set_qisde_sync,
+	.send = ec800m_send,
+	.send_sync = ec800m_send_sync,
+	.recv = ec800m_recv,
+	.recv_with_time = ec800m_recv_with_time,
+	.recv_with_time_sync = ec800m_recv_with_time_sync,
+	.power_down = ec800m_power_down,
+	.power_down_sync = ec800m_power_down_sync,
+	.ready = ec800m_ready,
+	.qeng_servingcell = ec800m_qeng_servingcell,
+	.qeng_servingcell_sync = ec800m_qeng_servingcell_sync,
+	.query_qccid = ec800m_query_qccid,
+	.query_qccid_sync = ec800m_query_qccid_sync
+};
+
+
+// 发送AT指令
+static void send_data(uint8_t * data, uint16_t length)
+{
+	// 发送AT指令
+	AT_Send_Bytes(data, length);
+}
+
+// 发送AT指令
+static uint8_t send_at_string(char * cmd)
+{
+	uint8_t state = 0;
+	if(AT.status == AT_Status_None)
+	{
+		// 发送AT指令
+		AT_Send_String(cmd);
+		state = 1;
+	}
+	return state;
+}
+
+
+
+// 获取状态
+static enum STATUS getStatus(void)
+{
+	return ec800m.status;
+}
+// 设置状态
+static void setStatus(enum STATUS status)
+{
+	ec800m.status = status;
+}
+// 获取定时
+static uint32_t getTimerMs(void)
+{
+	return ec800m.timer_ms;
+}
+// 设置定时
+static void setTimerMs(uint32_t time)
+{
+	ec800m.timer_ms = time;
+}
+// 获取ID
+static uint8_t getActiveID(void)
+{
+	return ec800m.activeID;
+}
+static void setActiveID(uint8_t activeID)
+{
+	ec800m.activeID = activeID;
+}
+// 验证ID
+static uint8_t verifyActiveID(uint8_t activeID)
+{
+	if(getActiveID() == 0 || getActiveID() == activeID){ return 1; }
+	else
+	{ 
+		Log_Printf_Debug("activeID  repetition!\r\n");
+		return 0; 
+	}
+}
+
+// 返回超时结果
+static enum Result overtime(void)
+{
+	setStatus(Status_Overtime); // 超时
+	return Result_Failed; // 结果
+}
+// 返回成功结果
+static enum Result success(void)
+{
+	// 成功
+	setStatus(Status_Success);
+	// 结果
+	return Result_Success;
+}
+// 返回失败结果
+static enum Result failed(void)
+{
+	// 失败
+	setStatus(Status_Failed);
+	// 失败结果
+	return Result_Failed;
+}
+
+
+
+// 重置状态。该文件中的方法共用状态,在使用方法前需要重置一下状态。
+void ec800m_reset(void)
+{
+	setStatus(Status_None); // 重置状态
+	setActiveID(0); // 重置ID
+	setTimerMs(0); // 重置计时
+	AT_Clear(); // 清除AT指令
+}
+
+// 退出休眠
+void ec800m_exit_sleep(void)
+{
+	GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); // 拉低io口,唤醒模组
+}
+
+// 进入休眠
+void ec800m_enter_sleep(void)
+{
+	GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin); // 拉高io口,进入睡眠
+}
+// 发送指令并改变状态
+enum Result send_at(char * cmd, uint8_t activeID)
+{
+	Log_Printf_Debug(cmd); // 打印AT指令
+	if(send_at_string(cmd)) // 发送AT指令
+	{
+		setActiveID(activeID); // 活动ID
+		setStatus(Status_Sending); // 设置已发送
+		setTimerMs(0); // 重置计时
+		return Result_None; // 未知结果
+	}
+	else
+	{
+		Log_Printf_Debug("AT指令发送失败\r\n"); // 打印日志
+		return Result_Failed; // 失败结果
+	}
+}
+
+
+
+/**
+* 查询休眠模式
+* 输入<<
+* 
+* 输出>>
+* n 睡眠模式。0 禁用,默认;1 启用。
+*
+**/
+enum Result ec800m_query_sleep(uint8_t * n)
+{
+	enum Result result = Result_None;
+	int activeID = 1, time = 500; // 活动ID, 超时时间
+	if(!verifyActiveID(activeID)){ return Result_Failed; } // 校验ID
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QSCLK?\r\r\n"); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期1,请重置状态\r\n"); // 打印日志
+		
+		result = failed(); // 失败
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+	
+		// 处理返回结果
+		char * saveptr = NULL;
+		char * split = "\r\n";
+		// 第一行
+		char * Line1 = strtok_r((char * )AT_result(), split, &saveptr);
+		// 第二行
+		char * Line2 = strtok_r(NULL, split, &saveptr);
+		// 拆解第二行
+		char * saveptr_inner = NULL;
+		char * split_inner = ": ";
+		strtok_r(Line2, split_inner, &saveptr_inner);
+		// 获取mode
+		* n = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+
+
+
+/**
+* 查询休眠模式。同步方法
+* 输入<<
+* 
+* 输出>>
+* n 睡眠模式。0 禁用,默认;1 启用。
+*
+**/
+enum Result ec800m_query_sleep_sync(uint8_t * n)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_query_sleep(n);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+
+/**
+* 设置休眠模式
+* n 参数。0 禁用;1启用。
+**/
+enum Result ec800m_set_sleep(uint8_t n)
+{
+	enum Result result = Result_None;
+	int activeID = 2, time = 500; // 活动ID, 超时时间
+	if(!verifyActiveID(activeID)){ return Result_Failed; } // 校验ID
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QSCLK=%d\r\r\n", n); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		
+		result = failed(); // 失败
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	else if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+
+/**
+* 设置休眠模式。同步
+* n 参数。0 禁用;1启用。
+**/
+enum Result ec800m_set_sleep_sync(uint8_t n)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_set_sleep(n);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+/**
+* 设置功能模式
+* fun 0 最小功能模式;1 全功能模式。
+**/
+uint16_t last_length_cfun = 0;
+uint32_t last_time_cfun = 0;
+enum Result ec800m_set_cfun(uint8_t fun)
+{
+	enum Result result = Result_None;
+	int activeID = 4, time; // 活动ID, 超时时间
+	// 校验参数
+	if(fun == 0){ time = 1000; }
+	else if(fun == 1){ time = 5000; }
+	else
+	{
+		Log_Printf_Debug("set_cfun params error!\r\n");
+		return Result_Failed; 
+	} 
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+CFUN=%d\r\r\n", fun); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		
+		result = failed(); // 失败
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	else if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 防止接收不完整
+		uint16_t length = AT_result_length();
+		if(length > last_length_cfun)
+		{
+			last_length_cfun = length;
+			last_time_cfun = get_time();
+		}
+		else if(get_time_diff(last_time_cfun) > 10) // 过10ms之后再取数据,避免数据截断。
+		{
+			// 发送日志
+			Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+			Log_SendArray_Debug(AT_result(), AT_result_length());
+			
+			// 重置一下
+			last_length_cfun = 0;
+			last_time_cfun = 0;
+			
+			result = success(); // 成功
+		}
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+/**
+* 设置功能模式
+* 输入<<
+* fun 0 最小功能模式;1 全功能模式。
+* 输出>>
+* 
+**/
+enum Result ec800m_set_cfun_sync(uint8_t fun)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_set_cfun(fun);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+/**
+* 设置ps域网络注册状态
+* n 0 禁止上报网络注册;1 允许上报网络注册;2 允许上报网络注册和位置信息
+**/
+enum Result ec800m_set_cgreg(uint8_t n)
+{
+	enum Result result = Result_None;
+	int activeID = 6, time = 500; // 活动ID, 超时时间
+	// 校验参数
+	if(n > 2)
+	{
+		Log_Printf_Debug("set_cgreg params error!\r\n");
+		return Result_Failed; 
+	} 
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+CGREG=%d\r\r\n", n); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		
+		result = failed(); // 失败
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	else if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+
+/**
+* 设置ps域网络注册状态
+* 输入<<
+* n 0 禁止上报网络注册;1 允许上报网络注册;2 允许上报网络注册和位置信息
+* 输出>>
+* 
+**/
+enum Result ec800m_set_cgreg_sync(uint8_t n)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_set_cgreg(n);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+/**
+* 查询ps域网络注册状态
+* 输入<<
+* 
+* 输出>>
+* n 控制指定URC的上报。0 禁止上报网络注册;1 允许上报网络注册;2 允许上报网络注册和位置信息
+* stat 网络注册状态。0 未注册;1 已注册,归属地网络; 2 未注册;3 注册被拒绝;4 未知;5 已注册,漫游。
+* lac 基站位置区号。用于基站定位,2个字节。
+* ci 基站小区ID。用于基站定位,4个字节。
+*
+**/
+enum Result ec800m_query_cgreg(uint8_t * n, uint8_t * stat, uint16_t * lac, uint32_t * ci)
+{
+	enum Result result = Result_None;
+	int activeID = 9, time = 500; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+CGREG?\r\r\n"); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		
+		result = failed(); // 失败
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		setStatus(Status_Overtime); // 超时
+		result = Result_Failed; // 结果
+	}
+	else if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		// 处理返回结果
+		char * saveptr = NULL;
+		char * split = "\r\n";
+		// 第一行
+		strtok_r((char * )AT_result(), split, &saveptr);
+		// 第二行
+		char * Line2 = strtok_r(NULL, split, &saveptr);
+		// 拆解第二行
+		char * saveptr_inner = NULL;
+		char * split_inner = ": ,\"";
+		strtok_r(Line2, split_inner, &saveptr_inner);
+		* n = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+		* stat = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+		* lac = strtoul(strtok_r(NULL, split_inner, &saveptr_inner), NULL, 16);
+		* ci = strtoul(strtok_r(NULL, split_inner, &saveptr_inner), NULL, 16);
+		// 打印
+		Log_Printf_Debug("mode: %d, stat: %d, lac: %d, ci: %d\r\n", * n, * stat, * lac, * ci);
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+
+/**
+* 查询ps域网络注册状态
+* 输入<<
+* 
+* 输出>>
+* n 控制指定URC的上报。0 禁止上报网络注册;1 允许上报网络注册;2 允许上报网络注册和位置信息
+* stat 网络注册状态。0 未注册;1 已注册,归属地网络; 2 未注册;3 注册被拒绝;4 未知;5 已注册,漫游。
+* lac 基站位置区号。用于基站定位,2个字节。
+* ci 基站小区ID。用于基站定位,4个字节。
+*
+**/
+enum Result ec800m_query_cgreg_sync(uint8_t * n, uint8_t * stat, uint16_t * lac, uint32_t * ci)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_query_cgreg(n, stat, lac, ci);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+/** 
+* 查询socket服务状态
+* connectID Socket ID。范围1-11
+* state Socket服务状态。0 未连接;1 正在连接;2 已建立连接;3 服务正在监听;4 连接断开。
+*
+* activeID 9
+**/
+enum Result ec800m_query_socket_state(uint8_t connectID, uint8_t * state)
+{
+	enum Result result = Result_None;
+	int activeID = 9, time = 500; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QISTATE=1,%d\r\r\n", connectID); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		result = failed(); // 失败
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	else if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		// 处理返回结果
+		char * saveptr = NULL;
+		char * split = "\r\n";
+		// 第一行
+		strtok_r((char * )AT_result(), split, &saveptr);
+		// 第二行
+		char * Line2 = strtok_r(NULL, split, &saveptr);
+		// 查询结果为空
+		if(strcmp(Line2, "OK") == 0){ * state = 0; }
+		else
+		{
+			// 拆解第二行
+			char * saveptr_inner = NULL;
+			char * split_inner = ": ,\"";
+			strtok_r(Line2, split_inner, &saveptr_inner);
+			strtok_r(NULL, split_inner, &saveptr_inner);
+			strtok_r(NULL, split_inner, &saveptr_inner);
+			strtok_r(NULL, split_inner, &saveptr_inner);
+			strtok_r(NULL, split_inner, &saveptr_inner);
+			strtok_r(NULL, split_inner, &saveptr_inner);
+			* state = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+		}
+		// 打印
+		Log_Printf_Debug("result: %d\r\n", * state);
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+
+/** 
+* 查询socket服务状态
+* connectID Socket ID。范围1-11
+* state Socket服务状态。0 未连接;1 正在连接;2 已建立连接;3 服务正在监听;4 连接断开。
+*
+* activeID 9
+**/
+enum Result ec800m_query_socket_state_sync(uint8_t connectID, uint8_t * state)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_query_socket_state(connectID, state);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+/** 
+* 打开socket服务
+* 输入<<
+* connectID Socket ID。范围1-11
+* service_type Socket服务类型。取值为"UDP", "TCP"。
+* IP_address 远程服务器地址
+* remote_port 远程服务器端口
+* access_mode Socket服务的数据访问模式。0 缓存模式;1 直吐模式;2 透传模式。
+*
+* 输出>>
+* err 操作错误代码。0 表示没有错误;其余参考移远文档。
+*
+* activeID 19
+**/
+enum Result ec800m_open_socket(uint8_t connectID, char * service_type, char * IP_address, uint16_t remote_port, uint8_t access_mode, uint16_t * err)
+{
+	enum Result result = Result_None;
+	int activeID = 19, time = 3000; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QIOPEN=1,%d,\"%s\",\"%s\",%d,%d,%d\r\r\n", connectID, service_type, IP_address, remote_port, 0, access_mode); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		
+		result = failed(); // 失败
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	else if(strstr((char * )AT_result(), "+QIOPEN: ") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		// 处理返回结果
+		char * saveptr = NULL;
+		char * split = "\r\n";
+		// 第一行
+		strtok_r((char * )AT_result(), split, &saveptr);
+		// 第二行
+		char * Line2 = strtok_r(NULL, split, &saveptr);
+		// 第三行
+		char * Line3 = strtok_r(NULL, split, &saveptr);
+		// 查询结果为空
+		if(strcmp(Line2, "OK") == 0)
+		{
+			// 拆解第三行
+			char * saveptr_inner = NULL;
+			char * split_inner = ": ,\"";
+			strtok_r(Line3, split_inner, &saveptr_inner);
+			uint8_t connID = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+			* err = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+			Log_Printf_Debug("result: %d, %d\r\n", connID, * err);
+		}
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+
+/** 
+* 打开socket服务
+* 输入<<
+* connectID Socket ID。范围1-11
+* service_type Socket服务类型。取值为"UDP", "TCP"。
+* IP_address 远程服务器地址
+* remote_port 远程服务器端口
+* access_mode Socket服务的数据访问模式。0 缓存模式;1 直吐模式;2 透传模式。
+*
+* 输出>>
+* err 操作错误代码。0 表示没有错误;其余参考移远文档。
+*
+* activeID 19
+**/
+enum Result ec800m_open_socket_sync(uint8_t connectID, char * service_type, char * IP_address, uint16_t remote_port, uint8_t access_mode, uint16_t * err)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_open_socket(connectID, service_type, IP_address, remote_port, access_mode, err);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+
+/** 
+* 关闭socket服务
+* 输入<<
+* connectID Socket ID。范围1-11
+*
+* activeID 29
+**/
+enum Result ec800m_close_socket(uint8_t connectID)
+{
+	enum Result result = Result_None;
+	int activeID = 29, time = 500; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QICLOSE=%d\r\r\n", connectID); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		result = Result_Failed; 
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	else if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+/** 
+* 关闭socket服务
+* 输入<<
+* connectID Socket ID。范围1-11
+*
+* activeID 29
+**/
+enum Result ec800m_close_socket_sync(uint8_t connectID)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_close_socket(connectID);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+/** 
+* 解释:控制是否回显AT+QISEND要发送的数据
+* 为了便于处理返回,发送数据时需要关闭回显。
+* 输入<<
+* echo 是否回显AT+QISEND要发送的数据。0 不回显;1 回显。默认是回显
+*
+* activeID 45
+**/
+enum Result ec800m_set_qisde(uint8_t echo)
+{
+	enum Result result = Result_None;
+	int activeID = 45, time = 500; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QISDE=%d\r\r\n", echo); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		result = Result_Failed; 
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	else if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+
+/** 
+* 解释:控制是否回显AT+QISEND要发送的数据
+* 为了便于处理返回,发送数据时需要关闭回显。
+* 输入<<
+* echo 是否回显AT+QISEND要发送的数据。0 不回显;1 回显。默认是回显
+*
+* activeID 45
+**/
+enum Result ec800m_set_qisde_sync(uint8_t echo)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_set_qisde(echo);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+/** 
+* 发送数据
+* 输入<<
+* connectID Socket ID。范围1-11。
+* send_length 发送长度。
+* data 待发送的数据。
+*
+* activeID 49
+**/
+enum Result ec800m_send(uint8_t connectID, uint8_t * data, uint16_t data_length)
+{
+	enum Result result = Result_None;
+	int activeID = 49, time = 10000; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QISEND=%d,%d\r\r\n", connectID, data_length); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		result = Result_Failed; 
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	else if(strstr((char * )AT_result(), "> ") != NULL) // 有响应
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		// 发送数据
+		send_data(data, data_length);
+		// 清理一下AT返回结果缓存
+		AT_Clear_Result();
+	}
+	else if(strstr((char * )AT_result(), "SEND OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "SEND FALL\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+
+
+/** 
+* 发送数据
+* 输入<<
+* connectID Socket ID。范围1-11。
+* send_length 发送长度。
+* data 待发送的数据。
+*
+* activeID 49
+**/
+enum Result ec800m_send_sync(uint8_t connectID, uint8_t * data, uint16_t data_length)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_send(connectID, data, data_length);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+
+/** 
+* 接收数据
+* 输入<<
+* connectID Socket ID。范围0-11。
+*
+* 输出>>
+* data 接收的数据。
+* data_length 接收的数据长度。
+*
+**/
+static uint16_t last_length = 0;
+static uint32_t last_time = 0;
+enum Result ec800m_recv(uint8_t connectID, uint8_t * data, uint16_t * data_length)
+{
+	// 设置AT为使用中,防止被其他程序占用
+	AT_Set_Status(AT_Status_Using);
+	enum Result result = Result_None;
+	// 校验参数
+	if(connectID > 11)
+	{
+		Log_Printf_Debug("recv params error!\r\n");
+		return Result_Failed; 
+	}
+	char cmp[20];
+	sprintf(cmp, "+QIURC: \"recv\",%d", connectID); // 拼接AT指令
+	// 判断是否接收到
+	if(strstr((char * )AT_result(), cmp) != NULL)
+	{
+		// 防止接收不完整
+		uint16_t length = AT_result_length();
+		if(length > last_length)
+		{
+			last_length = length;
+			last_time = get_time();
+		}
+		else if(get_time_diff(last_time) > 10) // 过10ms之后再取数据,避免数据截断。
+		{
+			// 发送日志
+			Log_Printf_Debug("AT返回: %d, time_diff: %d\r\n", AT_result_length(), get_time_diff(last_time));
+//			Log_SendArray_Debug(AT_result(), AT_result_length());
+			
+			char * saveptr = NULL;
+			char * split = "\r\n";
+			char * Line1 = strtok_r((char * )AT_result(), split, &saveptr);
+			uint8_t Line1_Len = strlen(Line1);
+			Log_Printf_Debug("Line1(%d): %s\r\n",Line1_Len ,Line1);
+			
+			// 分割Line1,获取报文长度
+			char * saveptr_inner = NULL;
+			char * split_inner = ",";
+			strtok_r(Line1, split_inner, &saveptr_inner);
+			strtok_r(NULL, split_inner, &saveptr_inner);
+			* data_length = strtoul(strtok_r(NULL, split_inner, &saveptr_inner), NULL, 10);
+			
+			uint16_t line_length = Line1_Len + 4;
+			// 内存拷贝
+			memcpy(data, AT_result() + line_length, * data_length);
+			
+			// 重置一下
+			last_length = 0;
+			last_time = 0;
+			// 成功
+			result = Result_Success;
+			// 清理一下AT返回结果缓存
+			AT_Clear_Result();
+		}
+	}
+	return result;
+}
+
+
+
+
+/** 
+* 接收数据。带计时
+* 输入<<
+* connectID Socket ID。范围0-11。
+*
+* 输出>>
+* data 接收的数据。
+* data_length 接收的数据长度。
+*
+**/
+enum Result ec800m_recv_with_time(uint8_t connectID, uint8_t * data, uint16_t * data_length, uint32_t time_out)
+{
+	enum Result result = Result_None;
+	int activeID = 59, time = time_out; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		setStatus(Status_Sending);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		result = Result_Failed; 
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("等待时间超时\r\n"); // 打印日志
+		result = overtime(); // 超时
+	}
+	else
+	{
+		// 接收数据
+		result = ec800m.recv(connectID, data, data_length);
+		if(result == Result_Success)
+		{
+			result = success(); // 成功
+		}
+	}
+	return result;
+}
+
+/** 
+* 接收数据。带计时
+* 输入<<
+* connectID Socket ID。范围0-11。
+*
+* 输出>>
+* data 接收的数据。
+* data_length 接收的数据长度。
+*
+**/
+enum Result ec800m_recv_with_time_sync(uint8_t connectID, uint8_t * data, uint16_t * data_length, uint32_t time_out)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_recv_with_time(connectID, data, data_length, time_out);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+/** 
+* 解释:关闭模块
+* 关闭模块,关闭后会自动重启。
+* 输入<<
+* n 模块关机方式。0 立即关机;1 正常关机。默认是1
+*
+* activeID 69
+**/
+enum Result ec800m_power_down(uint8_t n)
+{
+	enum Result result = Result_None;
+	int activeID = 69, time = 3000; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QPOWD=%d\r\r\n", n); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		result = Result_Failed; 
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		result = overtime();
+	}
+	else if(strstr((char * )AT_result(), "POWERED DOWN\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		// 成功结果
+		result = success();
+	}
+	return result;
+}
+
+/** 
+* 解释:关闭模块。同步
+* 关闭模块,关闭后会自动重启。
+* 输入<<
+* n 模块关机方式。0 立即关机;1 正常关机。默认是1
+*
+* activeID 69
+**/
+enum Result ec800m_power_down_sync(uint8_t n)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_power_down(n);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+/** 
+* 模块是否启动成功
+* 输入<<
+*
+* 输出>>
+*
+**/
+enum Result ec800m_ready(void)
+{
+	enum Result result = Result_None;
+	// 判断是否接收到
+	if(strstr((char * )AT_result(), "\r\nRDY\r\n") != NULL)
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		// 成功结果
+		result = Result_Success;
+		// 清理一下AT返回结果缓存
+		AT_Clear_Result();
+	}
+	return result;
+}
+
+/** 
+* 查询信号质量
+* 输入<<
+*
+* 输出>>
+* RSRP 
+* RSRQ
+* RSSI
+* SINR
+**/
+enum Result ec800m_qeng_servingcell(int * RSRP, int * RSRQ, int * RSSI, int * SINR)
+{
+	enum Result result = Result_None;
+	int activeID = 71, time = 500; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QENG=\"servingcell\"\r\r\n"); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		
+		result = failed(); // 失败
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		setStatus(Status_Overtime); // 超时
+		result = Result_Failed; // 结果
+	}
+	else if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		// 处理返回结果
+		char * saveptr = NULL;
+		char * split = "\r\n";
+		// 第一行
+		strtok_r((char * )AT_result(), split, &saveptr);
+		// 第二行
+		char * Line2 = strtok_r(NULL, split, &saveptr);
+		// 拆解第二行
+		char * saveptr_inner = NULL;
+		char * split_inner = ": ,\"";
+		strtok_r(Line2, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		strtok_r(NULL, split_inner, &saveptr_inner);
+		* RSRP = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+		* RSRQ = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+		* RSSI = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+		* SINR = atoi(strtok_r(NULL, split_inner, &saveptr_inner));
+		// 打印
+		Log_Printf_Debug("RSRP: %d, RSRQ: %d, RSSI: %d, SINR: %d\r\n", * RSRP, * RSRQ, * RSSI, * SINR);
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+
+
+enum Result ec800m_qeng_servingcell_sync(int * RSRP, int * RSRQ, int * RSSI, int * SINR)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_qeng_servingcell(RSRP, RSRQ, RSSI, SINR);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+/** 
+* 查询ICCID
+* 输入<<
+*
+* 输出>>
+* iccid SIM卡卡号
+**/
+enum Result ec800m_query_qccid(char * iccid)
+{
+	enum Result result = Result_None;
+	int activeID = 75, time = 500; // 活动ID, 超时时间
+	// 校验ID
+	if(!verifyActiveID(activeID)){ return Result_Failed; }
+	// 判断状态
+	if(getStatus() == Status_None) // 空闲状态
+	{
+		sprintf(AT_CMD, "AT+QCCID\r\r\n"); // 拼接AT指令
+		result = send_at(AT_CMD, activeID);
+	}
+	else if(getStatus() != Status_Sending) // 上一次的结果没有清除,返回错误,为了保证时效性,需要重置状态。重新调用
+	{
+		Log_Printf_Debug("返回结果过期,请重置状态\r\n"); // 打印日志
+		
+		result = failed(); // 失败
+	}
+	else if(getTimerMs() > time) // 正在发送状态。判断超时
+	{
+		Log_Printf_Debug("AT指令返回超时\r\n"); // 打印日志
+		setStatus(Status_Overtime); // 超时
+		result = Result_Failed; // 结果
+	}
+	else if(strstr((char * )AT_result(), "OK\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		// 处理返回结果
+		char * saveptr = NULL;
+		char * split = "\r\n";
+		// 第一行
+		strtok_r((char * )AT_result(), split, &saveptr);
+		// 第二行
+		char * Line2 = strtok_r(NULL, split, &saveptr);
+		// 拆解第二行
+		char * saveptr_inner = NULL;
+		char * split_inner = ": ,\"";
+		
+		strtok_r(Line2, split_inner, &saveptr_inner);
+		// 字符串拷贝
+		strcpy(iccid, strtok_r(NULL, split_inner, &saveptr_inner));
+		
+		// 打印
+		Log_Printf_Debug("ICCID: %s\r\n", iccid);
+		
+		result = success(); // 成功
+	}
+	else if(strstr((char * )AT_result(), "ERROR\r\n") != NULL) // 查询是否返回
+	{
+		// 发送日志
+		Log_Printf_Debug("AT返回: %d\r\n", AT_result_length());
+		Log_SendArray_Debug(AT_result(), AT_result_length());
+		
+		result = failed(); // 失败
+	}
+	return result;
+}
+enum Result ec800m_query_qccid_sync(char * iccid)
+{
+	enum Result result = Result_None;
+	while(1)
+	{
+		result = ec800m_query_qccid(iccid);
+		if(result != Result_None)
+		{
+			// 重置
+			ec800m.reset();
+			break;
+		}
+	}
+	return result;
+}
+
+
+

+ 75 - 0
Drivers/Ec800m/ec800m.h

@@ -0,0 +1,75 @@
+#ifndef __EC800M_H
+#define __EC800M_H
+#include <stdint.h>
+
+extern struct EC800M ec800m;
+
+enum Result
+{
+	Result_None, // 未知
+	Result_Success, // 成功
+	Result_Failed, // 失败
+};
+enum STATUS
+{
+	Status_None, // 空闲
+	Status_Sending, // 正在发送
+	Status_Success, // 成功
+	Status_Failed, // 失败
+	Status_Overtime, // 超时
+};
+
+
+// ec800m的AT发送状态机
+struct EC800M
+{
+	enum STATUS status; // 状态
+	uint16_t activeID; // 活动的编号。下面的每个活动都有一个唯一的编号
+	uint32_t timer_ms; // 计时器
+	void (* reset) (void);
+	void (* exit_sleep)(void); // 退出休眠
+	void (* enter_sleep)(void); // 退出休眠
+	enum Result (* query_sleep)(uint8_t * n); // 查询休眠状态
+	enum Result (* query_sleep_sync)(uint8_t * n); // 查询休眠状态。同步
+	enum Result (* set_sleep)(uint8_t n); // 设置休眠模式
+	enum Result (* set_sleep_sync)(uint8_t n); // 设置休眠模式。同步
+	enum Result (* set_cfun)(uint8_t fun); // 设置功能模式
+	enum Result (* set_cfun_sync)(uint8_t fun); // 设置功能模式。同步
+	enum Result (* set_cgreg)(uint8_t n); // 设置ps域注册状态。
+	enum Result (* set_cgreg_sync)(uint8_t n); // 设置ps域注册状态。。同步
+	enum Result (* query_cgreg)(uint8_t * n, uint8_t * stat, uint16_t * lac, uint32_t * ci); // 查询ps域网络注册状态
+	enum Result (* query_cgreg_sync)(uint8_t * n, uint8_t * stat, uint16_t * lac, uint32_t * ci); // 查询ps域网络注册状态。同步
+	enum Result (* query_socket_state)(uint8_t connectID, uint8_t * state); // 查询Socket服务状态
+	enum Result (* query_socket_state_sync)(uint8_t connectID, uint8_t * state); // 查询Socket服务状态。同步
+	enum Result (* open_socket)(uint8_t connectID, char * service_type, char * IP_address, uint16_t remote_port, uint8_t access_mode, uint16_t * err); // 打开Socket服务
+	enum Result (* open_socket_sync)(uint8_t connectID, char * service_type, char * IP_address, uint16_t remote_port, uint8_t access_mode, uint16_t * err); // 打开Socket服务。同步
+	enum Result (* close_socket)(uint8_t connectID); // 关闭socket服务
+	enum Result (* close_socket_sync)(uint8_t connectID); // 关闭socket服务。同步
+	enum Result (* set_qisde)(uint8_t echo); // 控制发送数据后是否回显。
+	enum Result (* set_qisde_sync)(uint8_t echo); // 控制发送数据后是否回显。。同步
+	enum Result (* send)(uint8_t connectID, uint8_t * data, uint16_t data_length); // 发送数据。
+	enum Result (* send_sync)(uint8_t connectID, uint8_t * data, uint16_t data_length); // 发送数据。。同步
+	
+	enum Result (* recv)(uint8_t connectID, uint8_t * data, uint16_t * data_length); // 接收数据
+	enum Result (* recv_with_time)(uint8_t connectID, uint8_t * data, uint16_t * data_length, uint32_t time_out); // 接收数据,带等待时间。
+	enum Result (* recv_with_time_sync)(uint8_t connectID, uint8_t * data, uint16_t * data_length, uint32_t time_out); // 接收数据,带等待时间。同步
+	
+	enum Result (* power_down)(uint8_t n); // 模块关机
+	enum Result (* power_down_sync)(uint8_t n); // 模块关机
+	enum Result (* ready)(void); // 模块是否启动成功
+	
+	enum Result (* qeng_servingcell)(int * RSRP, int * RSRQ, int * RSSI, int * SINR); // 查询网络信号质量。
+	enum Result (* qeng_servingcell_sync)(int * RSRP, int * RSRQ, int * RSSI, int * SINR); // 查询网络信号质量。同步
+	
+	enum Result (* query_qccid)(char * iccid); // 查询SIM卡卡号
+	enum Result (* query_qccid_sync)(char * iccid); // 查询SIM卡卡号
+	
+};
+
+
+
+
+
+
+#endif
+

+ 78 - 78
NET/Util/AES.c → Drivers/Encrypt/4GAES.c

@@ -1,15 +1,15 @@
 /**
 * author wulianwei
-* title AES加密功能
+* title AES鍔犲瘑鍔熻兘
 */
 #define  _CRT_SECURE_NO_WARNINGS
-#include "AES.h"
+#include "4GAES.h"
 #include <stdio.h>
 #include "string.h"
 /*aes_small.c*/
-//辅助矩阵
-/*s盒矩阵:The AES Substitution Table*/// 256 位的密匙256 位支持长度为32 个字符
-static const unsigned char sbox[256] = {	//static:内部变量  const:只读,不可变常量
+//杈呭姪鐭╅樀
+/*s鐩掔煩闃碉細The AES Substitution Table*/// 256 浣嶇殑瀵嗗寵256 浣嶆敮鎸侀暱搴︿负32 涓�瓧绗�
+static const unsigned char sbox[256] = {	//static:鍐呴儴鍙橀噺  const锛氬彧璇伙紝涓嶅彲鍙樺父閲�
 	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,
 	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76,
 	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,
@@ -43,7 +43,7 @@ static const unsigned char sbox[256] = {	//static:
 	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,
 	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16,
 };
-//逆向S 盒矩阵
+//閫嗗悜S 鐩掔煩闃�
 static const unsigned char contrary_sbox[256] = {
 	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38,
 	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb,
@@ -78,12 +78,12 @@ static const unsigned char contrary_sbox[256] = {
 	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26,
 	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d,
 };
-/*轮常量表 The key schedule rcon table*/
+/*杞�父閲忚〃 The key schedule rcon table*/
 static const unsigned char Rcon[10] = {
 	0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x1b,0x36 };
 
-//辅助函数
-/*有限域*2乘法 The x2time() function */
+//杈呭姪鍑芥暟
+/*鏈夐檺鍩�*2涔樻硶 The x2time() function */
 static unsigned char x2time(unsigned char x)
 {
 	if (x & 0x80)
@@ -92,56 +92,56 @@ static unsigned char x2time(unsigned char x)
 	}
 	return x << 1;
 }
-/*有限域*3乘法 The x2time() function */
+/*鏈夐檺鍩�*3涔樻硶 The x2time() function */
 static unsigned char x3time(unsigned char x)
 {
 	return (x2time(x) ^ x);
 }
-/*有限域*4乘法 The x4time() function */
+/*鏈夐檺鍩�*4涔樻硶 The x4time() function */
 static unsigned char x4time(unsigned char x)
 {
 	return (x2time(x2time(x)));
 }
-/*有限域*8乘法 The x8time() function */
+/*鏈夐檺鍩�*8涔樻硶 The x8time() function */
 static unsigned char x8time(unsigned char x)
 {
 	return (x2time(x2time(x2time(x))));
 }
-/*有限域9乘法 The x9time() function */
+/*鏈夐檺鍩�9涔樻硶 The x9time() function */
 static unsigned char x9time(unsigned char x)	//9:1001
 {
 	return (x8time(x) ^ x);
 }
-/*有限域*B乘法 The xBtime() function */
+/*鏈夐檺鍩�*B涔樻硶 The xBtime() function */
 static unsigned char xBtime(unsigned char x)	//B:1011
 {
 	return (x8time(x) ^ x2time(x) ^ x);
 }
-/*有限域*D乘法 The xDtime() function */
+/*鏈夐檺鍩�*D涔樻硶 The xDtime() function */
 static unsigned char xDtime(unsigned char x)	//D:1101
 {
 	return (x8time(x) ^ x4time(x) ^ x);
 }
-/*有限域*E乘法 The xEtime() function */
+/*鏈夐檺鍩�*E涔樻硶 The xEtime() function */
 static unsigned char xEtime(unsigned char x)	//E:1110
 {
 	return (x8time(x) ^ x4time(x) ^ x2time(x));
 }
 
 /****************************************************************************************************************/
-/*第三类操作:列混合操作 MixColumns: Process the entire block*/
-static void MixColumns(unsigned char *col)//列混合
+/*绗�笁绫绘搷浣滐細鍒楁贩鍚堟搷浣� MixColumns: Process the entire block*/
+static void MixColumns(unsigned char *col)//鍒楁贩鍚�
 {
 	unsigned char tmp[4];
 	int i;
-	for (i = 0; i < 4; i++, col += 4)  //col代表一列的基地址,col+4:下一列的基地址
+	for (i = 0; i < 4; i++, col += 4)  //col浠h〃涓€鍒楃殑鍩哄湴鍧€锛宑ol+4:涓嬩竴鍒楃殑鍩哄湴鍧€
 	{
 		/*
 		xt[0]=x2time(col[0]);
 		xt[1]=x2time(col[1]);
 		xt[2]=x2time(col[2]);
 		xt[3]=x2time(col[3]);
-		//xt[n]代表*2   xt[n]^col[n]代表*3   col[n]代表*1
+		//xt[n]浠h〃*2   xt[n]^col[n]浠h〃*3   col[n]浠h〃*1
 		tmp[0]=(xt[0])^(xt[1]^col[1])^col[2]^col[3];	//2 3 1 1
 		tmp[1]=col[0]^(xt[1])^(xt[2]^col[2])^col[3];	//1 2 3 1
 		tmp[2]=col[0]^col[1]^(xt[2])^(xt[3]^col[3]);	//1 1 2 3
@@ -151,14 +151,14 @@ static void MixColumns(unsigned char *col)//
 		tmp[1] = col[0] ^ x2time(col[1]) ^ x3time(col[2]) ^ col[3];	//1 2 3 1
 		tmp[2] = col[0] ^ col[1] ^ x2time(col[2]) ^ x3time(col[3]);	//1 1 2 3
 		tmp[3] = x3time(col[0]) ^ col[1] ^ col[2] ^ x2time(col[3]);	//3 1 1 2
-		//修改后的值 直接在原矩阵上修改
+		//淇�敼鍚庣殑鍊� 鐩存帴鍦ㄥ師鐭╅樀涓婁慨鏀�
 		col[0] = tmp[0];
 		col[1] = tmp[1];
 		col[2] = tmp[2];
 		col[3] = tmp[3];
 	}
 }
-//逆向列混淆
+//閫嗗悜鍒楁贩娣�
 static void Contrary_MixColumns(unsigned char *col)
 {
 	unsigned char tmp[4];
@@ -193,8 +193,8 @@ static void Contrary_MixColumns(unsigned char *col)
 		col[3] = tmp[3];
 	}
 }
-/*第二类操作:行移位:行左循环移位 ShiftRows:Shifts the entire block*/
-static void ShiftRows(unsigned char *col)//正向行移位
+/*绗�簩绫绘搷浣滐細琛岀Щ浣嶏細琛屽乏寰�幆绉讳綅 ShiftRows:Shifts the entire block*/
+static void ShiftRows(unsigned char *col)//姝e悜琛岀Щ浣�
 {
 	/*
 		1 5  9 13				5  9 13 1
@@ -203,16 +203,16 @@ static void ShiftRows(unsigned char *col)//
 		4 8 12 16				16 4 8 12
 	*/
 	unsigned char t;
-	/*1nd row*///左移1位
+	/*1nd row*///宸︾Щ1浣�
 	t = col[1]; col[1] = col[5]; col[5] = col[9]; col[9] = col[13]; col[13] = t;
-	/*2rd row*///左移2位,交换2次数字来实现
+	/*2rd row*///宸︾Щ2浣嶏紝浜ゆ崲2娆℃暟瀛楁潵瀹炵幇
 	t = col[2]; col[2] = col[10]; col[10] = t;
 	t = col[6]; col[6] = col[14]; col[14] = t;
-	/*3th row*///左移3位,相当于右移1次
+	/*3th row*///宸︾Щ3浣嶏紝鐩稿綋浜庡彸绉�1娆�
 	t = col[15]; col[15] = col[11]; col[11] = col[7]; col[7] = col[3]; col[3] = t;
-	/*4th row*/	//第4行不移位
+	/*4th row*/	//绗�4琛屼笉绉讳綅
 }
-//逆向行移位
+//閫嗗悜琛岀Щ浣�
 static void Contrary_ShiftRows(unsigned char *col)
 {
 	unsigned char t;
@@ -223,10 +223,10 @@ static void Contrary_ShiftRows(unsigned char *col)
 	t = col[6]; col[6] = col[14]; col[14] = t;
 	/*3th row*/
 	t = col[3]; col[3] = col[7]; col[7] = col[11]; col[11] = col[15]; col[15] = t;
-	/*4th row*/	//第4行不移位
+	/*4th row*/	//绗�4琛屼笉绉讳綅
 }
-/*第一类操作:s盒字节代换替换 SubBytes*/
-static void SubBytes(unsigned char *col)//字节代换
+/*绗�竴绫绘搷浣滐細s鐩掑瓧鑺備唬鎹㈡浛鎹� SubBytes*/
+static void SubBytes(unsigned char *col)//瀛楄妭浠f崲
 {
 	int x;
 	for (x = 0; x < 16; x++)
@@ -234,7 +234,7 @@ static void SubBytes(unsigned char *col)//
 		col[x] = sbox[col[x]];
 	}
 }
-//逆向字节代换
+//閫嗗悜瀛楄妭浠f崲
 static void Contrary_SubBytes(unsigned char *col)
 {
 	int x;
@@ -243,41 +243,41 @@ static void Contrary_SubBytes(unsigned char *col)
 		col[x] = contrary_sbox[col[x]];
 	}
 }
-/*第四类操作:轮密钥加 AddRoundKey*/
-static void AddRoundKey(unsigned char *col, unsigned char *expansionkey, int round)//密匙加
+/*绗�洓绫绘搷浣滐細杞�瘑閽ュ姞 AddRoundKey*/
+static void AddRoundKey(unsigned char *col, unsigned char *expansionkey, int round)//瀵嗗寵鍔�
 {
-	//扩展密钥:44*32bit =11*4* 4*8 =  16字节*11轮,每轮用16字节密钥
-	//第0轮,只进行一次轮密钥加
-	//第1-10轮,轮密钥加
+	//鎵╁睍瀵嗛挜锛�44*32bit =11*4* 4*8 =  16瀛楄妭*11杞�紝姣忚疆鐢�16瀛楄妭瀵嗛挜
+	//绗�0杞�紝鍙�繘琛屼竴娆¤疆瀵嗛挜鍔�
+	//绗�1-10杞�紝杞�瘑閽ュ姞
 	int x;
-	for (x = 0; x < 16; x++)	//每1轮操作:4*32bit密钥 = 16个字节密钥
+	for (x = 0; x < 16; x++)	//姣�1杞�搷浣滐細4*32bit瀵嗛挜 = 16涓�瓧鑺傚瘑閽�
 	{
 		col[x] ^= expansionkey[(round << 4) + x];
 	}
 }
-/* AES加密总函数 10轮4类操作 Encrypt a single block with Nr Rounds(10,12,14)*/
-void AesEncrypt(unsigned char *blk, unsigned char *expansionkey, int Nr)//加密一个区块
+/* AES鍔犲瘑鎬诲嚱鏁� 10杞�4绫绘搷浣� Encrypt a single block with Nr Rounds(10,12,14)*/
+void AesEncrypt(unsigned char *blk, unsigned char *expansionkey, int Nr)//鍔犲瘑涓€涓�尯鍧�
 {
-	//输入blk原文,直接在上面修改,输出blk密文
-	//输入skey:
-	//输入Nr = 10轮
+	//杈撳叆blk鍘熸枃锛岀洿鎺ュ湪涓婇潰淇�敼锛岃緭鍑篵lk瀵嗘枃
+	//杈撳叆skey锛�
+	//杈撳叆Nr = 10杞�
 	int round;
-	//第1轮之前:轮密钥加
+	//绗�1杞�箣鍓嶏細杞�瘑閽ュ姞
 	AddRoundKey(blk, expansionkey, 0);
-	//第1-9轮:4类操作:字节代换、行移位、列混合、轮密钥加
+	//绗�1-9杞�細4绫绘搷浣滐細瀛楄妭浠f崲銆佽�绉讳綅銆佸垪娣峰悎銆佽疆瀵嗛挜鍔�
 	for (round = 1; round <= (Nr - 1); round++)
 	{
-		SubBytes(blk);		//输入16字节数组,直接在原数组上修改
-		ShiftRows(blk);		//输入16字节数组,直接在原数组上修改
-		MixColumns(blk);	//输入16字节数组,直接在原数组上修改
+		SubBytes(blk);		//杈撳叆16瀛楄妭鏁扮粍锛岀洿鎺ュ湪鍘熸暟缁勪笂淇�敼
+		ShiftRows(blk);		//杈撳叆16瀛楄妭鏁扮粍锛岀洿鎺ュ湪鍘熸暟缁勪笂淇�敼
+		MixColumns(blk);	//杈撳叆16瀛楄妭鏁扮粍锛岀洿鎺ュ湪鍘熸暟缁勪笂淇�敼
 		AddRoundKey(blk, expansionkey, round);
 	}
-	//第10轮:不进行列混合
+	//绗�10杞�細涓嶈繘琛屽垪娣峰悎
 	SubBytes(blk);
 	ShiftRows(blk);
 	AddRoundKey(blk, expansionkey, Nr);
 }
-//AES 解密总函数
+//AES 瑙e瘑鎬诲嚱鏁�
 void AesDecrypt(unsigned char *blk, unsigned char *expansionkey, int Nr)
 {
 	int x;
@@ -296,50 +296,50 @@ void AesDecrypt(unsigned char *blk, unsigned char *expansionkey, int Nr)
 	}
 	AddRoundKey(blk, expansionkey, 0);
 }
-/*//密钥编排,16字节--->44列32bit密钥生成--> 11组16字节:分别用于11轮 轮密钥加运算
+/*//瀵嗛挜缂栨帓锛�16瀛楄妭--->44鍒�32bit瀵嗛挜鐢熸垚--> 11缁�16瀛楄妭:鍒嗗埆鐢ㄤ簬11杞� 杞�瘑閽ュ姞杩愮畻
 Schedule a secret key for use.
 *outkey[] must be 16*15 bytes in size
 *Nk==number of 32 bit words in the key,e.g.,4,6,8
 *Nr==number of rounds,e.g.,10,12,14
 */
-void ScheduleKey(unsigned char *inkey, unsigned char *outkey, int Nk, int Nr)//安排一个保密密钥使用
+void ScheduleKey(unsigned char *inkey, unsigned char *outkey, int Nk, int Nr)//瀹夋帓涓€涓�繚瀵嗗瘑閽ヤ娇鐢�
 {
-	//inkey:初始16字节密钥key
-	//outkey:11组*16字节扩展密钥expansionkey
-	//Nk:4列
-	//Nr:10轮round
+	//inkey:鍒濆�16瀛楄妭瀵嗛挜key
+	//outkey锛�11缁�*16瀛楄妭鎵╁睍瀵嗛挜expansionkey
+	//Nk锛�4鍒�
+	//Nr锛�10杞畆ound
 	unsigned char temp[4], t;
 	int x, i;
 	/*copy the key*/
-	//第0组:[0-3]直接拷贝
+	//绗�0缁勶細[0-3]鐩存帴鎷疯礉
 	for (i = 0; i < (4 * Nk); i++)
 	{
 		outkey[i] = inkey[i];
 	}
-	//第1-10组:[4-43]
+	//绗�1-10缁勶細[4-43]
 	i = Nk;
-	while (i < (4 * (Nr + 1))) //i=4~43 WORD 32bit的首字节地址,每一个4字节
-	{//1次循环生成1个字节扩展密钥,4次循环生成一个WORD
-		//temp:4字节数组:代表一个WORD密钥
+	while (i < (4 * (Nr + 1))) //i=4~43 WORD 32bit鐨勯�瀛楄妭鍦板潃锛屾瘡涓€涓�4瀛楄妭
+	{//1娆″惊鐜�敓鎴�1涓�瓧鑺傛墿灞曞瘑閽ワ紝4娆″惊鐜�敓鎴愪竴涓猈ORD
+		//temp锛�4瀛楄妭鏁扮粍锛氫唬琛ㄤ竴涓猈ORD瀵嗛挜
 		/*temp=w[i-1]*/
-		//i不是4的倍数的时候
-		//每个temp = 每个outkey32bit = 4字节
+		//i涓嶆槸4鐨勫€嶆暟鐨勬椂鍊�
+		//姣忎釜temp = 姣忎釜outkey32bit = 4瀛楄妭
 		for (x = 0; x < 4; x++)
-			temp[x] = outkey[(4 * (i - 1)) + x];	//i:32bit的首字节地址
-		//i是4的倍数的时候
+			temp[x] = outkey[(4 * (i - 1)) + x];	//i锛�32bit鐨勯�瀛楄妭鍦板潃
+		//i鏄�4鐨勫€嶆暟鐨勬椂鍊�
 		if (i%Nk == 0)
 		{
-			/*字循环:循环左移1字节 RotWord()*/
+			/*瀛楀惊鐜�細寰�幆宸︾Щ1瀛楄妭 RotWord()*/
 			t = temp[0]; temp[0] = temp[1]; temp[1] = temp[2]; temp[2] = temp[3]; temp[3] = t;
-			/*字节代换:SubWord()*/
+			/*瀛楄妭浠f崲锛歋ubWord()*/
 			for (x = 0; x < 4; x++)
 			{
 				temp[x] = sbox[temp[x]];
 			}
-			/*轮常量异或:Rcon[j]*/
+			/*杞�父閲忓紓鎴栵細Rcon[j]*/
 			temp[0] ^= Rcon[(i / Nk) - 1];
 		}
-		//else if(Nk>6 && (i%Nk)==4)	//Nk>6的算法不同,暂时用不到
+		//else if(Nk>6 && (i%Nk)==4)	//Nk>6鐨勭畻娉曚笉鍚岋紝鏆傛椂鐢ㄤ笉鍒�
 		//{
 		//	/*SubWord*/
 		//	for(x=0;x<4;x++)
@@ -358,33 +358,33 @@ void ScheduleKey(unsigned char *inkey, unsigned char *outkey, int Nk, int Nr)//
 }
 
 /**
-* ECB 模式加密, 返回加密长度
+* ECB 妯″紡鍔犲瘑, 杩斿洖鍔犲瘑闀垮害
 */
 int ECBAesEncrypt(unsigned char *blk, unsigned char *expansionkey, int Nr)
 {
 	int k=0;
-	int len =fillSrcData(blk);
+	int len =fillSrcData((char*)blk);
 	for(k=0;k<len/AES_BLOCK_SIZE;k++)
 	{
-		AesEncrypt(blk+16*k, expansionkey, Nr);		//2、AES 加密
+		AesEncrypt(blk+16*k, expansionkey, Nr);		//2銆丄ES 鍔犲瘑
 	}
 	return len;
 }
 
 /**
-* ECB 模式解密
+* ECB 妯″紡瑙e瘑
 */
 void ECBAesDecrypt(unsigned char *blk,int len, unsigned char *expansionkey, int Nr)
 {
 	int k=0;
 	for(k=0;k<len/AES_BLOCK_SIZE;k++)
 	{
-		AesDecrypt(blk+16*k, expansionkey, Nr);		//2、AES 解密
+		AesDecrypt(blk+16*k, expansionkey, Nr);		//2銆丄ES 瑙e瘑
 	}
-	cutSrcData(blk);
+	cutSrcData((char*)blk);
 }
 /**
-* 填充源码,返回填充后的数据长度
+* 濉�厖婧愮爜,杩斿洖濉�厖鍚庣殑鏁版嵁闀垮害
 */
 int fillSrcData(char* data)
 {
@@ -400,7 +400,7 @@ int fillSrcData(char* data)
 }
 
 /**
-* 去除源码无效数据
+* 鍘婚櫎婧愮爜鏃犳晥鏁版嵁
 */
 void cutSrcData(char* data)
 {

+ 6 - 6
NET/Util/AES.h → Drivers/Encrypt/4GAES.h

@@ -1,5 +1,5 @@
-#ifndef _AES_H_
-#define _AES_H_
+#ifndef _4GAES_H_
+#define _4GAES_H_
 
 typedef struct aes_st{
 				unsigned char data[400];
@@ -9,13 +9,13 @@ typedef struct aes_st{
 #define AES_BLOCK_SIZE 16
 
 
-/* AES¼ÓÃÜ×ܺ¯Êý 10ÂÖ4Àà²Ù×÷ Encrypt a single block with Nr Rounds(10,12,14)*/
-void AesEncrypt(unsigned char *blk, unsigned char *expansionkey, int Nr);//¼ÓÃÜÒ»¸öÇø¿é
+/* AES加密总函数 10轮4类�作 Encrypt a single block with Nr Rounds(10,12,14)*/
+void AesEncrypt(unsigned char *blk, unsigned char *expansionkey, int Nr);//加密一个区�
 
-//AES ½âÃÜ×ܺ¯Êý
+//AES 解密总函数
 void AesDecrypt(unsigned char *blk, unsigned char *expansionkey, int Nr);
 
-void ScheduleKey(unsigned char *inkey, unsigned char *outkey, int Nk, int Nr);//°²ÅÅÒ»¸ö±£ÃÜÃÜԿʹÓÃ
+void ScheduleKey(unsigned char *inkey, unsigned char *outkey, int Nk, int Nr);//安排一个�密密钥使用
 
 int ECBAesEncrypt(unsigned char *blk, unsigned char *expansionkey, int Nr);
 

+ 52 - 13
NET/Util/mbedtls_util.c → Drivers/Encrypt/mbedtls_util.c

@@ -41,6 +41,25 @@ static int fillAESPKCS7Data(char* data)
 	return len;
 }
 
+
+static int fillAESPKCS7DataWithLength(uint8_t * data, uint16_t data_length)
+{
+	int left= 0;
+	int len = data_length;
+	if(len%AES_BLOCK_SIZE != 0)
+	{
+		left = AES_BLOCK_SIZE - data_length%AES_BLOCK_SIZE;
+		
+	}
+	else
+	{
+		left = AES_BLOCK_SIZE;
+	}
+	memset(data + data_length, left, left);
+	len += left;
+	return len;
+}
+
 /**
 * 去除源码无效数据
 */
@@ -103,7 +122,7 @@ void utils_hmac_sha1_str(const char *msg, int msg_len, char *digest, const char
 		
 }
 
-void utils_sha256(const char *msg, int msg_len, char *digest)
+void utils_sha256(const char *msg, int msg_len, char * digest)
 {
 
 		//hmac sha1加密处理
@@ -113,7 +132,7 @@ void utils_sha256(const char *msg, int msg_len, char *digest)
     mbedtls_sha256_init(&context);                                      /* init context for 1st pass */
     mbedtls_sha256_starts(&context,0);                                    /* setup context for 1st pass */
     mbedtls_sha256_update(&context, (unsigned char *) msg, msg_len);    /* then text of datagram */
-    mbedtls_sha256_finish(&context, digest);                               /* finish up 1st pass */
+    mbedtls_sha256_finish(&context, (unsigned char *) digest);                               /* finish up 1st pass */
     
 }
 
@@ -121,10 +140,10 @@ void utils_sha256_str(const char *msg, int msg_len, char *digest)
 {
 
 		//hmac sha1加密处理
-    mbedtls_sha256_context context;
+    //mbedtls_sha256_context context;
     unsigned char out[SHA256_DIGEST_SIZE];
 	
-		utils_sha256(msg,msg_len,out);
+		utils_sha256(msg,msg_len, (char * )out);
     
 	//加密后的数据16进制输出
 		byteToHexStr(out,digest,SHA256_DIGEST_SIZE);
@@ -137,7 +156,6 @@ void utils_sha256_str(const char *msg, int msg_len, char *digest)
 int utils_aes128_cbc_enc(char *aes_key, char *iv, char *plaintext, char *ciphertext)
 {
 
-		int i;
 		char iv_use[16] = {0};
 		char data[AES_LEN_SIZE]= {0};
 		mbedtls_aes_context aes_ctx;
@@ -148,8 +166,30 @@ int utils_aes128_cbc_enc(char *aes_key, char *iv, char *plaintext, char *ciphert
     
     mbedtls_aes_init(&aes_ctx);
     //setkey_dec
-    mbedtls_aes_setkey_enc(&aes_ctx, aes_key, 128);
-		mbedtls_aes_crypt_cbc(&aes_ctx, MBEDTLS_AES_ENCRYPT, len, iv_use, data, ciphertext);
+    mbedtls_aes_setkey_enc(&aes_ctx, (unsigned char * )aes_key, 128);
+		mbedtls_aes_crypt_cbc(&aes_ctx, MBEDTLS_AES_ENCRYPT, len, (unsigned char * )iv_use, (unsigned char * )data, (unsigned char * )ciphertext);
+    
+    mbedtls_aes_free(&aes_ctx);
+    return len; //OK
+
+}
+
+
+int utils_aes128_cbc_enc_with_length(char *aes_key, char *iv, uint8_t * plaintext, uint16_t plaintext_length, uint8_t * ciphertext)
+{
+
+		char iv_use[16] = {0};
+		uint8_t data[AES_LEN_SIZE]= {0};
+		mbedtls_aes_context aes_ctx;
+		if(plaintext_length + 16 > AES_LEN_SIZE) return -1;
+		memcpy(iv_use,iv,16);
+		memcpy(data, plaintext, plaintext_length);
+    int len = fillAESPKCS7DataWithLength(data, plaintext_length);
+    
+    mbedtls_aes_init(&aes_ctx);
+    //setkey_dec
+    mbedtls_aes_setkey_enc(&aes_ctx, (unsigned char * )aes_key, 128);
+		mbedtls_aes_crypt_cbc(&aes_ctx, MBEDTLS_AES_ENCRYPT, len, (unsigned char * )iv_use, (unsigned char * )data, (unsigned char * )ciphertext);
     
     mbedtls_aes_free(&aes_ctx);
     return len; //OK
@@ -162,15 +202,14 @@ int utils_aes128_cbc_enc(char *aes_key, char *iv, char *plaintext, char *ciphert
 int utils_aes128_cbc_dec(char *aes_key, char *iv, char *ciphertext, int len, char *plaintext)
 {
 
-		int i;
 		char iv_use[16] = {0};
 		mbedtls_aes_context aes_ctx;
 		if(len%16&&len>AES_LEN_SIZE) return 0;
 		memcpy(iv_use,iv,16);
     mbedtls_aes_init(&aes_ctx);
     //setkey_dec
-    mbedtls_aes_setkey_dec(&aes_ctx, aes_key, 128);
-		mbedtls_aes_crypt_cbc(&aes_ctx, MBEDTLS_AES_DECRYPT, len, iv_use, ciphertext, plaintext);
+    mbedtls_aes_setkey_dec(&aes_ctx, (unsigned char * )aes_key, 128);
+		mbedtls_aes_crypt_cbc(&aes_ctx, MBEDTLS_AES_DECRYPT, len, (unsigned char * )iv_use, (unsigned char * )ciphertext, (unsigned char * )plaintext);
     cutAESPKCS7Data(plaintext);
     mbedtls_aes_free(&aes_ctx);
     return strlen(plaintext); //OK
@@ -195,7 +234,7 @@ int utils_aes128_cbc_base64_enc(char *aes_key, char *iv, uint8_t *src,int dataLe
 			printf("base64 encode err:%d",ret);
 			return 0;
 		}
-		return utils_aes128_cbc_enc(aes_key,iv,buffer,ciphertext);
+		return utils_aes128_cbc_enc(aes_key,iv,(char * )buffer,ciphertext);
 		
 }
 
@@ -206,11 +245,11 @@ int utils_aes128_cbc_base64_dec(char *aes_key, char *iv, char *ciphertext, int d
 {
 		size_t len = 0;
     unsigned char buffer[AES_LEN_SIZE*2]={0};
-		int retlen = utils_aes128_cbc_dec(aes_key,iv,ciphertext,dataLen,buffer);
+		int retlen = utils_aes128_cbc_dec(aes_key,iv,ciphertext,dataLen,(char * )buffer);
 		if(retlen)
 		{
 			printf("base64_encode2:%s\r\n",buffer);
-			int ret = mbedtls_base64_decode( plaintext, plainLen, &len, buffer, retlen);
+			int ret = mbedtls_base64_decode((unsigned char * )plaintext, plainLen, &len, buffer, retlen);
 			if(ret)
 			{
 				printf("base64 decode err:%d,%d",ret,retlen);

+ 1 - 0
NET/Util/mbedtls_util.h → Drivers/Encrypt/mbedtls_util.h

@@ -11,6 +11,7 @@ void utils_sha256_str(const char *msg, int msg_len, char *digest);
 int utils_aes128_cbc_enc(char *aes_key, char *iv, char *plaintext, char *ciphertext);
 
 int utils_aes128_cbc_dec(char *aes_key, char *iv, char *ciphertext, int len, char *plaintext);
+int utils_aes128_cbc_enc_with_length(char *aes_key, char *iv, uint8_t * plaintext, uint16_t plaintext_length, uint8_t * ciphertext);
 
 int utils_aes128_cbc_base64_enc(char *aes_key, char *iv, uint8_t *src,int dataLen, char *ciphertext);
 

+ 125 - 0
Drivers/INflash.c

@@ -0,0 +1,125 @@
+#include "stm32f10x.h"
+#include "INflash.h"
+
+#include "AT.h"
+#include "string.h"
+Coefficient_Data flashdata;
+uint8_t register_success;
+u16 STMFLASH_BUF[STM32_SECTOR_SIZE/2];//最多是2K字节
+void write_to_flash(u32 WriteAddr,u16 *pBuffer,u16 NumToWrite)
+{
+    u16 i;
+	for(i=0;i<NumToWrite;i++)
+	{
+		FLASH_ProgramHalfWord(WriteAddr,pBuffer[i]);
+	    WriteAddr+=2;//地址增加2.
+	}  
+
+}
+//读取指定地址的半字(16位数据)
+//faddr:读地址(此地址必须为2的倍数!!)
+//返回值:对应数据.
+u16 STMFLASH_ReadHalfWord(u32 faddr)
+{
+	return *(vu16*)faddr; 
+}
+//从指定地址开始读出指定长度的数据
+//ReadAddr:起始地址
+//pBuffer:数据指针
+//NumToWrite:半字(16位)数
+void STMFLASH_Read(u32 ReadAddr,u16 *pBuffer,u16 NumToRead)   	
+{
+	u16 i;
+	for(i=0;i<NumToRead;i++)
+	{
+		pBuffer[i]=STMFLASH_ReadHalfWord(ReadAddr);//读取2个字节.
+		ReadAddr+=2;//偏移2个字节.	
+	}
+}
+void STMFLASH_Write(u32 WriteAddr,u16 *pBuffer,u16 NumToWrite)
+{
+  	u32 secpos;	   //扇区地址
+	u16 secoff;	   //扇区内偏移地址(16位字计算)
+	u16 secremain; //扇区内剩余地址(16位字计算)	   
+ 	u16 i;    
+	u32 offaddr;   //去掉0X08000000后的地址
+	if(WriteAddr<STM32_FLASH_BASE||(WriteAddr>=(STM32_FLASH_BASE+1024*STM32_FLASH_SIZE)))return;//非法地址
+	FLASH_Unlock();	
+	offaddr=WriteAddr-STM32_FLASH_BASE;		//实际偏移地址.
+	secpos=offaddr/STM32_SECTOR_SIZE;	 //扇区地址  0~127 for STM32F103RBT6
+	secoff=(offaddr%STM32_SECTOR_SIZE)/2;		//在扇区内的偏移(2个字节为基本单位.)
+	secremain=STM32_SECTOR_SIZE/2-secoff;		//扇区剩余空间大小  
+	if(NumToWrite<=secremain)secremain=NumToWrite;//不大于该扇区范围
+	while(1) 
+	{	
+		STMFLASH_Read(secpos*STM32_SECTOR_SIZE+STM32_FLASH_BASE,STMFLASH_BUF,STM32_SECTOR_SIZE/2);//读出整个扇区的内容
+		for(i=0;i<secremain;i++)//校验数据
+		{
+			if(STMFLASH_BUF[secoff+i]!=0XFFFF)break;//需要擦除  	  
+		}
+		if(i<secremain)//需要擦除
+		{
+			FLASH_ErasePage(secpos*STM32_SECTOR_SIZE+STM32_FLASH_BASE);//擦除这个扇区
+			for(i=0;i<secremain;i++)//复制
+			{
+				STMFLASH_BUF[i+secoff]=pBuffer[i];	  
+			}
+			write_to_flash(secpos*STM32_SECTOR_SIZE+STM32_FLASH_BASE,STMFLASH_BUF,STM32_SECTOR_SIZE/2);//写入整个扇区  
+		}else write_to_flash(WriteAddr,pBuffer,secremain);//写已经擦除了的,直接写入扇区剩余区间. 				   
+		if(NumToWrite==secremain)break;//写入结束了
+		else//写入未结束
+		{
+			secpos++;				//扇区地址增1
+			secoff=0;				//偏移位置为0 	 
+		   	pBuffer+=secremain;  	//指针偏移
+			WriteAddr+=secremain;	//写地址偏移	   
+		   	NumToWrite-=secremain;	//字节(16位)数递减
+			if(NumToWrite>(STM32_SECTOR_SIZE/2))secremain=STM32_SECTOR_SIZE/2;//下一个扇区还是写不完
+			else secremain=NumToWrite;//下一个扇区可以写完了
+		}	 
+	};	
+	FLASH_Lock();//上锁
+ 
+}
+//清空flash
+void clearflash(void){
+flashdata.read_flag=0;
+memcpy(flashdata.deviceSecret,"0",Secretsize);
+memcpy(flashdata.productKey,"0",productsize);
+memcpy(flashdata.deviceName,"0",productsize);
+delay_ms(10);
+STMFLASH_Write(FLASH_SAVE_ADDR,(u16*)&flashdata,sizeof(flashdata));
+}
+void storedata(void){
+
+flashdata.read_flag=1;
+Log_Printf_Debug("deviceSecret:%s,productKey:%s,deviceName:%s,read_flag:%d\r\n",flashdata.deviceSecret,flashdata.productKey,flashdata.deviceName,flashdata.read_flag);
+Log_Printf_Debug("结构体大小: %d\r\n", sizeof(Coefficient_Data));
+	
+     
+     delay_ms(10);
+    STMFLASH_Write(FLASH_SAVE_ADDR,(u16*)&flashdata,sizeof(flashdata));
+    flashdata.read_flag=0;
+    delay_ms(10);
+   Log_Printf_Debug("写入数据完成\r\n");
+   STMFLASH_Read(FLASH_SAVE_ADDR,(u16*)&flashdata,sizeof(flashdata));
+Log_Printf_Debug("读取完成read_flag:%d,deviceSecret:%s,productKey:%s,deviceName:%s\r\n",flashdata.read_flag,flashdata.deviceSecret,flashdata.productKey,flashdata.deviceName);
+
+}
+void store(void){
+
+
+
+if(register_success==1){
+    storedata();
+}
+else
+{
+Log_Printf_Debug("数据解析失败,没有存储flash\r\n");
+flashdata.read_flag=0;
+}
+
+
+
+}
+

+ 35 - 0
Drivers/INflash.h

@@ -0,0 +1,35 @@
+#ifndef __INFLASH_H
+#define __INFLASH_H
+#include "sys.h"
+//FLASH起始地址
+#define STM32_FLASH_BASE 0x08000000 	//STM32 FLASH的起始地址
+
+#define STM32_FLASH_SIZE 512 	 		//所选STM32的FLASH容量大小(单位为K)
+#define STM32_FLASH_WREN 1              //使能FLASH写入(0,不是能;1,使能)
+/* STM32F103扇区大小 */
+#if STM32_FLASH_SIZE < 256
+#define STM32_SECTOR_SIZE  1024		/* 容量小于256K的F103, 扇区大小为1K字节 */
+#else
+#define STM32_SECTOR_SIZE  2048		/* 容量大于等于256K的F103, 扇区大小为2K字节 */
+#endif
+
+#define FLASH_SAVE_ADDR  0X0807E000		//设置FLASH 保存地址(必须为偶数,且其值要大于本代码所占用FLASH的大小+0X08000000)
+
+#define Secretsize 50
+#define productsize  30
+#include "stm32f10x.h"
+
+void store(void);
+void clearflash(void);
+void STMFLASH_Read(uint32_t ReadAddr,uint16_t *pBuffer,uint16_t NumToRead);
+#pragma pack(1)
+ typedef struct{
+	char deviceSecret[Secretsize];
+	char productKey[productsize];
+    char deviceName[productsize];
+	uint8_t    read_flag;//判断存flash是否成功,从flash读取值为1代表成功
+}Coefficient_Data;
+
+#endif
+
+

+ 228 - 0
Drivers/Regist.c

@@ -0,0 +1,228 @@
+/**
+* 
+* title 实现http注册
+*/
+#include "stm32f10x.h"
+#include "Regist.h"
+#include "AT.h"
+#include "4GAES.h"
+#include "ec800m.h"
+#include "INflash.h"
+#include "sys.h"
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+#include "cJSON.h"
+extern valid_data_t valid_data;
+uint8_t mcu_id[8]="78945678";
+uint16_t Version_data = 1032;
+uint8_t regist_result =0;
+char registData[100] = {0};
+//uint8_t registlen=0;
+
+extern struct AT_Struct AT;
+unsigned char key[17]="tuorenzhinenghua";
+unsigned char expansionkey[15 * 16];
+extern Coefficient_Data flashdata;
+extern uint8_t register_success;
+//static uint8_t tcpcontextID = 1;
+static uint8_t tcpconnectID = 2;
+static char * REGIST_SERVER ="8337239yf4.yicp.fun" ; //注册服务器地址
+static uint16_t REGIST_PORT=22155; //端口号
+
+/**
+* 
+*注册信息打包
+*/
+enum Result packRegistDataAnd(uint8_t *length){
+	 enum Result result = Result_None;
+//	 int i=0;
+	int datalen = 0;
+	char qcciddata[31]={0};//
+     memset(registData,0, sizeof(registData));
+	char* dataPtr = registData+2; //dataPtr指针指向registData第三个字节
+	//复制muid,并转化为16进制
+	byteToHexStr(mcu_id, dataPtr, sizeof(mcu_id));
+	memcpy(dataPtr+strlen(dataPtr),"&",1);
+	//获取qccid
+	AT_Clear();
+	//get_qccid_flag=get_qccid(qcciddata);
+	result=ec800m.query_qccid_sync(qcciddata);
+	  if(result==Result_Failed)
+     {
+      return result;
+     }
+    //获取复制qccid
+	memcpy(dataPtr+strlen(dataPtr),qcciddata,31);
+	//复制版本号
+	snprintf(dataPtr+strlen(dataPtr),10,"&%d.%03d",Version_data/1000,Version_data%1000);
+	Log_Printf_Debug("device data:%s\r\n",dataPtr);//串口打印
+	Log_Printf_Debug("regist data:%s\r\n",registData+2);
+	ScheduleKey(key, expansionkey, 4, 10);//生成密钥
+	datalen = ECBAesEncrypt((unsigned char*)dataPtr, expansionkey, 10);		//2、AES 加密
+	registData[0] = datalen>>8;//头2个字节赋值数据长度
+	registData[1] = datalen;
+	Log_Printf_Debug("strlendata:%d,datalen=%d\r\n",strlen(dataPtr),datalen);
+	 *length=datalen+2;
+	 return Result_Success;
+}
+/**
+* 
+*注册数据解密
+*/
+enum Result analysis_recvdata()
+{
+	enum Result result = Result_None;
+	uint8_t recvdata[512]={0};
+	uint16_t recvdata_length=0;
+  cJSON *json = NULL,*json_productKey = NULL,*json_deviceName = NULL,*json_deviceSecret = NULL;
+  result =ec800m.recv_with_time_sync(tcpconnectID,recvdata,&recvdata_length,10000);
+     if(result==Result_Failed)
+ {
+   return result;
+ }
+ 	memset(valid_data.buf, 0, sizeof(valid_data.buf));
+    memcpy(valid_data.buf,recvdata,recvdata_length);
+  ScheduleKey(key, expansionkey, 4, 10);
+  valid_data.len=recvdata_length;
+  ECBAesDecrypt((unsigned char*)valid_data.buf,valid_data.len, expansionkey, 10);//AES 解密
+  			json = cJSON_Parse(valid_data.buf);
+		if(!json)
+			{
+				Log_Printf_Debug("json parse error,%s\r\n",cJSON_GetErrorPtr());
+				cJSON_Delete(json);
+				cJSON_Delete(json_productKey);
+				cJSON_Delete(json_deviceName);//json_deviceSecret
+				cJSON_Delete(json_deviceSecret);
+				return Result_Failed;
+		
+			}else{
+				json_deviceSecret = cJSON_GetObjectItem(json,"deviceSecret");
+				json_productKey = cJSON_GetObjectItem(json,"productKey");
+				json_deviceName = cJSON_GetObjectItem(json,"deviceName");
+				Log_Printf_Debug("获取数据成功deviceSecret:%s,json_productKey:%s,deviceName:%s\r\n",json_deviceSecret->valuestring,json_productKey->valuestring,json_deviceName->valuestring);
+				memcpy(flashdata.deviceSecret,json_deviceSecret->valuestring,Secretsize);
+                memcpy(flashdata.productKey,json_productKey->valuestring,productsize);
+				memcpy(flashdata.deviceName,json_deviceName->valuestring,productsize);
+				memset(&register_success, 1, sizeof(register_success));
+				cJSON_Delete(json);
+				cJSON_Delete(json_productKey);
+				cJSON_Delete(json_deviceName);//json_deviceSecret
+				cJSON_Delete(json_deviceSecret);
+				
+				return Result_Success;
+			
+			}
+}
+uint8_t regist_Handle()
+{
+ uint8_t stat,length=0;
+	uint16_t lac,err=0;
+	uint32_t ci=0;
+ enum Result result = Result_None;
+ ec800m.enter_sleep();//退出休眠
+
+  result=ec800m.set_sleep_sync(1);//设置休眠模式
+  if(result==Result_Failed)
+ {
+   return 0;
+ }
+  result=ec800m.set_cfun_sync(1);//设置全功能模式
+ 
+  if(result==Result_Failed)
+ {
+   return 0;
+ }
+    result=ec800m.set_cgreg_sync(2);//设置网络状态
+  if(result==Result_Failed)
+ {
+   return 0;
+ }
+  
+ 
+for(int i=0;i<20;i++){
+ delay_ms(400);
+result=ec800m.query_cgreg_sync(&regist_result,&stat,&lac,&ci);//循环查询网络状态最多20次
+	if(stat==1)
+	{i=20;
+	
+	}
+}
+
+  if(result==Result_Failed)
+ {
+   return 0;
+ }
+   if(stat==0)
+ {
+	  Log_Printf_Debug(" stat=%d\r\n", stat);
+   return 0;
+ }
+  //tcp连接流程
+  result=ec800m.open_socket_sync(tcpconnectID,"TCP",REGIST_SERVER,REGIST_PORT,1,&err);//连接tcp
+  if(result==Result_Failed)
+ {
+	Log_Printf_Debug(" result=%d\r\n", result);
+   return 0;
+ }
+ 
+ if(result==Result_Failed)
+ {
+   return 0;
+ }
+  result =(enum Result)packRegistDataAnd(&length);//数据打包
+  Log_Printf_Debug("data length=%d\r\n", length);
+   if(result==Result_Failed)
+ {
+   return 0;
+ }
+ result =ec800m.send_sync(tcpconnectID,(uint8_t *)registData,length);//数据发送
+    if(result==Result_Failed)
+ {
+   return 0;
+ }
+
+   result =analysis_recvdata();
+    if(result==Result_Failed)
+ {
+   return 0;
+ }
+ 
+ result=ec800m.close_socket_sync(tcpconnectID);//断开tcp连接
+  if(result==Result_Failed)
+ {
+   return 0;
+ }
+  result=ec800m.set_cfun_sync(0);//设置最小功能模式
+ 
+  if(result==Result_Failed)
+ {
+   return 0;
+ }
+
+ ec800m.enter_sleep();//进入休眠状态
+  return 1;
+}
+uint8_t regist_device(void)
+{
+ flashdata.read_flag=0;
+ uint8_t regist_flag=0;
+ Log_Printf_Debug("读取前read_flag:%d\r\n",flashdata.read_flag);
+ STMFLASH_Read(FLASH_SAVE_ADDR,(u16*)&flashdata,sizeof(flashdata));//读取flash
+ delay_ms(10);
+ if(flashdata.read_flag==1)
+ {
+	 Log_Printf_Debug("读取flash成功read_flag:%d,\ndeviceSecret:%s,\n productKey:%s,\ndeviceName:%s\r\n",flashdata.read_flag,flashdata.deviceSecret,flashdata.productKey,flashdata.deviceName); 
+ return 1;
+ }
+ regist_flag=regist_Handle();//注册流程
+ if(regist_flag==0)//注册流程失败不储存flash
+ {
+  return 0;
+ }
+ store();//存储到flash
+  return 1;
+}
+
+

+ 12 - 0
Drivers/Regist.h

@@ -0,0 +1,12 @@
+#ifndef __REGIST_H
+#define __REGIST_H
+#include <stdint.h>
+
+
+
+
+
+
+
+uint8_t regist_device(void);
+#endif

+ 14 - 9
NET/Util/cJSON.c → Drivers/Utils/cJSON.c

@@ -96,9 +96,9 @@ CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void)
     return (const char*) (global_error.json + global_error.position);
 }
 
-CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item) 
+CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item)
 {
-    if (!cJSON_IsString(item)) 
+    if (!cJSON_IsString(item))
     {
         return NULL;
     }
@@ -106,9 +106,9 @@ CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item)
     return item->valuestring;
 }
 
-CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item) 
+CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item)
 {
-    if (!cJSON_IsNumber(item)) 
+    if (!cJSON_IsNumber(item))
     {
         return (double) NAN;
     }
@@ -117,7 +117,7 @@ CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item)
 }
 
 /* This is a safeguard to prevent copy-pasters from using incompatible C and header files */
-#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 15)
+#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 16)
     #error cJSON.h and cJSON.c have different versions. Make sure that both have the same.
 #endif
 
@@ -511,7 +511,7 @@ static unsigned char* ensure(printbuffer * const p, size_t needed)
 
             return NULL;
         }
-        
+
         memcpy(newbuffer, p->buffer, p->offset + 1);
         p->hooks.deallocate(p->buffer);
     }
@@ -1107,7 +1107,7 @@ CJSON_PUBLIC(cJSON *) cJSON_ParseWithLengthOpts(const char *value, size_t buffer
     }
 
     buffer.content = (const unsigned char*)value;
-    buffer.length = buffer_length; 
+    buffer.length = buffer_length;
     buffer.offset = 0;
     buffer.hooks = global_hooks;
 
@@ -2291,7 +2291,7 @@ CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON
 
 CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement)
 {
-    if ((parent == NULL) || (replacement == NULL) || (item == NULL))
+    if ((parent == NULL) || (parent->child == NULL) || (replacement == NULL) || (item == NULL))
     {
         return false;
     }
@@ -2361,6 +2361,11 @@ static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSO
         cJSON_free(replacement->string);
     }
     replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks);
+    if (replacement->string == NULL)
+    {
+        return false;
+    }
+
     replacement->type &= ~cJSON_StringIsConst;
 
     return cJSON_ReplaceItemViaPointer(object, get_object_item(object, string, case_sensitive), replacement);
@@ -2693,7 +2698,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int co
     if (a && a->child) {
         a->child->prev = n;
     }
-    
+
     return a;
 }
 

+ 8 - 1
NET/Util/cJSON.h → Drivers/Utils/cJSON.h

@@ -81,7 +81,7 @@ then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJ
 /* project version */
 #define CJSON_VERSION_MAJOR 1
 #define CJSON_VERSION_MINOR 7
-#define CJSON_VERSION_PATCH 15
+#define CJSON_VERSION_PATCH 16
 
 #include <stddef.h>
 
@@ -279,6 +279,13 @@ CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number);
 /* Change the valuestring of a cJSON_String object, only takes effect when type of object is cJSON_String */
 CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring);
 
+/* If the object is not a boolean type this does nothing and returns cJSON_Invalid else it returns the new type*/
+#define cJSON_SetBoolValue(object, boolValue) ( \
+    (object != NULL && ((object)->type & (cJSON_False|cJSON_True))) ? \
+    (object)->type=((object)->type &(~(cJSON_False|cJSON_True)))|((boolValue)?cJSON_True:cJSON_False) : \
+    cJSON_Invalid\
+)
+
 /* Macro for iterating over an array or object */
 #define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)
 

+ 34 - 28
NET/Util/sys.c → Drivers/Utils/sys.c

@@ -47,7 +47,6 @@ void byteToHexStr(const unsigned char* source, char* dest, int sourceLen)
 */
 void letterSwitch(char *str, int flag)
 {
-    int data;
     while (*str != '\0')
     {
         if (flag)
@@ -106,24 +105,6 @@ int my_atoi(char *str)
     return n;
 }
 
-/**
-* 整形字符串转整形数字绝对值
-*/
-int my_atoabs(char *str)
-{
-    int n = 0;
-    if(*str == '-')
-    {
-        str++;
-    }
-    while(*str >= '0' && *str <= '9')
-    {
-        n = n*10 + (*str - '0');
-        str++;
-    }
-    return n;
-}
-
 /**
 * 整形转字符串
 * num:待转的数据,str:目标地址,radix:进制2,8,10,16
@@ -198,14 +179,14 @@ char* my_itoa(int num,char* str,int radix)
 * @Title split,分割字符串
 * @Param src:源数据, separator:分割符, dest:目标地址, limit:分割限制数量
 */
-int splitCharLimit(char *str, char seprator, char *dest[], int limit) 
+void splitCharLimit(char *str, char seprator, char *dest[], int limit) 
 {
 	int i, length, ct = 0, start = -1;
 	length = strlen(str);
 	for (i = 0; i <= length; i++) {
 		if (start == -1 && limit <= ct + 1) {
 			dest[ct] = &str[i];
-			return ct+1;
+			break;
 		}
 		if (str[i] == seprator) {
 			if (start != -1) {
@@ -222,19 +203,44 @@ int splitCharLimit(char *str, char seprator, char *dest[], int limit)
 		}
 
 	}
-	return ct+1;
 
 }
 
- void delay_ms(uint32_t ms)
+void delay_us(uint32_t xus)
 {
-	unsigned int i,j;  
-		for(j=0;j<ms;j++)
-			{ 
-		     for(i=0;i<1500;i++); 
-			} 
+	SysTick->LOAD = 72 * xus;				//设置定时器重装值
+	SysTick->VAL = 0x00;					//清空当前计数值
+	SysTick->CTRL = 0x00000005;				//设置时钟源为HCLK,启动定时器
+	while(!(SysTick->CTRL & 0x00010000));	//等待计数到0
+	SysTick->CTRL = 0x00000004;				//关闭定时器
 }
 
+/**
+  * @brief  毫秒级延时
+  * @param  xms 延时时长,范围:0~4294967295
+  * @retval 无
+  */
+void delay_ms(uint32_t xms)
+{
+	while(xms--)
+	{
+		delay_us(1000);
+	}
+}
+ 
+/**
+  * @brief  秒级延时
+  * @param  xs 延时时长,范围:0~4294967295
+  * @retval 无
+  */
+void delay_s(uint32_t xs)
+{
+	while(xs--)
+	{
+		delay_ms(1000);
+	}
+} 
+
 /************************************************************
 *	函数名称:	Usart_SendString
 *

+ 5 - 4
NET/Util/sys.h → Drivers/Utils/sys.h

@@ -98,8 +98,6 @@ void letterSwitch(char *str, int flag);
 
 int my_atoi(char *str);
 
-int my_atoabs(char *str);
-
 char* my_itoa(int num,char* str,int radix);
 
 /**
@@ -112,13 +110,16 @@ void split(char *src,const char *separator,char *dest[],int size);
 * @Title split,分割字符串
 * @Param 要分割字符串,seperator:分隔符, dest:分割后字符串地址,limit:分割限制数量
 */
-int splitCharLimit(char *str, char seprator, char *dest[], int limit);
+void splitCharLimit(char *str, char seprator, char *dest[], int limit);
  
  /**
 * @title 延时函数
 * @Param ms:延时时间(单位ms)
 */
- void delay_ms(uint32_t ms);
+
+void delay_ms(uint32_t ms);
+ void delay_us(uint32_t us);
+void delay_s(uint32_t s);
 
 void Usart_SendString(USART_TypeDef *USARTx, unsigned char *str, unsigned short len);
 

+ 9 - 0
EventRecorderStub.scvd

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
+
+<component name="EventRecorderStub" version="1.0.0"/>       <!--name and version of the component-->
+  <events>
+  </events>
+
+</component_viewer>

+ 62 - 0
Examples/Demo001.c

@@ -0,0 +1,62 @@
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "stm32f10x.h"
+#include "Usart1.h"
+
+#include "EC800M.h"
+#include "EC800M_MQTT_Client4.h"
+
+// 发送一个AT指令的例子
+// #include "EC800M.h"
+void demo001(void)
+{
+	static uint8_t send_AT_CSQ_flag = 0;
+	uint8_t ID = 3;
+	
+	if(send_AT_CSQ_flag == 0)
+	{
+		send_AT_CSQ_flag = EC800M_Send_AT_CSQ(ID);
+//		Usart1_Printf("发送csq\r\n");
+	}
+	else if(EC800M_Get_ID_AT_CSQ() != ID){}
+	else if(EC800M_Get_Flag_AT_CSQ() == AT_FLAG_RETURN_OK) // 返回成功
+	{
+//		Usart1_Printf("csq返回成功\r\n");
+		EC800M_Clear_AT_CSQ(); // 清除AT指令状态
+	}
+	else if(EC800M_Get_Flag_AT_CSQ() == AT_FLAG_RETURN_ERROR) // 返回错误
+	{
+//		Usart1_Printf("csq返回错误\r\n");
+		EC800M_Clear_AT_CSQ(); // 清除AT指令状态
+	}
+	else if(EC800M_Get_Flag_AT_CSQ() == AT_FLAG_RETURN_OVERTIME) // 返回超时
+	{
+//		Usart1_Printf("csq返回超时\r\n");
+		EC800M_Clear_AT_CSQ(); // 清除AT指令状态
+	}
+}
+
+
+// 发送数据的例子
+// #include "EC800M_MQTT_Client4.h"
+void demo002(void)
+{
+	static uint8_t send_flag = 0;
+	uint8_t bytes[15] = { 0xEF, 0x11}; // 待发送的数据
+	if(send_flag == 0)
+	{
+		send_flag = EC800M_MQTT_Client4_Send(bytes, 15);
+	}
+	
+	
+	if(EC800M_MQTT_Client4_Get_Flag() == CLIENT4_FLAG_DONE)
+	{
+//		Usart1_Printf("发送成功: %d, %d\r\n", EC800M_MQTT_Client4_Get_Flag(), EC800M_MQTT_Client4_Get_Result());
+		EC800M_MQTT_Client4_Clear(); // 清除发送状态
+//		Usart1_Printf("清除成功: %d, %d\r\n", EC800M_MQTT_Client4_Get_Flag(), EC800M_MQTT_Client4_Get_Result());
+	}
+}
+
+

+ 25 - 0
Hardware/Buzzer.c

@@ -0,0 +1,25 @@
+#include "stm32f10x.h"                  // Device header
+
+void Buzzer_Init(void)
+{
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
+	
+	GPIO_InitTypeDef GPIO_InitStruture;
+	GPIO_InitStruture.GPIO_Mode = GPIO_Mode_Out_PP;
+	GPIO_InitStruture.GPIO_Pin = GPIO_Pin_12;
+	GPIO_InitStruture.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(GPIOB, &GPIO_InitStruture);
+	
+	GPIO_ResetBits(GPIOB, GPIO_Pin_12);
+}
+
+void Buzzer_ON(void)
+{
+	GPIO_SetBits(GPIOB, GPIO_Pin_12);
+}
+
+void Buzzer_OFF(void)
+{
+	GPIO_ResetBits(GPIOB, GPIO_Pin_12);
+}
+

+ 9 - 0
Hardware/Buzzer.h

@@ -0,0 +1,9 @@
+#ifndef __BUZZER_H
+#define __BUZZER_H
+
+
+void Buzzer_Init(void);
+void Buzzer_ON(void);
+void Buzzer_OFF(void);
+
+#endif

+ 20 - 0
Hardware/GPIOA.c

@@ -0,0 +1,20 @@
+#include "stm32f10x.h"                  // Device header
+#include "AT.h"
+void GPIOA_Init(void)
+{
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE, ENABLE);
+	
+	GPIO_InitTypeDef GPIO_InitStructure;
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
+	GPIO_InitStructure.GPIO_Pin = WAKE_GPIO_Pin;
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(WAKE_GPIO, &GPIO_InitStructure);
+	
+	GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin); // À­¸ß
+//	GPIO_ResetBits(GPIOA, GPIO_Pin_6); // À­µÍ
+}
+
+
+
+
+

+ 7 - 0
Hardware/GPIOA.h

@@ -0,0 +1,7 @@
+#ifndef __GPIOA_H
+#define __GPIOA_H
+
+void GPIOA_Init(void);
+//#define WAKE_GPIO GPIOE
+//#define WAKE_GPIO_Pin GPIO_Pin_5 // ˯ÃßµÄÒý½Å
+#endif

+ 47 - 0
Hardware/InfraredSensor.c

@@ -0,0 +1,47 @@
+#include "stm32f10x.h"                  // Device header
+
+uint16_t Count;
+
+void InfraredSensor_Init(void)
+{
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
+	
+	GPIO_InitTypeDef GPIO_InitStructure;
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_14;
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(GPIOB, &GPIO_InitStructure);
+	
+	GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource14);
+	
+	EXTI_InitTypeDef EXTI_InitStructure;
+	EXTI_InitStructure.EXTI_Line = EXTI_Line14;
+	EXTI_InitStructure.EXTI_LineCmd = ENABLE;
+	EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
+	EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
+	EXTI_Init(&EXTI_InitStructure);
+	
+	NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
+	
+	NVIC_InitTypeDef NVIC_InitStructure;
+	NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
+	NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
+	NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
+	NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
+	NVIC_Init(&NVIC_InitStructure);
+}
+
+uint16_t InfraredSensor_Get_Count(void)
+{
+	return Count;
+}
+
+void EXTI15_10_IRQHandler(void)
+{
+	if (EXTI_GetITStatus(EXTI_Line14) == SET)
+	{
+		Count ++;
+		EXTI_ClearITPendingBit(EXTI_Line14);
+	}
+}

+ 8 - 0
Hardware/InfraredSensor.h

@@ -0,0 +1,8 @@
+#ifndef __INFRARED_SENSOR_H
+#define __INFRARED_SENSOR_H
+#include "stdint.h"
+
+void InfraredSensor_Init(void);
+uint16_t InfraredSensor_Get_Count(void);
+
+#endif

+ 37 - 0
Hardware/Key.c

@@ -0,0 +1,37 @@
+#include "stm32f10x.h"                  // Device header
+#include "Delay.h"
+
+void Key_Init(void)
+{
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
+	
+	GPIO_InitTypeDef GPIO_InitStructure;
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_11;
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(GPIOB, &GPIO_InitStructure);
+	
+}
+
+
+uint8_t Key_GetNum(void)
+{
+	uint8_t KeyNum = 0;
+	if (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_1) == 0)
+	{
+		Delay_ms(20);
+		while (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_1) == 0);
+		Delay_ms(20);
+		KeyNum = 1;
+	}
+	if (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_11) == 0)
+	{
+		Delay_ms(20);
+		while (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_11) == 0);
+		Delay_ms(20);
+		KeyNum = 2;
+	}
+	
+	return KeyNum;
+}
+

+ 9 - 0
Hardware/Key.h

@@ -0,0 +1,9 @@
+#ifndef __KEY_H
+#define __KEY_H
+#include <stdint.h>
+
+void Key_Init(void);
+uint8_t Key_GetNum(void);
+
+
+#endif

+ 60 - 0
Hardware/LED.c

@@ -0,0 +1,60 @@
+#include "stm32f10x.h"                  // Device header
+
+void LED_Init(void)
+{
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
+	
+	GPIO_InitTypeDef GPIO_InitStructure;
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2;
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(GPIOA, &GPIO_InitStructure);
+	
+	GPIO_SetBits(GPIOA, GPIO_Pin_1 | GPIO_Pin_2);
+}
+
+
+void LED1_ON(void)
+{
+	GPIO_ResetBits(GPIOA, GPIO_Pin_1);
+}
+
+void LED1_OFF(void)
+{
+	GPIO_SetBits(GPIOA, GPIO_Pin_1);
+}
+
+void LED1_Turn(void)
+{
+	if (GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_1) == 0)
+	{
+		GPIO_SetBits(GPIOA, GPIO_Pin_1);
+	}
+	else
+	{
+		GPIO_ResetBits(GPIOA, GPIO_Pin_1);
+	}
+}
+
+void LED2_ON(void)
+{
+	GPIO_ResetBits(GPIOA, GPIO_Pin_2);
+}
+
+void LED2_OFF(void)
+{
+	GPIO_SetBits(GPIOA, GPIO_Pin_2);
+}
+
+void LED2_Turn(void)
+{
+	if (GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_2) == 0)
+	{
+		GPIO_SetBits(GPIOA, GPIO_Pin_2);
+	}
+	else
+	{
+		GPIO_ResetBits(GPIOA, GPIO_Pin_2);
+	}
+}
+

+ 12 - 0
Hardware/LED.h

@@ -0,0 +1,12 @@
+#ifndef __LED_H
+#define __LED_H
+
+void LED_Init(void);
+void LED1_ON(void);
+void LED1_OFF(void);
+void LED1_Turn(void);
+void LED2_ON(void);
+void LED2_OFF(void);
+void LED2_Turn(void);
+
+#endif

+ 20 - 0
Hardware/LightSensor.c

@@ -0,0 +1,20 @@
+#include "stm32f10x.h"                  // Device header
+
+void LightSensor_Init(void)
+{
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
+	
+	GPIO_InitTypeDef GPIO_InitStructure;
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13;
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(GPIOB, &GPIO_InitStructure);
+	
+}
+
+
+uint8_t GetLightSensor_Status(void)
+{
+	return GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_13);
+}
+

+ 9 - 0
Hardware/LightSensor.h

@@ -0,0 +1,9 @@
+#ifndef __LIGHTSENSOR_H
+#define __LIGHTSENSOR_H
+#include <stdint.h>
+
+void LightSensor_Init(void);
+uint8_t GetLightSensor_Status(void);
+
+#endif
+

+ 339 - 0
Hardware/OLED.c

@@ -0,0 +1,339 @@
+#include "stm32f10x.h"
+#include "OLED_Font.h"
+
+/*引脚配置*/
+#define OLED_W_SCL(x)		GPIO_WriteBit(GPIOB, GPIO_Pin_8, (BitAction)(x))
+#define OLED_W_SDA(x)		GPIO_WriteBit(GPIOB, GPIO_Pin_9, (BitAction)(x))
+
+/*引脚初始化*/
+void OLED_I2C_Init(void)
+{
+    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
+	
+	GPIO_InitTypeDef GPIO_InitStructure;
+ 	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
+ 	GPIO_Init(GPIOB, &GPIO_InitStructure);
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
+ 	GPIO_Init(GPIOB, &GPIO_InitStructure);
+	
+	OLED_W_SCL(1);
+	OLED_W_SDA(1);
+}
+
+/**
+  * @brief  I2C开始
+  * @param  无
+  * @retval 无
+  */
+void OLED_I2C_Start(void)
+{
+	OLED_W_SDA(1);
+	OLED_W_SCL(1);
+	OLED_W_SDA(0);
+	OLED_W_SCL(0);
+}
+
+/**
+  * @brief  I2C停止
+  * @param  无
+  * @retval 无
+  */
+void OLED_I2C_Stop(void)
+{
+	OLED_W_SDA(0);
+	OLED_W_SCL(1);
+	OLED_W_SDA(1);
+}
+
+/**
+  * @brief  I2C发送一个字节
+  * @param  Byte 要发送的一个字节
+  * @retval 无
+  */
+void OLED_I2C_SendByte(uint8_t Byte)
+{
+	uint8_t i;
+	for (i = 0; i < 8; i++)
+	{
+		OLED_W_SDA(Byte & (0x80 >> i));
+		OLED_W_SCL(1);
+		OLED_W_SCL(0);
+	}
+	OLED_W_SCL(1);	//额外的一个时钟,不处理应答信号
+	OLED_W_SCL(0);
+}
+
+/**
+  * @brief  OLED写命令
+  * @param  Command 要写入的命令
+  * @retval 无
+  */
+void OLED_WriteCommand(uint8_t Command)
+{
+	OLED_I2C_Start();
+	OLED_I2C_SendByte(0x78);		//从机地址
+	OLED_I2C_SendByte(0x00);		//写命令
+	OLED_I2C_SendByte(Command); 
+	OLED_I2C_Stop();
+}
+
+/**
+  * @brief  OLED写数据
+  * @param  Data 要写入的数据
+  * @retval 无
+  */
+void OLED_WriteData(uint8_t Data)
+{
+	OLED_I2C_Start();
+	OLED_I2C_SendByte(0x78);		//从机地址
+	OLED_I2C_SendByte(0x40);		//写数据
+	OLED_I2C_SendByte(Data);
+	OLED_I2C_Stop();
+}
+
+/**
+  * @brief  OLED设置光标位置
+  * @param  Y 以左上角为原点,向下方向的坐标,范围:0~7
+  * @param  X 以左上角为原点,向右方向的坐标,范围:0~127
+  * @retval 无
+  */
+void OLED_SetCursor(uint8_t Y, uint8_t X)
+{
+	OLED_WriteCommand(0xB0 | Y);					//设置Y位置
+	OLED_WriteCommand(0x10 | ((X & 0xF0) >> 4));	//设置X位置高4位
+	OLED_WriteCommand(0x00 | (X & 0x0F));			//设置X位置低4位
+}
+
+/**
+  * @brief  OLED清屏
+  * @param  无
+  * @retval 无
+  */
+void OLED_Clear(void)
+{  
+	uint8_t i, j;
+	for (j = 0; j < 8; j++)
+	{
+		OLED_SetCursor(j, 0);
+		for(i = 0; i < 128; i++)
+		{
+			OLED_WriteData(0x00);
+		}
+	}
+}
+
+/**
+  * @brief  OLED清屏一行
+  * @param  无
+  * @retval 无
+  */
+void OLED_Clear_Row(uint8_t Row)
+{  
+	uint8_t i, j;
+	for (j = (Row - 1)*2; j < (Row - 1)*2 + 2; j++)
+	{
+		OLED_SetCursor(j, 0);
+		for(i = 0; i < 128; i++)
+		{
+			OLED_WriteData(0x00);
+		}
+	}
+}
+
+/**
+  * @brief  OLED显示一个字符
+  * @param  Line 行位置,范围:1~4
+  * @param  Column 列位置,范围:1~16
+  * @param  Char 要显示的一个字符,范围:ASCII可见字符
+  * @retval 无
+  */
+void OLED_ShowChar(uint8_t Line, uint8_t Column, char Char)
+{      	
+	uint8_t i;
+	OLED_SetCursor((Line - 1) * 2, (Column - 1) * 8);		//设置光标位置在上半部分
+	for (i = 0; i < 8; i++)
+	{
+		OLED_WriteData(OLED_F8x16[Char - ' '][i]);			//显示上半部分内容
+	}
+	OLED_SetCursor((Line - 1) * 2 + 1, (Column - 1) * 8);	//设置光标位置在下半部分
+	for (i = 0; i < 8; i++)
+	{
+		OLED_WriteData(OLED_F8x16[Char - ' '][i + 8]);		//显示下半部分内容
+	}
+}
+
+/**
+  * @brief  OLED显示字符串
+  * @param  Line 起始行位置,范围:1~4
+  * @param  Column 起始列位置,范围:1~16
+  * @param  String 要显示的字符串,范围:ASCII可见字符
+  * @retval 无
+  */
+void OLED_ShowString(uint8_t Line, uint8_t Column, char *String)
+{
+	uint8_t i;
+	for (i = 0; String[i] != '\0'; i++)
+	{
+		OLED_ShowChar(Line, Column + i, String[i]);
+	}
+}
+
+/**
+  * @brief  OLED次方函数
+  * @retval 返回值等于X的Y次方
+  */
+uint32_t OLED_Pow(uint32_t X, uint32_t Y)
+{
+	uint32_t Result = 1;
+	while (Y--)
+	{
+		Result *= X;
+	}
+	return Result;
+}
+
+/**
+  * @brief  OLED显示数字(十进制,正数)
+  * @param  Line 起始行位置,范围:1~4
+  * @param  Column 起始列位置,范围:1~16
+  * @param  Number 要显示的数字,范围:0~4294967295
+  * @param  Length 要显示数字的长度,范围:1~10
+  * @retval 无
+  */
+void OLED_ShowNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length)
+{
+	uint8_t i;
+	for (i = 0; i < Length; i++)							
+	{
+		OLED_ShowChar(Line, Column + i, Number / OLED_Pow(10, Length - i - 1) % 10 + '0');
+	}
+}
+
+/**
+  * @brief  OLED显示数字(十进制,带符号数)
+  * @param  Line 起始行位置,范围:1~4
+  * @param  Column 起始列位置,范围:1~16
+  * @param  Number 要显示的数字,范围:-2147483648~2147483647
+  * @param  Length 要显示数字的长度,范围:1~10
+  * @retval 无
+  */
+void OLED_ShowSignedNum(uint8_t Line, uint8_t Column, int32_t Number, uint8_t Length)
+{
+	uint8_t i;
+	uint32_t Number1;
+	if (Number >= 0)
+	{
+		OLED_ShowChar(Line, Column, '+');
+		Number1 = Number;
+	}
+	else
+	{
+		OLED_ShowChar(Line, Column, '-');
+		Number1 = -Number;
+	}
+	for (i = 0; i < Length; i++)							
+	{
+		OLED_ShowChar(Line, Column + i + 1, Number1 / OLED_Pow(10, Length - i - 1) % 10 + '0');
+	}
+}
+
+/**
+  * @brief  OLED显示数字(十六进制,正数)
+  * @param  Line 起始行位置,范围:1~4
+  * @param  Column 起始列位置,范围:1~16
+  * @param  Number 要显示的数字,范围:0~0xFFFFFFFF
+  * @param  Length 要显示数字的长度,范围:1~8
+  * @retval 无
+  */
+void OLED_ShowHexNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length)
+{
+	uint8_t i, SingleNumber;
+	for (i = 0; i < Length; i++)							
+	{
+		SingleNumber = Number / OLED_Pow(16, Length - i - 1) % 16;
+		if (SingleNumber < 10)
+		{
+			OLED_ShowChar(Line, Column + i, SingleNumber + '0');
+		}
+		else
+		{
+			OLED_ShowChar(Line, Column + i, SingleNumber - 10 + 'A');
+		}
+	}
+}
+
+/**
+  * @brief  OLED显示数字(二进制,正数)
+  * @param  Line 起始行位置,范围:1~4
+  * @param  Column 起始列位置,范围:1~16
+  * @param  Number 要显示的数字,范围:0~1111 1111 1111 1111
+  * @param  Length 要显示数字的长度,范围:1~16
+  * @retval 无
+  */
+void OLED_ShowBinNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length)
+{
+	uint8_t i;
+	for (i = 0; i < Length; i++)							
+	{
+		OLED_ShowChar(Line, Column + i, Number / OLED_Pow(2, Length - i - 1) % 2 + '0');
+	}
+}
+
+/**
+  * @brief  OLED初始化
+  * @param  无
+  * @retval 无
+  */
+void OLED_Init(void)
+{
+	uint32_t i, j;
+	
+	for (i = 0; i < 1000; i++)			//上电延时
+	{
+		for (j = 0; j < 1000; j++);
+	}
+	
+	OLED_I2C_Init();			//端口初始化
+	
+	OLED_WriteCommand(0xAE);	//关闭显示
+	
+	OLED_WriteCommand(0xD5);	//设置显示时钟分频比/振荡器频率
+	OLED_WriteCommand(0x80);
+	
+	OLED_WriteCommand(0xA8);	//设置多路复用率
+	OLED_WriteCommand(0x3F);
+	
+	OLED_WriteCommand(0xD3);	//设置显示偏移
+	OLED_WriteCommand(0x00);
+	
+	OLED_WriteCommand(0x40);	//设置显示开始行
+	
+	OLED_WriteCommand(0xA1);	//设置左右方向,0xA1正常 0xA0左右反置
+	
+	OLED_WriteCommand(0xC8);	//设置上下方向,0xC8正常 0xC0上下反置
+
+	OLED_WriteCommand(0xDA);	//设置COM引脚硬件配置
+	OLED_WriteCommand(0x12);
+	
+	OLED_WriteCommand(0x81);	//设置对比度控制
+	OLED_WriteCommand(0xCF);
+
+	OLED_WriteCommand(0xD9);	//设置预充电周期
+	OLED_WriteCommand(0xF1);
+
+	OLED_WriteCommand(0xDB);	//设置VCOMH取消选择级别
+	OLED_WriteCommand(0x30);
+
+	OLED_WriteCommand(0xA4);	//设置整个显示打开/关闭
+
+	OLED_WriteCommand(0xA6);	//设置正常/倒转显示
+
+	OLED_WriteCommand(0x8D);	//设置充电泵
+	OLED_WriteCommand(0x14);
+
+	OLED_WriteCommand(0xAF);	//开启显示
+		
+	OLED_Clear();				//OLED清屏
+}

+ 15 - 0
Hardware/OLED.h

@@ -0,0 +1,15 @@
+#ifndef __OLED_H
+#define __OLED_H
+#include <stdint.h>
+
+void OLED_Init(void);
+void OLED_Clear(void);
+void OLED_Clear_Row(uint8_t Row);
+void OLED_ShowChar(uint8_t Line, uint8_t Column, char Char);
+void OLED_ShowString(uint8_t Line, uint8_t Column, char *String);
+void OLED_ShowNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length);
+void OLED_ShowSignedNum(uint8_t Line, uint8_t Column, int32_t Number, uint8_t Length);
+void OLED_ShowHexNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length);
+void OLED_ShowBinNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length);
+
+#endif

+ 294 - 0
Hardware/OLED_Font.h

@@ -0,0 +1,294 @@
+#ifndef __OLED_FONT_H
+#define __OLED_FONT_H
+#include <stdint.h>
+
+/*OLED字模库,宽8像素,高16像素*/
+const uint8_t OLED_F8x16[][16]=
+{
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//  0
+	
+	0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,
+	0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 1
+	
+	0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 2
+	
+	0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,
+	0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 3
+	
+	0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,
+	0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 4
+	
+	0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,
+	0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 5
+	
+	0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,
+	0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 6
+	
+	0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 7
+	
+	0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,
+	0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 8
+	
+	0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,
+	0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 9
+	
+	0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,
+	0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 10
+	
+	0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,
+	0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 11
+	
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+	0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 12
+	
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+	0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 13
+	
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+	0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 14
+	
+	0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,
+	0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 15
+	
+	0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,
+	0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 16
+	
+	0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,
+	0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 17
+	
+	0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,
+	0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 18
+	
+	0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,
+	0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 19
+	
+	0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,
+	0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 20
+	
+	0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,
+	0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 21
+	
+	0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,
+	0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 22
+	
+	0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,
+	0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 23
+	
+	0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,
+	0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 24
+	
+	0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,
+	0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 25
+	
+	0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,
+	0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 26
+	
+	0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,
+	0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 27
+	
+	0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,
+	0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 28
+	
+	0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,
+	0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 29
+	
+	0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,
+	0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 30
+	
+	0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,
+	0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 31
+	
+	0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,
+	0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 32
+	
+	0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,
+	0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 33
+	
+	0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,
+	0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 34
+	
+	0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,
+	0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 35
+	
+	0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,
+	0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 36
+	
+	0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,
+	0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 37
+	
+	0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,
+	0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 38
+	
+	0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,
+	0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 39
+	
+	0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,
+	0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 40
+	
+	0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,
+	0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 41
+	
+	0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,
+	0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 42
+	
+	0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,
+	0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 43
+	
+	0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,
+	0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 44
+	
+	0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,
+	0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 45
+	
+	0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,
+	0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 46
+	
+	0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,
+	0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 47
+	
+	0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,
+	0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 48
+	
+	0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,
+	0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 49
+	
+	0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,
+	0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 50
+	
+	0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,
+	0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 51
+	
+	0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,
+	0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 52
+	
+	0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,
+	0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 53
+	
+	0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,
+	0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 54
+	
+	0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,
+	0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 55
+	
+	0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,
+	0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 56
+	
+	0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,
+	0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 57
+	
+	0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,
+	0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 58
+	
+	0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,
+	0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 59
+	
+	0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,
+	0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 60
+	
+	0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,
+	0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 61
+	
+	0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 62
+	
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+	0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 63
+	
+	0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 64
+	
+	0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,
+	0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 65
+	
+	0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,
+	0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 66
+	
+	0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,
+	0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 67
+	
+	0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,
+	0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 68
+	
+	0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,
+	0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 69
+	
+	0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,
+	0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 70
+	
+	0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,
+	0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 71
+	
+	0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,
+	0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 72
+	
+	0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,
+	0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 73
+	
+	0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,
+	0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 74
+	
+	0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,
+	0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 75
+	
+	0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,
+	0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 76
+	
+	0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,
+	0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 77
+	
+	0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,
+	0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 78
+	
+	0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,
+	0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 79
+	
+	0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,
+	0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 80
+	
+	0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,
+	0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 81
+	
+	0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,
+	0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 82
+	
+	0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,
+	0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 83
+	
+	0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,
+	0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 84
+	
+	0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,
+	0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 85
+	
+	0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,
+	0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 86
+	
+	0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,
+	0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 87
+	
+	0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,
+	0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 88
+	
+	0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,
+	0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 89
+	
+	0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,
+	0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 90
+	
+	0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,
+	0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 91
+	
+	0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,
+	0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 92
+	
+	0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,
+	0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 93
+	
+	0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
+};
+
+#endif

+ 82 - 0
Hardware/Usart1.c

@@ -0,0 +1,82 @@
+#include "stm32f10x.h"
+#include <stdio.h>
+#include <stdarg.h>
+
+
+
+void Usart1_Init(void)
+{
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE);
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
+	
+	GPIO_InitTypeDef GPIO_InitStructure;
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(GPIOA, &GPIO_InitStructure);
+	
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(GPIOA, &GPIO_InitStructure);
+	
+	USART_InitTypeDef USART_InitStruture;
+	USART_InitStruture.USART_BaudRate = 115200;
+	USART_InitStruture.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
+	USART_InitStruture.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
+	USART_InitStruture.USART_Parity = USART_Parity_No;
+	USART_InitStruture.USART_StopBits = USART_StopBits_1;
+	USART_InitStruture.USART_WordLength = USART_WordLength_8b;
+	USART_Init(USART1, &USART_InitStruture);
+	
+	USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);
+	
+	NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
+	
+	NVIC_InitTypeDef NVIC_InitStructure;
+	NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
+	NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
+	NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 3;
+	NVIC_InitStructure.NVIC_IRQChannelSubPriority = 3;
+	NVIC_Init(&NVIC_InitStructure);
+	
+	USART_Cmd(USART1, ENABLE);
+	
+}
+
+// 串口打印日志
+//void USART1_SendByte(uint8_t Byte)
+//{
+//	USART_SendData(USART1, Byte);
+//	while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET);
+//}
+//// 打印字节
+//void USART1_SendArray(uint8_t * arr, uint16_t len)
+//{
+//	uint16_t i;
+//	for(i = 0; i < len; i ++)
+//	{
+//		USART1_SendByte(arr[i]);
+//	}
+//}
+//// 打印字符串
+//void USART1_SendString(char *String)
+//{
+//	uint16_t i;
+//	for(i = 0; String[i] != '\0'; i ++)
+//	{
+//		USART1_SendByte(String[i]);
+//	}
+//}
+//// 打印的缓存
+//char USART1_String[512];
+//void USART1_Printf(char *format, ...)
+//{
+//	va_list arg;
+//	va_start(arg, format);
+//	vsprintf(USART1_String, format, arg);
+//	va_end(arg);
+//	USART1_SendString(USART1_String);
+//}
+
+

+ 16 - 0
Hardware/Usart1.h

@@ -0,0 +1,16 @@
+#ifndef __USART1_H
+#define __USART1_H
+#include <stdint.h>
+#include <stdio.h>
+
+
+
+void Usart1_Init(void);
+
+//void USART1_SendByte(uint8_t Byte);
+//void USART1_SendArray(uint8_t * arr, uint16_t len);
+//void USART1_SendString(char *String);
+//void USART1_Printf(char *format, ...);
+
+
+#endif

+ 50 - 0
Hardware/Usart2.c

@@ -0,0 +1,50 @@
+#include "stm32f10x.h"
+#include <stdio.h>
+#include <stdarg.h>
+
+void Usart2_Init(void)
+{
+	RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE);
+	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
+	
+	USART_DeInit(USART2);
+	
+	GPIO_InitTypeDef GPIO_InitStructure;
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
+	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+	GPIO_Init(GPIOA, &GPIO_InitStructure);
+	
+	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
+	GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
+	GPIO_Init(GPIOA, &GPIO_InitStructure);
+	
+	USART_InitTypeDef USART_InitStruture;
+	USART_InitStruture.USART_BaudRate = 115200;
+	USART_InitStruture.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
+	USART_InitStruture.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
+	USART_InitStruture.USART_Parity = USART_Parity_No;
+	USART_InitStruture.USART_StopBits = USART_StopBits_1;
+	USART_InitStruture.USART_WordLength = USART_WordLength_8b;
+	
+	USART_Init(USART2, &USART_InitStruture);
+	
+	USART_ITConfig(USART2, USART_IT_RXNE, ENABLE);
+	
+	NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
+	
+	NVIC_InitTypeDef NVIC_InitStructure;
+	NVIC_InitStructure.NVIC_IRQChannel = USART2_IRQn;
+	NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
+	NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
+	NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
+	NVIC_Init(&NVIC_InitStructure);
+	
+	
+	
+	USART_Cmd(USART2, ENABLE);
+	
+}
+
+
+

+ 10 - 0
Hardware/Usart2.h

@@ -0,0 +1,10 @@
+#ifndef __USART2_H
+#define __USART2_H
+#include <stdint.h>
+#include <stdio.h>
+
+
+void Usart2_Init(void);
+
+
+#endif

+ 4 - 0
Project/JLinkSettings.ini → JLinkSettings.ini

@@ -15,6 +15,8 @@ OverrideMemMap = 0
 AllowSimulation = 1
 ScriptFile=""
 [FLASH]
+Loaders=""
+EraseType = 0x00
 CacheExcludeSize = 0x00
 CacheExcludeAddr = 0x00
 MinNumBytesFlashDL = 0
@@ -37,3 +39,5 @@ RdOverrideAddr = 0xFFFFFFFF
 WrOverrideOrMask = 0x00
 WrOverrideAndMask = 0xFFFFFFFF
 WrOverrideAddr = 0xFFFFFFFF
+[RAM]
+VerifyDownload = 0x00

+ 0 - 473
Libraries/Startup/TrueSTUDIO/startup_stm32f10x_cl.s

@@ -1,473 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_cl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Connectivity line Devices vector table for Atollic
-  *            toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR
-  *                  address.
-  *                - Configure the clock system
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-
-  .syntax unified
-	.cpu cortex-m3
-	.fpu softvfp
-	.thumb
-
-.global	g_pfnVectors
-.global	Default_Handler
-
-/* start address for the initialization values of the .data section.
-defined in linker script */
-.word	_sidata
-/* start address for the .data section. defined in linker script */
-.word	_sdata
-/* end address for the .data section. defined in linker script */
-.word	_edata
-/* start address for the .bss section. defined in linker script */
-.word	_sbss
-/* end address for the .bss section. defined in linker script */
-.word	_ebss
-
-.equ  BootRAM, 0xF1E0F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called.
- * @param  None
- * @retval : None
-*/
-
-    .section	.text.Reset_Handler
-	.weak	Reset_Handler
-	.type	Reset_Handler, %function
-Reset_Handler:
-
-/* Copy the data segment initializers from flash to SRAM */
-  movs	r1, #0
-  b	LoopCopyDataInit
-
-CopyDataInit:
-	ldr	r3, =_sidata
-	ldr	r3, [r3, r1]
-	str	r3, [r0, r1]
-	adds	r1, r1, #4
-
-LoopCopyDataInit:
-	ldr	r0, =_sdata
-	ldr	r3, =_edata
-	adds	r2, r0, r1
-	cmp	r2, r3
-	bcc	CopyDataInit
-	ldr	r2, =_sbss
-	b	LoopFillZerobss
-
-/* Zero fill the bss segment. */
-FillZerobss:
-	movs	r3, #0
-	str	r3, [r2], #4
-
-LoopFillZerobss:
-	ldr	r3, = _ebss
-	cmp	r2, r3
-	bcc	FillZerobss
-
-/* Call the clock system intitialization function.*/
-  	bl  SystemInit
-/* Call static constructors */
-    bl __libc_init_array
-/* Call the application's entry point.*/
-	bl	main
-	bx	lr
-.size	Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- *
- * @param  None
- * @retval : None
-*/
-    .section	.text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-	b	Infinite_Loop
-	.size	Default_Handler, .-Default_Handler
-
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3.  Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/
- 	.section	.isr_vector,"a",%progbits
-	.type	g_pfnVectors, %object
-	.size	g_pfnVectors, .-g_pfnVectors
-
-
-g_pfnVectors:
-	.word	_estack
-	.word	Reset_Handler
-	.word	NMI_Handler
-	.word	HardFault_Handler
-	.word	MemManage_Handler
-	.word	BusFault_Handler
-	.word	UsageFault_Handler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	SVC_Handler
-	.word	DebugMon_Handler
-	.word	0
-	.word	PendSV_Handler
-	.word	SysTick_Handler
-	.word	WWDG_IRQHandler
-	.word	PVD_IRQHandler
-	.word	TAMPER_IRQHandler
-	.word	RTC_IRQHandler
-	.word	FLASH_IRQHandler
-	.word	RCC_IRQHandler
-	.word	EXTI0_IRQHandler
-	.word	EXTI1_IRQHandler
-	.word	EXTI2_IRQHandler
-	.word	EXTI3_IRQHandler
-	.word	EXTI4_IRQHandler
-	.word	DMA1_Channel1_IRQHandler
-	.word	DMA1_Channel2_IRQHandler
-	.word	DMA1_Channel3_IRQHandler
-	.word	DMA1_Channel4_IRQHandler
-	.word	DMA1_Channel5_IRQHandler
-	.word	DMA1_Channel6_IRQHandler
-	.word	DMA1_Channel7_IRQHandler
-	.word	ADC1_2_IRQHandler
-  .word CAN1_TX_IRQHandler
-  .word CAN1_RX0_IRQHandler
- 	.word	CAN1_RX1_IRQHandler
-	.word	CAN1_SCE_IRQHandler
-	.word	EXTI9_5_IRQHandler
-	.word	TIM1_BRK_IRQHandler
-	.word	TIM1_UP_IRQHandler
-	.word	TIM1_TRG_COM_IRQHandler
-	.word	TIM1_CC_IRQHandler
-	.word	TIM2_IRQHandler
-	.word	TIM3_IRQHandler
-	.word	TIM4_IRQHandler
-	.word	I2C1_EV_IRQHandler
-	.word	I2C1_ER_IRQHandler
-	.word	I2C2_EV_IRQHandler
-	.word	I2C2_ER_IRQHandler
-	.word	SPI1_IRQHandler
-	.word	SPI2_IRQHandler
-	.word	USART1_IRQHandler
-	.word	USART2_IRQHandler
-	.word	USART3_IRQHandler
-	.word	EXTI15_10_IRQHandler
-	.word	RTCAlarm_IRQHandler
-	.word	OTG_FS_WKUP_IRQHandler
-  .word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word TIM5_IRQHandler
-  .word SPI3_IRQHandler
-  .word UART4_IRQHandler
-  .word UART5_IRQHandler
-  .word TIM6_IRQHandler
-  .word TIM7_IRQHandler
-  .word DMA2_Channel1_IRQHandler
-  .word DMA2_Channel2_IRQHandler
-  .word DMA2_Channel3_IRQHandler
-  .word DMA2_Channel4_IRQHandler
-  .word DMA2_Channel5_IRQHandler
-  .word ETH_IRQHandler
-  .word ETH_WKUP_IRQHandler
-  .word CAN2_TX_IRQHandler
-  .word CAN2_RX0_IRQHandler
-  .word CAN2_RX1_IRQHandler
-  .word CAN2_SCE_IRQHandler
-  .word OTG_FS_IRQHandler
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word BootRAM     /* @0x1E0. This is for boot in RAM mode for
-                         STM32F10x Connectivity line Devices. */
-
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler.
-* As they are weak aliases, any function with the same name will override
-* this definition.
-*
-*******************************************************************************/
-  .weak	NMI_Handler
-	.thumb_set NMI_Handler,Default_Handler
-
-  .weak	HardFault_Handler
-	.thumb_set HardFault_Handler,Default_Handler
-
-  .weak	MemManage_Handler
-	.thumb_set MemManage_Handler,Default_Handler
-
-  .weak	BusFault_Handler
-	.thumb_set BusFault_Handler,Default_Handler
-
-	.weak	UsageFault_Handler
-	.thumb_set UsageFault_Handler,Default_Handler
-
-	.weak	SVC_Handler
-	.thumb_set SVC_Handler,Default_Handler
-
-	.weak	DebugMon_Handler
-	.thumb_set DebugMon_Handler,Default_Handler
-
-	.weak	PendSV_Handler
-	.thumb_set PendSV_Handler,Default_Handler
-
-	.weak	SysTick_Handler
-	.thumb_set SysTick_Handler,Default_Handler
-
-	.weak	WWDG_IRQHandler
-	.thumb_set WWDG_IRQHandler,Default_Handler
-
-	.weak	PVD_IRQHandler
-	.thumb_set PVD_IRQHandler,Default_Handler
-
-	.weak	TAMPER_IRQHandler
-	.thumb_set TAMPER_IRQHandler,Default_Handler
-
-	.weak	RTC_IRQHandler
-	.thumb_set RTC_IRQHandler,Default_Handler
-
-	.weak	FLASH_IRQHandler
-	.thumb_set FLASH_IRQHandler,Default_Handler
-
-	.weak	RCC_IRQHandler
-	.thumb_set RCC_IRQHandler,Default_Handler
-
-	.weak	EXTI0_IRQHandler
-	.thumb_set EXTI0_IRQHandler,Default_Handler
-
-	.weak	EXTI1_IRQHandler
-	.thumb_set EXTI1_IRQHandler,Default_Handler
-
-	.weak	EXTI2_IRQHandler
-	.thumb_set EXTI2_IRQHandler,Default_Handler
-
-	.weak	EXTI3_IRQHandler
-	.thumb_set EXTI3_IRQHandler,Default_Handler
-
-	.weak	EXTI4_IRQHandler
-	.thumb_set EXTI4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel1_IRQHandler
-	.thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel2_IRQHandler
-	.thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel3_IRQHandler
-	.thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel4_IRQHandler
-	.thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel5_IRQHandler
-	.thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel6_IRQHandler
-	.thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel7_IRQHandler
-	.thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-	.weak	ADC1_2_IRQHandler
-	.thumb_set ADC1_2_IRQHandler,Default_Handler
-
-	.weak	CAN1_TX_IRQHandler
-	.thumb_set CAN1_TX_IRQHandler,Default_Handler
-
-	.weak	CAN1_RX0_IRQHandler
-	.thumb_set CAN1_RX0_IRQHandler,Default_Handler
-
-	.weak	CAN1_RX1_IRQHandler
-	.thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-	.weak	CAN1_SCE_IRQHandler
-	.thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-	.weak	EXTI9_5_IRQHandler
-	.thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-	.weak	TIM1_BRK_IRQHandler
-	.thumb_set TIM1_BRK_IRQHandler,Default_Handler
-
-	.weak	TIM1_UP_IRQHandler
-	.thumb_set TIM1_UP_IRQHandler,Default_Handler
-
-	.weak	TIM1_TRG_COM_IRQHandler
-	.thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
-
-	.weak	TIM1_CC_IRQHandler
-	.thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-	.weak	TIM2_IRQHandler
-	.thumb_set TIM2_IRQHandler,Default_Handler
-
-	.weak	TIM3_IRQHandler
-	.thumb_set TIM3_IRQHandler,Default_Handler
-
-	.weak	TIM4_IRQHandler
-	.thumb_set TIM4_IRQHandler,Default_Handler
-
-	.weak	I2C1_EV_IRQHandler
-	.thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-	.weak	I2C1_ER_IRQHandler
-	.thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-	.weak	I2C2_EV_IRQHandler
-	.thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-	.weak	I2C2_ER_IRQHandler
-	.thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-	.weak	SPI1_IRQHandler
-	.thumb_set SPI1_IRQHandler,Default_Handler
-
-	.weak	SPI2_IRQHandler
-	.thumb_set SPI2_IRQHandler,Default_Handler
-
-	.weak	USART1_IRQHandler
-	.thumb_set USART1_IRQHandler,Default_Handler
-
-	.weak	USART2_IRQHandler
-	.thumb_set USART2_IRQHandler,Default_Handler
-
-	.weak	USART3_IRQHandler
-	.thumb_set USART3_IRQHandler,Default_Handler
-
-	.weak	EXTI15_10_IRQHandler
-	.thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-	.weak	RTCAlarm_IRQHandler
-	.thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-	.weak	OTG_FS_WKUP_IRQHandler
-	.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
-
-	.weak	TIM5_IRQHandler
-	.thumb_set TIM5_IRQHandler,Default_Handler
-
-	.weak	SPI3_IRQHandler
-	.thumb_set SPI3_IRQHandler,Default_Handler
-
-	.weak	UART4_IRQHandler
-	.thumb_set UART4_IRQHandler,Default_Handler
-
-	.weak	UART5_IRQHandler
-	.thumb_set UART5_IRQHandler,Default_Handler
-
-	.weak	TIM6_IRQHandler
-	.thumb_set TIM6_IRQHandler,Default_Handler
-
-	.weak	TIM7_IRQHandler
-	.thumb_set TIM7_IRQHandler,Default_Handler
-
-	.weak	DMA2_Channel1_IRQHandler
-	.thumb_set DMA2_Channel1_IRQHandler,Default_Handler
-
-	.weak	DMA2_Channel2_IRQHandler
-	.thumb_set DMA2_Channel2_IRQHandler,Default_Handler
-
-	.weak	DMA2_Channel3_IRQHandler
-	.thumb_set DMA2_Channel3_IRQHandler,Default_Handler
-
-	.weak	DMA2_Channel4_IRQHandler
-	.thumb_set DMA2_Channel4_IRQHandler,Default_Handler
-
-	.weak	DMA2_Channel5_IRQHandler
-	.thumb_set DMA2_Channel5_IRQHandler,Default_Handler
-
-	.weak	ETH_IRQHandler
-	.thumb_set ETH_IRQHandler,Default_Handler
-
-	.weak	ETH_WKUP_IRQHandler
-	.thumb_set ETH_WKUP_IRQHandler,Default_Handler
-
-	.weak	CAN2_TX_IRQHandler
-	.thumb_set CAN2_TX_IRQHandler,Default_Handler
-
-	.weak	CAN2_RX0_IRQHandler
-	.thumb_set CAN2_RX0_IRQHandler,Default_Handler
-
-	.weak	CAN2_RX1_IRQHandler
-	.thumb_set CAN2_RX1_IRQHandler,Default_Handler
-
-	.weak	CAN2_SCE_IRQHandler
-	.thumb_set CAN2_SCE_IRQHandler,Default_Handler
-
-	.weak	OTG_FS_IRQHandler
-	.thumb_set OTG_FS_IRQHandler ,Default_Handler
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 469
Libraries/Startup/TrueSTUDIO/startup_stm32f10x_hd.s

@@ -1,469 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_hd.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x High Density Devices vector table for Atollic toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address,
-  *                - Configure the clock system  
-  *                - Configure external SRAM mounted on STM3210E-EVAL board
-  *                  to be used as data memory (optional, to be enabled by user)
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-
-    .syntax unified
-	.cpu cortex-m3
-	.fpu softvfp
-	.thumb
-
-.global	g_pfnVectors
-.global	Default_Handler
-
-/* start address for the initialization values of the .data section.
-defined in linker script */
-.word	_sidata
-/* start address for the .data section. defined in linker script */
-.word	_sdata
-/* end address for the .data section. defined in linker script */
-.word	_edata
-/* start address for the .bss section. defined in linker script */
-.word	_sbss
-/* end address for the .bss section. defined in linker script */
-.word	_ebss
-
-.equ  BootRAM,        0xF1E0F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called.
- * @param  None
- * @retval : None
-*/
-
-    .section	.text.Reset_Handler
-	.weak	Reset_Handler
-	.type	Reset_Handler, %function
-Reset_Handler:
-
-/* Copy the data segment initializers from flash to SRAM */
-  movs	r1, #0
-  b	LoopCopyDataInit
-
-CopyDataInit:
-	ldr	r3, =_sidata
-	ldr	r3, [r3, r1]
-	str	r3, [r0, r1]
-	adds	r1, r1, #4
-
-LoopCopyDataInit:
-	ldr	r0, =_sdata
-	ldr	r3, =_edata
-	adds	r2, r0, r1
-	cmp	r2, r3
-	bcc	CopyDataInit
-	ldr	r2, =_sbss
-	b	LoopFillZerobss
-/* Zero fill the bss segment. */
-FillZerobss:
-	movs	r3, #0
-	str	r3, [r2], #4
-
-LoopFillZerobss:
-	ldr	r3, = _ebss
-	cmp	r2, r3
-	bcc	FillZerobss
-
-/* Call the clock system intitialization function.*/
-    bl  SystemInit
-/* Call static constructors */
-    bl __libc_init_array
-/* Call the application's entry point.*/
-	bl	main
-	bx	lr
-.size	Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- *
- * @param  None
- * @retval : None
-*/
-    .section	.text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-	b	Infinite_Loop
-	.size	Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3.  Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/
- 	.section	.isr_vector,"a",%progbits
-	.type	g_pfnVectors, %object
-	.size	g_pfnVectors, .-g_pfnVectors
-
-
-g_pfnVectors:
-	.word	_estack
-	.word	Reset_Handler
-	.word	NMI_Handler
-	.word	HardFault_Handler
-	.word	MemManage_Handler
-	.word	BusFault_Handler
-	.word	UsageFault_Handler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	SVC_Handler
-	.word	DebugMon_Handler
-	.word	0
-	.word	PendSV_Handler
-	.word	SysTick_Handler
-	.word	WWDG_IRQHandler
-	.word	PVD_IRQHandler
-	.word	TAMPER_IRQHandler
-	.word	RTC_IRQHandler
-	.word	FLASH_IRQHandler
-	.word	RCC_IRQHandler
-	.word	EXTI0_IRQHandler
-	.word	EXTI1_IRQHandler
-	.word	EXTI2_IRQHandler
-	.word	EXTI3_IRQHandler
-	.word	EXTI4_IRQHandler
-	.word	DMA1_Channel1_IRQHandler
-	.word	DMA1_Channel2_IRQHandler
-	.word	DMA1_Channel3_IRQHandler
-	.word	DMA1_Channel4_IRQHandler
-	.word	DMA1_Channel5_IRQHandler
-	.word	DMA1_Channel6_IRQHandler
-	.word	DMA1_Channel7_IRQHandler
-	.word	ADC1_2_IRQHandler
-	.word	USB_HP_CAN1_TX_IRQHandler
-	.word	USB_LP_CAN1_RX0_IRQHandler
-	.word	CAN1_RX1_IRQHandler
-	.word	CAN1_SCE_IRQHandler
-	.word	EXTI9_5_IRQHandler
-	.word	TIM1_BRK_IRQHandler
-	.word	TIM1_UP_IRQHandler
-	.word	TIM1_TRG_COM_IRQHandler
-	.word	TIM1_CC_IRQHandler
-	.word	TIM2_IRQHandler
-	.word	TIM3_IRQHandler
-	.word	TIM4_IRQHandler
-	.word	I2C1_EV_IRQHandler
-	.word	I2C1_ER_IRQHandler
-	.word	I2C2_EV_IRQHandler
-	.word	I2C2_ER_IRQHandler
-	.word	SPI1_IRQHandler
-	.word	SPI2_IRQHandler
-	.word	USART1_IRQHandler
-	.word	USART2_IRQHandler
-	.word	USART3_IRQHandler
-	.word	EXTI15_10_IRQHandler
-	.word	RTCAlarm_IRQHandler
-	.word	USBWakeUp_IRQHandler
-	.word	TIM8_BRK_IRQHandler
-	.word	TIM8_UP_IRQHandler
-	.word	TIM8_TRG_COM_IRQHandler
-	.word	TIM8_CC_IRQHandler
-	.word	ADC3_IRQHandler
-	.word	FSMC_IRQHandler
-	.word	SDIO_IRQHandler
-	.word	TIM5_IRQHandler
-	.word	SPI3_IRQHandler
-	.word	UART4_IRQHandler
-	.word	UART5_IRQHandler
-	.word	TIM6_IRQHandler
-	.word	TIM7_IRQHandler
-	.word	DMA2_Channel1_IRQHandler
-	.word	DMA2_Channel2_IRQHandler
-	.word	DMA2_Channel3_IRQHandler
-	.word	DMA2_Channel4_5_IRQHandler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	BootRAM       /* @0x1E0. This is for boot in RAM mode for
-                         STM32F10x High Density devices. */
-
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler.
-* As they are weak aliases, any function with the same name will override
-* this definition.
-*
-*******************************************************************************/
-
-  .weak	NMI_Handler
-	.thumb_set NMI_Handler,Default_Handler
-
-  .weak	HardFault_Handler
-	.thumb_set HardFault_Handler,Default_Handler
-
-  .weak	MemManage_Handler
-	.thumb_set MemManage_Handler,Default_Handler
-
-  .weak	BusFault_Handler
-	.thumb_set BusFault_Handler,Default_Handler
-
-	.weak	UsageFault_Handler
-	.thumb_set UsageFault_Handler,Default_Handler
-
-	.weak	SVC_Handler
-	.thumb_set SVC_Handler,Default_Handler
-
-	.weak	DebugMon_Handler
-	.thumb_set DebugMon_Handler,Default_Handler
-
-	.weak	PendSV_Handler
-	.thumb_set PendSV_Handler,Default_Handler
-
-	.weak	SysTick_Handler
-	.thumb_set SysTick_Handler,Default_Handler
-
-	.weak	WWDG_IRQHandler
-	.thumb_set WWDG_IRQHandler,Default_Handler
-
-	.weak	PVD_IRQHandler
-	.thumb_set PVD_IRQHandler,Default_Handler
-
-	.weak	TAMPER_IRQHandler
-	.thumb_set TAMPER_IRQHandler,Default_Handler
-
-	.weak	RTC_IRQHandler
-	.thumb_set RTC_IRQHandler,Default_Handler
-
-	.weak	FLASH_IRQHandler
-	.thumb_set FLASH_IRQHandler,Default_Handler
-
-	.weak	RCC_IRQHandler
-	.thumb_set RCC_IRQHandler,Default_Handler
-
-	.weak	EXTI0_IRQHandler
-	.thumb_set EXTI0_IRQHandler,Default_Handler
-
-	.weak	EXTI1_IRQHandler
-	.thumb_set EXTI1_IRQHandler,Default_Handler
-
-	.weak	EXTI2_IRQHandler
-	.thumb_set EXTI2_IRQHandler,Default_Handler
-
-	.weak	EXTI3_IRQHandler
-	.thumb_set EXTI3_IRQHandler,Default_Handler
-
-	.weak	EXTI4_IRQHandler
-	.thumb_set EXTI4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel1_IRQHandler
-	.thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel2_IRQHandler
-	.thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel3_IRQHandler
-	.thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel4_IRQHandler
-	.thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel5_IRQHandler
-	.thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel6_IRQHandler
-	.thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel7_IRQHandler
-	.thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-	.weak	ADC1_2_IRQHandler
-	.thumb_set ADC1_2_IRQHandler,Default_Handler
-
-	.weak	USB_HP_CAN1_TX_IRQHandler
-	.thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
-
-	.weak	USB_LP_CAN1_RX0_IRQHandler
-	.thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
-
-	.weak	CAN1_RX1_IRQHandler
-	.thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-	.weak	CAN1_SCE_IRQHandler
-	.thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-	.weak	EXTI9_5_IRQHandler
-	.thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-	.weak	TIM1_BRK_IRQHandler
-	.thumb_set TIM1_BRK_IRQHandler,Default_Handler
-
-	.weak	TIM1_UP_IRQHandler
-	.thumb_set TIM1_UP_IRQHandler,Default_Handler
-
-	.weak	TIM1_TRG_COM_IRQHandler
-	.thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
-
-	.weak	TIM1_CC_IRQHandler
-	.thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-	.weak	TIM2_IRQHandler
-	.thumb_set TIM2_IRQHandler,Default_Handler
-
-	.weak	TIM3_IRQHandler
-	.thumb_set TIM3_IRQHandler,Default_Handler
-
-	.weak	TIM4_IRQHandler
-	.thumb_set TIM4_IRQHandler,Default_Handler
-
-	.weak	I2C1_EV_IRQHandler
-	.thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-	.weak	I2C1_ER_IRQHandler
-	.thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-	.weak	I2C2_EV_IRQHandler
-	.thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-	.weak	I2C2_ER_IRQHandler
-	.thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-	.weak	SPI1_IRQHandler
-	.thumb_set SPI1_IRQHandler,Default_Handler
-
-	.weak	SPI2_IRQHandler
-	.thumb_set SPI2_IRQHandler,Default_Handler
-
-	.weak	USART1_IRQHandler
-	.thumb_set USART1_IRQHandler,Default_Handler
-
-	.weak	USART2_IRQHandler
-	.thumb_set USART2_IRQHandler,Default_Handler
-
-	.weak	USART3_IRQHandler
-	.thumb_set USART3_IRQHandler,Default_Handler
-
-	.weak	EXTI15_10_IRQHandler
-	.thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-	.weak	RTCAlarm_IRQHandler
-	.thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-	.weak	USBWakeUp_IRQHandler
-	.thumb_set USBWakeUp_IRQHandler,Default_Handler
-
-	.weak	TIM8_BRK_IRQHandler
-	.thumb_set TIM8_BRK_IRQHandler,Default_Handler
-
-	.weak	TIM8_UP_IRQHandler
-	.thumb_set TIM8_UP_IRQHandler,Default_Handler
-
-	.weak	TIM8_TRG_COM_IRQHandler
-	.thumb_set TIM8_TRG_COM_IRQHandler,Default_Handler
-
-	.weak	TIM8_CC_IRQHandler
-	.thumb_set TIM8_CC_IRQHandler,Default_Handler
-
-	.weak	ADC3_IRQHandler
-	.thumb_set ADC3_IRQHandler,Default_Handler
-
-	.weak	FSMC_IRQHandler
-	.thumb_set FSMC_IRQHandler,Default_Handler
-
-	.weak	SDIO_IRQHandler
-	.thumb_set SDIO_IRQHandler,Default_Handler
-
-	.weak	TIM5_IRQHandler
-	.thumb_set TIM5_IRQHandler,Default_Handler
-
-	.weak	SPI3_IRQHandler
-	.thumb_set SPI3_IRQHandler,Default_Handler
-
-	.weak	UART4_IRQHandler
-	.thumb_set UART4_IRQHandler,Default_Handler
-
-	.weak	UART5_IRQHandler
-	.thumb_set UART5_IRQHandler,Default_Handler
-
-	.weak	TIM6_IRQHandler
-	.thumb_set TIM6_IRQHandler,Default_Handler
-
-	.weak	TIM7_IRQHandler
-	.thumb_set TIM7_IRQHandler,Default_Handler
-
-	.weak	DMA2_Channel1_IRQHandler
-	.thumb_set DMA2_Channel1_IRQHandler,Default_Handler
-
-	.weak	DMA2_Channel2_IRQHandler
-	.thumb_set DMA2_Channel2_IRQHandler,Default_Handler
-
-	.weak	DMA2_Channel3_IRQHandler
-	.thumb_set DMA2_Channel3_IRQHandler,Default_Handler
-
-	.weak	DMA2_Channel4_5_IRQHandler
-	.thumb_set DMA2_Channel4_5_IRQHandler,Default_Handler
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 451
Libraries/Startup/TrueSTUDIO/startup_stm32f10x_hd_vl.s

@@ -1,451 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_hd_vl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x High Density Value Line Devices vector table for Atollic 
-  *            toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system  
-  *                - Configure external SRAM mounted on STM32100E-EVAL board
-  *                  to be used as data memory (optional, to be enabled by user)   
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-
-  .syntax unified
-	.cpu cortex-m3
-	.fpu softvfp
-	.thumb
-
-.global	g_pfnVectors
-.global	Default_Handler
-
-/* start address for the initialization values of the .data section.
-defined in linker script */
-.word	_sidata
-/* start address for the .data section. defined in linker script */
-.word	_sdata
-/* end address for the .data section. defined in linker script */
-.word	_edata
-/* start address for the .bss section. defined in linker script */
-.word	_sbss
-/* end address for the .bss section. defined in linker script */
-.word	_ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called.
- * @param  None
- * @retval : None
-*/
-
-    .section	.text.Reset_Handler
-	.weak	Reset_Handler
-	.type	Reset_Handler, %function
-Reset_Handler:
-
-/* Copy the data segment initializers from flash to SRAM */
-  movs	r1, #0
-  b	LoopCopyDataInit
-
-CopyDataInit:
-	ldr	r3, =_sidata
-	ldr	r3, [r3, r1]
-	str	r3, [r0, r1]
-	adds	r1, r1, #4
-
-LoopCopyDataInit:
-	ldr	r0, =_sdata
-	ldr	r3, =_edata
-	adds	r2, r0, r1
-	cmp	r2, r3
-	bcc	CopyDataInit
-	ldr	r2, =_sbss
-	b	LoopFillZerobss
-/* Zero fill the bss segment. */
-FillZerobss:
-	movs	r3, #0
-	str	r3, [r2], #4
-
-LoopFillZerobss:
-	ldr	r3, = _ebss
-	cmp	r2, r3
-	bcc	FillZerobss
-	
-/* Call the clock system intitialization function.*/
-  bl  SystemInit 
-/* Call static constructors */
-  bl __libc_init_array  
-/* Call the application's entry point.*/
-	bl	main
-	bx	lr
-.size	Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- *
- * @param  None
- * @retval : None
-*/
-    .section	.text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-	b	Infinite_Loop
-	.size	Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3.  Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/
- 	.section	.isr_vector,"a",%progbits
-	.type	g_pfnVectors, %object
-	.size	g_pfnVectors, .-g_pfnVectors
-
-
-g_pfnVectors:
-	.word	_estack
-	.word	Reset_Handler
-	.word	NMI_Handler
-	.word	HardFault_Handler
-	.word	MemManage_Handler
-	.word	BusFault_Handler
-	.word	UsageFault_Handler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	SVC_Handler
-	.word	DebugMon_Handler
-	.word	0
-	.word	PendSV_Handler
-	.word	SysTick_Handler
-	.word	WWDG_IRQHandler
-	.word	PVD_IRQHandler
-	.word	TAMPER_IRQHandler
-	.word	RTC_IRQHandler
-	.word	FLASH_IRQHandler
-	.word	RCC_IRQHandler
-	.word	EXTI0_IRQHandler
-	.word	EXTI1_IRQHandler
-	.word	EXTI2_IRQHandler
-	.word	EXTI3_IRQHandler
-	.word	EXTI4_IRQHandler
-	.word	DMA1_Channel1_IRQHandler
-	.word	DMA1_Channel2_IRQHandler
-	.word	DMA1_Channel3_IRQHandler
-	.word	DMA1_Channel4_IRQHandler
-	.word	DMA1_Channel5_IRQHandler
-	.word	DMA1_Channel6_IRQHandler
-	.word	DMA1_Channel7_IRQHandler
-	.word	ADC1_IRQHandler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	EXTI9_5_IRQHandler
-	.word	TIM1_BRK_TIM15_IRQHandler
-	.word	TIM1_UP_TIM16_IRQHandler
-	.word	TIM1_TRG_COM_TIM17_IRQHandler
-	.word	TIM1_CC_IRQHandler
-	.word	TIM2_IRQHandler
-	.word	TIM3_IRQHandler
-	.word	TIM4_IRQHandler
-	.word	I2C1_EV_IRQHandler
-	.word	I2C1_ER_IRQHandler
-	.word	I2C2_EV_IRQHandler
-	.word	I2C2_ER_IRQHandler
-	.word	SPI1_IRQHandler
-	.word	SPI2_IRQHandler
-	.word	USART1_IRQHandler
-	.word	USART2_IRQHandler
-	.word	USART3_IRQHandler
-	.word	EXTI15_10_IRQHandler
-	.word	RTCAlarm_IRQHandler
-	.word	CEC_IRQHandler
-  .word TIM12_IRQHandler
-  .word TIM13_IRQHandler
-  .word TIM14_IRQHandler
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word TIM5_IRQHandler
-  .word SPI3_IRQHandler
-  .word UART4_IRQHandler
-  .word UART5_IRQHandler
-  .word TIM6_DAC_IRQHandler
-  .word TIM7_IRQHandler  
-  .word DMA2_Channel1_IRQHandler
-  .word DMA2_Channel2_IRQHandler
-  .word DMA2_Channel3_IRQHandler
-  .word DMA2_Channel4_5_IRQHandler
-  .word DMA2_Channel5_IRQHandler
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word 0
-  .word  BootRAM       /* @0x1E0. This is for boot in RAM mode for 
-                         STM32F10x High Density Value line devices. */
-
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler.
-* As they are weak aliases, any function with the same name will override
-* this definition.
-*
-*******************************************************************************/
-
-    
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_IRQHandler
-  .thumb_set ADC1_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_TIM15_IRQHandler
-  .thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_TIM16_IRQHandler
-  .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_TIM17_IRQHandler
-  .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  TIM4_IRQHandler
-  .thumb_set TIM4_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  I2C2_EV_IRQHandler
-  .thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-  .weak  I2C2_ER_IRQHandler
-  .thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  SPI2_IRQHandler
-  .thumb_set SPI2_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  USART3_IRQHandler
-  .thumb_set USART3_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  CEC_IRQHandler
-  .thumb_set CEC_IRQHandler,Default_Handler
-
-  .weak  TIM12_IRQHandler
-  .thumb_set TIM12_IRQHandler,Default_Handler
-
-  .weak  TIM13_IRQHandler
-  .thumb_set TIM13_IRQHandler,Default_Handler
-
-  .weak  TIM14_IRQHandler
-  .thumb_set TIM14_IRQHandler,Default_Handler
-
-  .weak  TIM5_IRQHandler
-  .thumb_set TIM5_IRQHandler,Default_Handler
-
-  .weak  SPI3_IRQHandler
-  .thumb_set SPI3_IRQHandler,Default_Handler
-
-  .weak  UART4_IRQHandler
-  .thumb_set UART4_IRQHandler,Default_Handler
-
-  .weak  UART5_IRQHandler
-  .thumb_set UART5_IRQHandler,Default_Handler
-  
-  .weak  TIM6_DAC_IRQHandler
-  .thumb_set TIM6_DAC_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler
-  .thumb_set TIM7_IRQHandler,Default_Handler 
-
-  .weak  DMA2_Channel1_IRQHandler
-  .thumb_set DMA2_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel2_IRQHandler
-  .thumb_set DMA2_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel3_IRQHandler
-  .thumb_set DMA2_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel4_5_IRQHandler
-  .thumb_set DMA2_Channel4_5_IRQHandler,Default_Handler  
-
-  .weak  DMA2_Channel5_IRQHandler
-  .thumb_set DMA2_Channel5_IRQHandler,Default_Handler
-  
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
-

+ 0 - 347
Libraries/Startup/TrueSTUDIO/startup_stm32f10x_ld.s

@@ -1,347 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_ld.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Low Density Devices vector table for Atollic toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address.
-  *                - Configure the clock system 
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-
-  .syntax unified
-	.cpu cortex-m3
-	.fpu softvfp
-	.thumb
-
-.global	g_pfnVectors
-.global	Default_Handler
-
-/* start address for the initialization values of the .data section.
-defined in linker script */
-.word	_sidata
-/* start address for the .data section. defined in linker script */
-.word	_sdata
-/* end address for the .data section. defined in linker script */
-.word	_edata
-/* start address for the .bss section. defined in linker script */
-.word	_sbss
-/* end address for the .bss section. defined in linker script */
-.word	_ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called.
- * @param  None
- * @retval : None
-*/
-
-    .section	.text.Reset_Handler
-	.weak	Reset_Handler
-	.type	Reset_Handler, %function
-Reset_Handler:
-
-/* Copy the data segment initializers from flash to SRAM */
-  movs	r1, #0
-  b	LoopCopyDataInit
-
-CopyDataInit:
-	ldr	r3, =_sidata
-	ldr	r3, [r3, r1]
-	str	r3, [r0, r1]
-	adds	r1, r1, #4
-
-LoopCopyDataInit:
-	ldr	r0, =_sdata
-	ldr	r3, =_edata
-	adds	r2, r0, r1
-	cmp	r2, r3
-	bcc	CopyDataInit
-	ldr	r2, =_sbss
-	b	LoopFillZerobss
-/* Zero fill the bss segment. */
-FillZerobss:
-	movs	r3, #0
-	str	r3, [r2], #4
-
-LoopFillZerobss:
-	ldr	r3, = _ebss
-	cmp	r2, r3
-	bcc	FillZerobss
-
-/* Call the clock system intitialization function.*/
-  bl  SystemInit
-/* Call static constructors */
-  bl __libc_init_array
-/* Call the application's entry point.*/
-	bl	main
-	bx	lr
-.size	Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- *
- * @param  None
- * @retval : None
-*/
-    .section	.text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-	b	Infinite_Loop
-	.size	Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3.  Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/
- 	.section	.isr_vector,"a",%progbits
-	.type	g_pfnVectors, %object
-	.size	g_pfnVectors, .-g_pfnVectors
-
-
-g_pfnVectors:
-	.word	_estack
-	.word	Reset_Handler
-	.word	NMI_Handler
-	.word	HardFault_Handler
-	.word	MemManage_Handler
-	.word	BusFault_Handler
-	.word	UsageFault_Handler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	SVC_Handler
-	.word	DebugMon_Handler
-	.word	0
-	.word	PendSV_Handler
-	.word	SysTick_Handler
-	.word	WWDG_IRQHandler
-	.word	PVD_IRQHandler
-	.word	TAMPER_IRQHandler
-	.word	RTC_IRQHandler
-	.word	FLASH_IRQHandler
-	.word	RCC_IRQHandler
-	.word	EXTI0_IRQHandler
-	.word	EXTI1_IRQHandler
-	.word	EXTI2_IRQHandler
-	.word	EXTI3_IRQHandler
-	.word	EXTI4_IRQHandler
-	.word	DMA1_Channel1_IRQHandler
-	.word	DMA1_Channel2_IRQHandler
-	.word	DMA1_Channel3_IRQHandler
-	.word	DMA1_Channel4_IRQHandler
-	.word	DMA1_Channel5_IRQHandler
-	.word	DMA1_Channel6_IRQHandler
-	.word	DMA1_Channel7_IRQHandler
-	.word	ADC1_2_IRQHandler
-	.word	USB_HP_CAN1_TX_IRQHandler
-	.word	USB_LP_CAN1_RX0_IRQHandler
-	.word	CAN1_RX1_IRQHandler
-	.word	CAN1_SCE_IRQHandler
-	.word	EXTI9_5_IRQHandler
-	.word	TIM1_BRK_IRQHandler
-	.word	TIM1_UP_IRQHandler
-  .word TIM1_TRG_COM_IRQHandler
-  .word TIM1_CC_IRQHandler
-  .word TIM2_IRQHandler
-  .word TIM3_IRQHandler
-  .word 0
-  .word I2C1_EV_IRQHandler
-  .word I2C1_ER_IRQHandler
-  .word 0
-  .word 0
-  .word SPI1_IRQHandler
-  .word 0
-  .word USART1_IRQHandler
-  .word USART2_IRQHandler
-  .word 0
-  .word EXTI15_10_IRQHandler
-	.word	RTCAlarm_IRQHandler
-	.word	USBWakeUp_IRQHandler
-  .word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	BootRAM        /* @0x108. This is for boot in RAM mode for
-                          STM32F10x Low Density devices.*/
-
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler.
-* As they are weak aliases, any function with the same name will override
-* this definition.
-*
-*******************************************************************************/
-
-  .weak	NMI_Handler
-	.thumb_set NMI_Handler,Default_Handler
-
-  .weak	HardFault_Handler
-	.thumb_set HardFault_Handler,Default_Handler
-
-  .weak	MemManage_Handler
-	.thumb_set MemManage_Handler,Default_Handler
-
-  .weak	BusFault_Handler
-	.thumb_set BusFault_Handler,Default_Handler
-
-	.weak	UsageFault_Handler
-	.thumb_set UsageFault_Handler,Default_Handler
-
-	.weak	SVC_Handler
-	.thumb_set SVC_Handler,Default_Handler
-
-	.weak	DebugMon_Handler
-	.thumb_set DebugMon_Handler,Default_Handler
-
-	.weak	PendSV_Handler
-	.thumb_set PendSV_Handler,Default_Handler
-
-	.weak	SysTick_Handler
-	.thumb_set SysTick_Handler,Default_Handler
-
-	.weak	WWDG_IRQHandler
-	.thumb_set WWDG_IRQHandler,Default_Handler
-
-	.weak	PVD_IRQHandler
-	.thumb_set PVD_IRQHandler,Default_Handler
-
-	.weak	TAMPER_IRQHandler
-	.thumb_set TAMPER_IRQHandler,Default_Handler
-
-	.weak	RTC_IRQHandler
-	.thumb_set RTC_IRQHandler,Default_Handler
-
-	.weak	FLASH_IRQHandler
-	.thumb_set FLASH_IRQHandler,Default_Handler
-
-	.weak	RCC_IRQHandler
-	.thumb_set RCC_IRQHandler,Default_Handler
-
-	.weak	EXTI0_IRQHandler
-	.thumb_set EXTI0_IRQHandler,Default_Handler
-
-	.weak	EXTI1_IRQHandler
-	.thumb_set EXTI1_IRQHandler,Default_Handler
-
-	.weak	EXTI2_IRQHandler
-	.thumb_set EXTI2_IRQHandler,Default_Handler
-
-	.weak	EXTI3_IRQHandler
-	.thumb_set EXTI3_IRQHandler,Default_Handler
-
-	.weak	EXTI4_IRQHandler
-	.thumb_set EXTI4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel1_IRQHandler
-	.thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel2_IRQHandler
-	.thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel3_IRQHandler
-	.thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel4_IRQHandler
-	.thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel5_IRQHandler
-	.thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel6_IRQHandler
-	.thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel7_IRQHandler
-	.thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-	.weak	ADC1_2_IRQHandler
-	.thumb_set ADC1_2_IRQHandler,Default_Handler
-
-	.weak	USB_HP_CAN1_TX_IRQHandler
-	.thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
-
-	.weak	USB_LP_CAN1_RX0_IRQHandler
-	.thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
-
-	.weak	CAN1_RX1_IRQHandler
-	.thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-	.weak	CAN1_SCE_IRQHandler
-	.thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-	.weak	EXTI9_5_IRQHandler
-	.thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-	.weak	TIM1_BRK_IRQHandler
-	.thumb_set TIM1_BRK_IRQHandler,Default_Handler
-
-	.weak	TIM1_UP_IRQHandler
-	.thumb_set TIM1_UP_IRQHandler,Default_Handler
-
-	.weak	TIM1_TRG_COM_IRQHandler
-	.thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
-
-	.weak	TIM1_CC_IRQHandler
-	.thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-	.weak	TIM2_IRQHandler
-	.thumb_set TIM2_IRQHandler,Default_Handler
-
-	.weak	TIM3_IRQHandler
-	.thumb_set TIM3_IRQHandler,Default_Handler
-
-	.weak	I2C1_EV_IRQHandler
-	.thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-	.weak	I2C1_ER_IRQHandler
-	.thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-	.weak	SPI1_IRQHandler
-	.thumb_set SPI1_IRQHandler,Default_Handler
-
-	.weak	USART1_IRQHandler
-	.thumb_set USART1_IRQHandler,Default_Handler
-
-	.weak	USART2_IRQHandler
-	.thumb_set USART2_IRQHandler,Default_Handler
-
-	.weak	EXTI15_10_IRQHandler
-	.thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-	.weak	RTCAlarm_IRQHandler
-	.thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-	.weak	USBWakeUp_IRQHandler
-	.thumb_set USBWakeUp_IRQHandler,Default_Handler
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 392
Libraries/Startup/TrueSTUDIO/startup_stm32f10x_ld_vl.s

@@ -1,392 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_ld_vl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Low Density Value Line Devices vector table for Atollic toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system   
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-
-  .syntax unified
-	.cpu cortex-m3
-	.fpu softvfp
-	.thumb
-
-.global	g_pfnVectors
-.global	Default_Handler
-
-/* start address for the initialization values of the .data section.
-defined in linker script */
-.word	_sidata
-/* start address for the .data section. defined in linker script */
-.word	_sdata
-/* end address for the .data section. defined in linker script */
-.word	_edata
-/* start address for the .bss section. defined in linker script */
-.word	_sbss
-/* end address for the .bss section. defined in linker script */
-.word	_ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called.
- * @param  None
- * @retval : None
-*/
-
-    .section	.text.Reset_Handler
-	.weak	Reset_Handler
-	.type	Reset_Handler, %function
-Reset_Handler:
-
-/* Copy the data segment initializers from flash to SRAM */
-  movs	r1, #0
-  b	LoopCopyDataInit
-
-CopyDataInit:
-	ldr	r3, =_sidata
-	ldr	r3, [r3, r1]
-	str	r3, [r0, r1]
-	adds	r1, r1, #4
-
-LoopCopyDataInit:
-	ldr	r0, =_sdata
-	ldr	r3, =_edata
-	adds	r2, r0, r1
-	cmp	r2, r3
-	bcc	CopyDataInit
-	ldr	r2, =_sbss
-	b	LoopFillZerobss
-/* Zero fill the bss segment. */
-FillZerobss:
-	movs	r3, #0
-	str	r3, [r2], #4
-
-LoopFillZerobss:
-	ldr	r3, = _ebss
-	cmp	r2, r3
-	bcc	FillZerobss
-
-/* Call the clock system intitialization function.*/
-  bl  SystemInit  
-/* Call static constructors */
-  bl __libc_init_array 
-/* Call the application's entry point.*/
-	bl	main
-	bx	lr
-.size	Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- *
- * @param  None
- * @retval : None
-*/
-    .section	.text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-	b	Infinite_Loop
-	.size	Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3.  Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/
- 	.section	.isr_vector,"a",%progbits
-	.type	g_pfnVectors, %object
-	.size	g_pfnVectors, .-g_pfnVectors
-
-
-g_pfnVectors:
-	.word	_estack
-	.word	Reset_Handler
-	.word	NMI_Handler
-	.word	HardFault_Handler
-	.word	MemManage_Handler
-	.word	BusFault_Handler
-	.word	UsageFault_Handler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	SVC_Handler
-	.word	DebugMon_Handler
-	.word	0
-	.word	PendSV_Handler
-	.word	SysTick_Handler
-	.word	WWDG_IRQHandler
-	.word	PVD_IRQHandler
-	.word	TAMPER_IRQHandler
-	.word	RTC_IRQHandler
-	.word	FLASH_IRQHandler
-	.word	RCC_IRQHandler
-	.word	EXTI0_IRQHandler
-	.word	EXTI1_IRQHandler
-	.word	EXTI2_IRQHandler
-	.word	EXTI3_IRQHandler
-	.word	EXTI4_IRQHandler
-	.word	DMA1_Channel1_IRQHandler
-	.word	DMA1_Channel2_IRQHandler
-	.word	DMA1_Channel3_IRQHandler
-	.word	DMA1_Channel4_IRQHandler
-	.word	DMA1_Channel5_IRQHandler
-	.word	DMA1_Channel6_IRQHandler
-	.word	DMA1_Channel7_IRQHandler
-	.word	ADC1_IRQHandler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	EXTI9_5_IRQHandler
-	.word	TIM1_BRK_TIM15_IRQHandler
-	.word	TIM1_UP_TIM16_IRQHandler
-	.word	TIM1_TRG_COM_TIM17_IRQHandler
-	.word	TIM1_CC_IRQHandler
-	.word	TIM2_IRQHandler
-	.word	TIM3_IRQHandler
-	.word	0
-	.word	I2C1_EV_IRQHandler
-	.word	I2C1_ER_IRQHandler
-	.word	0
-	.word	0
-	.word	SPI1_IRQHandler
-	.word	0
-	.word	USART1_IRQHandler
-	.word	USART2_IRQHandler
-	.word	0
-	.word	EXTI15_10_IRQHandler
-	.word	RTCAlarm_IRQHandler
-	.word	CEC_IRQHandler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word 0  
-	.word 0
-	.word 0
-	.word 0
-	.word TIM6_DAC_IRQHandler
-	.word TIM7_IRQHandler  
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word BootRAM          /* @0x01CC. This is for boot in RAM mode for 
-                            STM32F10x Medium Value Line Density devices. */
-
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler.
-* As they are weak aliases, any function with the same name will override
-* this definition.
-*
-*******************************************************************************/
-
-    
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_IRQHandler
-  .thumb_set ADC1_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_TIM15_IRQHandler
-  .thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_TIM16_IRQHandler
-  .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_TIM17_IRQHandler
-  .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  CEC_IRQHandler
-  .thumb_set CEC_IRQHandler,Default_Handler
-
-  .weak  TIM6_DAC_IRQHandler
-  .thumb_set TIM6_DAC_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler
-  .thumb_set TIM7_IRQHandler,Default_Handler  
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
-

+ 0 - 363
Libraries/Startup/TrueSTUDIO/startup_stm32f10x_md.s

@@ -1,363 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_md.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Medium Density Devices vector table for Atollic toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-
-  .syntax unified
-	.cpu cortex-m3
-	.fpu softvfp
-	.thumb
-
-.global	g_pfnVectors
-.global	Default_Handler
-
-/* start address for the initialization values of the .data section.
-defined in linker script */
-.word	_sidata
-/* start address for the .data section. defined in linker script */
-.word	_sdata
-/* end address for the .data section. defined in linker script */
-.word	_edata
-/* start address for the .bss section. defined in linker script */
-.word	_sbss
-/* end address for the .bss section. defined in linker script */
-.word	_ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called.
- * @param  None
- * @retval : None
-*/
-
-    .section	.text.Reset_Handler
-	.weak	Reset_Handler
-	.type	Reset_Handler, %function
-Reset_Handler:
-
-/* Copy the data segment initializers from flash to SRAM */
-  movs	r1, #0
-  b	LoopCopyDataInit
-
-CopyDataInit:
-	ldr	r3, =_sidata
-	ldr	r3, [r3, r1]
-	str	r3, [r0, r1]
-	adds	r1, r1, #4
-
-LoopCopyDataInit:
-	ldr	r0, =_sdata
-	ldr	r3, =_edata
-	adds	r2, r0, r1
-	cmp	r2, r3
-	bcc	CopyDataInit
-	ldr	r2, =_sbss
-	b	LoopFillZerobss
-/* Zero fill the bss segment. */
-FillZerobss:
-	movs	r3, #0
-	str	r3, [r2], #4
-
-LoopFillZerobss:
-	ldr	r3, = _ebss
-	cmp	r2, r3
-	bcc	FillZerobss
-
-/* Call the clock system intitialization function.*/
-    bl  SystemInit
-/* Call static constructors */
-    bl __libc_init_array
-/* Call the application's entry point.*/
-	bl	main
-	bx	lr
-.size	Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- *
- * @param  None
- * @retval : None
-*/
-    .section	.text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-	b	Infinite_Loop
-	.size	Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3.  Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/
- 	.section	.isr_vector,"a",%progbits
-	.type	g_pfnVectors, %object
-	.size	g_pfnVectors, .-g_pfnVectors
-
-
-g_pfnVectors:
-	.word	_estack
-	.word	Reset_Handler
-	.word	NMI_Handler
-	.word	HardFault_Handler
-	.word	MemManage_Handler
-	.word	BusFault_Handler
-	.word	UsageFault_Handler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	SVC_Handler
-	.word	DebugMon_Handler
-	.word	0
-	.word	PendSV_Handler
-	.word	SysTick_Handler
-	.word	WWDG_IRQHandler
-	.word	PVD_IRQHandler
-	.word	TAMPER_IRQHandler
-	.word	RTC_IRQHandler
-	.word	FLASH_IRQHandler
-	.word	RCC_IRQHandler
-	.word	EXTI0_IRQHandler
-	.word	EXTI1_IRQHandler
-	.word	EXTI2_IRQHandler
-	.word	EXTI3_IRQHandler
-	.word	EXTI4_IRQHandler
-	.word	DMA1_Channel1_IRQHandler
-	.word	DMA1_Channel2_IRQHandler
-	.word	DMA1_Channel3_IRQHandler
-	.word	DMA1_Channel4_IRQHandler
-	.word	DMA1_Channel5_IRQHandler
-	.word	DMA1_Channel6_IRQHandler
-	.word	DMA1_Channel7_IRQHandler
-	.word	ADC1_2_IRQHandler
-	.word	USB_HP_CAN1_TX_IRQHandler
-	.word	USB_LP_CAN1_RX0_IRQHandler
-	.word	CAN1_RX1_IRQHandler
-	.word	CAN1_SCE_IRQHandler
-	.word	EXTI9_5_IRQHandler
-	.word	TIM1_BRK_IRQHandler
-	.word	TIM1_UP_IRQHandler
-	.word	TIM1_TRG_COM_IRQHandler
-	.word	TIM1_CC_IRQHandler
-	.word	TIM2_IRQHandler
-	.word	TIM3_IRQHandler
-	.word	TIM4_IRQHandler
-	.word	I2C1_EV_IRQHandler
-	.word	I2C1_ER_IRQHandler
-	.word	I2C2_EV_IRQHandler
-	.word	I2C2_ER_IRQHandler
-	.word	SPI1_IRQHandler
-	.word	SPI2_IRQHandler
-	.word	USART1_IRQHandler
-	.word	USART2_IRQHandler
-	.word	USART3_IRQHandler
-	.word	EXTI15_10_IRQHandler
-	.word	RTCAlarm_IRQHandler
-	.word	USBWakeUp_IRQHandler
-  .word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	BootRAM          /* @0x108. This is for boot in RAM mode for
-                            STM32F10x Medium Density devices. */
-
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler.
-* As they are weak aliases, any function with the same name will override
-* this definition.
-*
-*******************************************************************************/
-
-  .weak	NMI_Handler
-	.thumb_set NMI_Handler,Default_Handler
-
-  .weak	HardFault_Handler
-	.thumb_set HardFault_Handler,Default_Handler
-
-  .weak	MemManage_Handler
-	.thumb_set MemManage_Handler,Default_Handler
-
-  .weak	BusFault_Handler
-	.thumb_set BusFault_Handler,Default_Handler
-
-	.weak	UsageFault_Handler
-	.thumb_set UsageFault_Handler,Default_Handler
-
-	.weak	SVC_Handler
-	.thumb_set SVC_Handler,Default_Handler
-
-	.weak	DebugMon_Handler
-	.thumb_set DebugMon_Handler,Default_Handler
-
-	.weak	PendSV_Handler
-	.thumb_set PendSV_Handler,Default_Handler
-
-	.weak	SysTick_Handler
-	.thumb_set SysTick_Handler,Default_Handler
-
-	.weak	WWDG_IRQHandler
-	.thumb_set WWDG_IRQHandler,Default_Handler
-
-	.weak	PVD_IRQHandler
-	.thumb_set PVD_IRQHandler,Default_Handler
-
-	.weak	TAMPER_IRQHandler
-	.thumb_set TAMPER_IRQHandler,Default_Handler
-
-	.weak	RTC_IRQHandler
-	.thumb_set RTC_IRQHandler,Default_Handler
-
-	.weak	FLASH_IRQHandler
-	.thumb_set FLASH_IRQHandler,Default_Handler
-
-	.weak	RCC_IRQHandler
-	.thumb_set RCC_IRQHandler,Default_Handler
-
-	.weak	EXTI0_IRQHandler
-	.thumb_set EXTI0_IRQHandler,Default_Handler
-
-	.weak	EXTI1_IRQHandler
-	.thumb_set EXTI1_IRQHandler,Default_Handler
-
-	.weak	EXTI2_IRQHandler
-	.thumb_set EXTI2_IRQHandler,Default_Handler
-
-	.weak	EXTI3_IRQHandler
-	.thumb_set EXTI3_IRQHandler,Default_Handler
-
-	.weak	EXTI4_IRQHandler
-	.thumb_set EXTI4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel1_IRQHandler
-	.thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel2_IRQHandler
-	.thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel3_IRQHandler
-	.thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel4_IRQHandler
-	.thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel5_IRQHandler
-	.thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel6_IRQHandler
-	.thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel7_IRQHandler
-	.thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-	.weak	ADC1_2_IRQHandler
-	.thumb_set ADC1_2_IRQHandler,Default_Handler
-
-	.weak	USB_HP_CAN1_TX_IRQHandler
-	.thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
-
-	.weak	USB_LP_CAN1_RX0_IRQHandler
-	.thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
-
-	.weak	CAN1_RX1_IRQHandler
-	.thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-	.weak	CAN1_SCE_IRQHandler
-	.thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-	.weak	EXTI9_5_IRQHandler
-	.thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-	.weak	TIM1_BRK_IRQHandler
-	.thumb_set TIM1_BRK_IRQHandler,Default_Handler
-
-	.weak	TIM1_UP_IRQHandler
-	.thumb_set TIM1_UP_IRQHandler,Default_Handler
-
-	.weak	TIM1_TRG_COM_IRQHandler
-	.thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
-
-	.weak	TIM1_CC_IRQHandler
-	.thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-	.weak	TIM2_IRQHandler
-	.thumb_set TIM2_IRQHandler,Default_Handler
-
-	.weak	TIM3_IRQHandler
-	.thumb_set TIM3_IRQHandler,Default_Handler
-
-	.weak	TIM4_IRQHandler
-	.thumb_set TIM4_IRQHandler,Default_Handler
-
-	.weak	I2C1_EV_IRQHandler
-	.thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-	.weak	I2C1_ER_IRQHandler
-	.thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-	.weak	I2C2_EV_IRQHandler
-	.thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-	.weak	I2C2_ER_IRQHandler
-	.thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-	.weak	SPI1_IRQHandler
-	.thumb_set SPI1_IRQHandler,Default_Handler
-
-	.weak	SPI2_IRQHandler
-	.thumb_set SPI2_IRQHandler,Default_Handler
-
-	.weak	USART1_IRQHandler
-	.thumb_set USART1_IRQHandler,Default_Handler
-
-	.weak	USART2_IRQHandler
-	.thumb_set USART2_IRQHandler,Default_Handler
-
-	.weak	USART3_IRQHandler
-	.thumb_set USART3_IRQHandler,Default_Handler
-
-	.weak	EXTI15_10_IRQHandler
-	.thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-	.weak	RTCAlarm_IRQHandler
-	.thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-	.weak	USBWakeUp_IRQHandler
-	.thumb_set USBWakeUp_IRQHandler,Default_Handler
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
-

+ 0 - 408
Libraries/Startup/TrueSTUDIO/startup_stm32f10x_md_vl.s

@@ -1,408 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_md_vl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Medium Density Value Line Devices vector table for Atollic 
-  *            toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system   
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-
-  .syntax unified
-	.cpu cortex-m3
-	.fpu softvfp
-	.thumb
-
-.global	g_pfnVectors
-.global	Default_Handler
-
-/* start address for the initialization values of the .data section.
-defined in linker script */
-.word	_sidata
-/* start address for the .data section. defined in linker script */
-.word	_sdata
-/* end address for the .data section. defined in linker script */
-.word	_edata
-/* start address for the .bss section. defined in linker script */
-.word	_sbss
-/* end address for the .bss section. defined in linker script */
-.word	_ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called.
- * @param  None
- * @retval : None
-*/
-
-    .section	.text.Reset_Handler
-	.weak	Reset_Handler
-	.type	Reset_Handler, %function
-Reset_Handler:
-
-/* Copy the data segment initializers from flash to SRAM */
-  movs	r1, #0
-  b	LoopCopyDataInit
-
-CopyDataInit:
-	ldr	r3, =_sidata
-	ldr	r3, [r3, r1]
-	str	r3, [r0, r1]
-	adds	r1, r1, #4
-
-LoopCopyDataInit:
-	ldr	r0, =_sdata
-	ldr	r3, =_edata
-	adds	r2, r0, r1
-	cmp	r2, r3
-	bcc	CopyDataInit
-	ldr	r2, =_sbss
-	b	LoopFillZerobss
-/* Zero fill the bss segment. */
-FillZerobss:
-	movs	r3, #0
-	str	r3, [r2], #4
-
-LoopFillZerobss:
-	ldr	r3, = _ebss
-	cmp	r2, r3
-	bcc	FillZerobss
-	
-/* Call the clock system intitialization function.*/
-  bl  SystemInit 
-/* Call static constructors */
-  bl __libc_init_array  
-/* Call the application's entry point.*/
-	bl	main
-	bx	lr
-.size	Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- *
- * @param  None
- * @retval : None
-*/
-    .section	.text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-	b	Infinite_Loop
-	.size	Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3.  Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/
- 	.section	.isr_vector,"a",%progbits
-	.type	g_pfnVectors, %object
-	.size	g_pfnVectors, .-g_pfnVectors
-
-
-g_pfnVectors:
-	.word	_estack
-	.word	Reset_Handler
-	.word	NMI_Handler
-	.word	HardFault_Handler
-	.word	MemManage_Handler
-	.word	BusFault_Handler
-	.word	UsageFault_Handler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	SVC_Handler
-	.word	DebugMon_Handler
-	.word	0
-	.word	PendSV_Handler
-	.word	SysTick_Handler
-	.word	WWDG_IRQHandler
-	.word	PVD_IRQHandler
-	.word	TAMPER_IRQHandler
-	.word	RTC_IRQHandler
-	.word	FLASH_IRQHandler
-	.word	RCC_IRQHandler
-	.word	EXTI0_IRQHandler
-	.word	EXTI1_IRQHandler
-	.word	EXTI2_IRQHandler
-	.word	EXTI3_IRQHandler
-	.word	EXTI4_IRQHandler
-	.word	DMA1_Channel1_IRQHandler
-	.word	DMA1_Channel2_IRQHandler
-	.word	DMA1_Channel3_IRQHandler
-	.word	DMA1_Channel4_IRQHandler
-	.word	DMA1_Channel5_IRQHandler
-	.word	DMA1_Channel6_IRQHandler
-	.word	DMA1_Channel7_IRQHandler
-	.word	ADC1_IRQHandler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	EXTI9_5_IRQHandler
-	.word	TIM1_BRK_TIM15_IRQHandler
-	.word	TIM1_UP_TIM16_IRQHandler
-	.word	TIM1_TRG_COM_TIM17_IRQHandler
-	.word	TIM1_CC_IRQHandler
-	.word	TIM2_IRQHandler
-	.word	TIM3_IRQHandler
-	.word	TIM4_IRQHandler
-	.word	I2C1_EV_IRQHandler
-	.word	I2C1_ER_IRQHandler
-	.word	I2C2_EV_IRQHandler
-	.word	I2C2_ER_IRQHandler
-	.word	SPI1_IRQHandler
-	.word	SPI2_IRQHandler
-	.word	USART1_IRQHandler
-	.word	USART2_IRQHandler
-	.word	USART3_IRQHandler
-	.word	EXTI15_10_IRQHandler
-	.word	RTCAlarm_IRQHandler
-	.word	CEC_IRQHandler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word 0  
-	.word 0
-	.word 0
-	.word 0
-	.word TIM6_DAC_IRQHandler
-	.word TIM7_IRQHandler  
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word 0
-	.word BootRAM          /* @0x01CC. This is for boot in RAM mode for 
-                         STM32F10x Medium Value Line Density devices. */
-
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler.
-* As they are weak aliases, any function with the same name will override
-* this definition.
-*
-*******************************************************************************/
-
-    
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_IRQHandler
-  .thumb_set ADC1_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_TIM15_IRQHandler
-  .thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_TIM16_IRQHandler
-  .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_TIM17_IRQHandler
-  .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  TIM4_IRQHandler
-  .thumb_set TIM4_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  I2C2_EV_IRQHandler
-  .thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-  .weak  I2C2_ER_IRQHandler
-  .thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  SPI2_IRQHandler
-  .thumb_set SPI2_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  USART3_IRQHandler
-  .thumb_set USART3_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  CEC_IRQHandler
-  .thumb_set CEC_IRQHandler,Default_Handler
-
-  .weak  TIM6_DAC_IRQHandler
-  .thumb_set TIM6_DAC_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler
-  .thumb_set TIM7_IRQHandler,Default_Handler  
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
-

+ 0 - 467
Libraries/Startup/TrueSTUDIO/startup_stm32f10x_xl.s

@@ -1,467 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_xl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x XL-Density Devices vector table for TrueSTUDIO toolchain. 
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system and the external SRAM mounted on 
-  *                  STM3210E-EVAL board to be used as data memory (optional, 
-  *                  to be enabled by user)
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-    
-  .syntax unified
-  .cpu cortex-m3
-  .fpu softvfp
-  .thumb
-
-.global  g_pfnVectors
-.global  Default_Handler
-
-/* start address for the initialization values of the .data section. 
-defined in linker script */
-.word  _sidata
-/* start address for the .data section. defined in linker script */  
-.word  _sdata
-/* end address for the .data section. defined in linker script */
-.word  _edata
-/* start address for the .bss section. defined in linker script */
-.word  _sbss
-/* end address for the .bss section. defined in linker script */
-.word  _ebss
-
-.equ  BootRAM,        0xF1E0F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called. 
- * @param  None
- * @retval : None
-*/
-
-    .section  .text.Reset_Handler
-  .weak  Reset_Handler
-  .type  Reset_Handler, %function
-Reset_Handler:  
-
-/* Copy the data segment initializers from flash to SRAM */  
-  movs  r1, #0
-  b  LoopCopyDataInit
-
-CopyDataInit:
-  ldr  r3, =_sidata
-  ldr  r3, [r3, r1]
-  str  r3, [r0, r1]
-  adds  r1, r1, #4
-    
-LoopCopyDataInit:
-  ldr  r0, =_sdata
-  ldr  r3, =_edata
-  adds  r2, r0, r1
-  cmp  r2, r3
-  bcc  CopyDataInit
-  ldr  r2, =_sbss
-  b  LoopFillZerobss
-/* Zero fill the bss segment. */  
-FillZerobss:
-  movs  r3, #0
-  str  r3, [r2], #4
-    
-LoopFillZerobss:
-  ldr  r3, = _ebss
-  cmp  r2, r3
-  bcc  FillZerobss
-
-/* Call the clock system intitialization function.*/
-  bl  SystemInit
-/* Call static constructors */
-  bl __libc_init_array
-/* Call the application's entry point.*/
-  bl  main
-  bx  lr    
-.size  Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an 
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- * @param  None     
- * @retval None       
-*/
-    .section  .text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-  b  Infinite_Loop
-  .size  Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3. Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-* 
-*******************************************************************************/
-   .section  .isr_vector,"a",%progbits
-  .type  g_pfnVectors, %object
-  .size  g_pfnVectors, .-g_pfnVectors
-    
-    
-g_pfnVectors:
-  .word  _estack
-  .word  Reset_Handler
-  .word  NMI_Handler
-  .word  HardFault_Handler
-  .word  MemManage_Handler
-  .word  BusFault_Handler
-  .word  UsageFault_Handler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  SVC_Handler
-  .word  DebugMon_Handler
-  .word  0
-  .word  PendSV_Handler
-  .word  SysTick_Handler
-  .word  WWDG_IRQHandler
-  .word  PVD_IRQHandler
-  .word  TAMPER_IRQHandler
-  .word  RTC_IRQHandler
-  .word  FLASH_IRQHandler
-  .word  RCC_IRQHandler
-  .word  EXTI0_IRQHandler
-  .word  EXTI1_IRQHandler
-  .word  EXTI2_IRQHandler
-  .word  EXTI3_IRQHandler
-  .word  EXTI4_IRQHandler
-  .word  DMA1_Channel1_IRQHandler
-  .word  DMA1_Channel2_IRQHandler
-  .word  DMA1_Channel3_IRQHandler
-  .word  DMA1_Channel4_IRQHandler
-  .word  DMA1_Channel5_IRQHandler
-  .word  DMA1_Channel6_IRQHandler
-  .word  DMA1_Channel7_IRQHandler
-  .word  ADC1_2_IRQHandler
-  .word  USB_HP_CAN1_TX_IRQHandler
-  .word  USB_LP_CAN1_RX0_IRQHandler
-  .word  CAN1_RX1_IRQHandler
-  .word  CAN1_SCE_IRQHandler
-  .word  EXTI9_5_IRQHandler
-  .word  TIM1_BRK_TIM9_IRQHandler
-  .word  TIM1_UP_TIM10_IRQHandler
-  .word  TIM1_TRG_COM_TIM11_IRQHandler
-  .word  TIM1_CC_IRQHandler
-  .word  TIM2_IRQHandler
-  .word  TIM3_IRQHandler
-  .word  TIM4_IRQHandler
-  .word  I2C1_EV_IRQHandler
-  .word  I2C1_ER_IRQHandler
-  .word  I2C2_EV_IRQHandler
-  .word  I2C2_ER_IRQHandler
-  .word  SPI1_IRQHandler
-  .word  SPI2_IRQHandler
-  .word  USART1_IRQHandler
-  .word  USART2_IRQHandler
-  .word  USART3_IRQHandler
-  .word  EXTI15_10_IRQHandler
-  .word  RTCAlarm_IRQHandler
-  .word  USBWakeUp_IRQHandler
-  .word  TIM8_BRK_TIM12_IRQHandler
-  .word  TIM8_UP_TIM13_IRQHandler
-  .word  TIM8_TRG_COM_TIM14_IRQHandler
-  .word  TIM8_CC_IRQHandler
-  .word  ADC3_IRQHandler
-  .word  FSMC_IRQHandler
-  .word  SDIO_IRQHandler
-  .word  TIM5_IRQHandler
-  .word  SPI3_IRQHandler
-  .word  UART4_IRQHandler
-  .word  UART5_IRQHandler
-  .word  TIM6_IRQHandler
-  .word  TIM7_IRQHandler
-  .word  DMA2_Channel1_IRQHandler
-  .word  DMA2_Channel2_IRQHandler
-  .word  DMA2_Channel3_IRQHandler
-  .word  DMA2_Channel4_5_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  BootRAM       /* @0x1E0. This is for boot in RAM mode for 
-                         STM32F10x XL-Density devices. */
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler. 
-* As they are weak aliases, any function with the same name will override 
-* this definition.
-* 
-*******************************************************************************/
-    
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_2_IRQHandler
-  .thumb_set ADC1_2_IRQHandler,Default_Handler
-
-  .weak  USB_HP_CAN1_TX_IRQHandler
-  .thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
-
-  .weak  USB_LP_CAN1_RX0_IRQHandler
-  .thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
-
-  .weak  CAN1_RX1_IRQHandler
-  .thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-  .weak  CAN1_SCE_IRQHandler
-  .thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_TIM9_IRQHandler
-  .thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_TIM10_IRQHandler
-  .thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_TIM11_IRQHandler
-  .thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  TIM4_IRQHandler
-  .thumb_set TIM4_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  I2C2_EV_IRQHandler
-  .thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-  .weak  I2C2_ER_IRQHandler
-  .thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  SPI2_IRQHandler
-  .thumb_set SPI2_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  USART3_IRQHandler
-  .thumb_set USART3_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  USBWakeUp_IRQHandler
-  .thumb_set USBWakeUp_IRQHandler,Default_Handler
-
-  .weak  TIM8_BRK_TIM12_IRQHandler
-  .thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
-
-  .weak  TIM8_UP_TIM13_IRQHandler
-  .thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
-
-  .weak  TIM8_TRG_COM_TIM14_IRQHandler
-  .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
-
-  .weak  TIM8_CC_IRQHandler
-  .thumb_set TIM8_CC_IRQHandler,Default_Handler
-
-  .weak  ADC3_IRQHandler
-  .thumb_set ADC3_IRQHandler,Default_Handler
-
-  .weak  FSMC_IRQHandler
-  .thumb_set FSMC_IRQHandler,Default_Handler
-
-  .weak  SDIO_IRQHandler
-  .thumb_set SDIO_IRQHandler,Default_Handler
-
-  .weak  TIM5_IRQHandler
-  .thumb_set TIM5_IRQHandler,Default_Handler
-
-  .weak  SPI3_IRQHandler
-  .thumb_set SPI3_IRQHandler,Default_Handler
-
-  .weak  UART4_IRQHandler
-  .thumb_set UART4_IRQHandler,Default_Handler
-
-  .weak  UART5_IRQHandler
-  .thumb_set UART5_IRQHandler,Default_Handler
-
-  .weak  TIM6_IRQHandler
-  .thumb_set TIM6_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler
-  .thumb_set TIM7_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel1_IRQHandler
-  .thumb_set DMA2_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel2_IRQHandler
-  .thumb_set DMA2_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel3_IRQHandler
-  .thumb_set DMA2_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel4_5_IRQHandler
-  .thumb_set DMA2_Channel4_5_IRQHandler,Default_Handler
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 307
Libraries/Startup/arm/startup_stm32f10x_md.s

@@ -1,307 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
-;* File Name          : startup_stm32f10x_md.s
-;* Author             : MCD Application Team
-;* Version            : V3.5.0
-;* Date               : 11-March-2011
-;* Description        : STM32F10x Medium Density Devices vector table for MDK-ARM 
-;*                      toolchain.  
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Set the initial PC == Reset_Handler
-;*                      - Set the vector table entries with the exceptions ISR address
-;*                      - Configure the clock system
-;*                      - Branches to __main in the C library (which eventually
-;*                        calls main()).
-;*                      After Reset the CortexM3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;* <<< Use Configuration Wizard in Context Menu >>>   
-;*******************************************************************************
-; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-
-; Amount of memory (in bytes) allocated for Stack
-; Tailor this value to your application needs
-; <h> Stack Configuration
-;   <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
-; </h>
-
-Stack_Size      EQU     0x00000400
-
-                AREA    STACK, NOINIT, READWRITE, ALIGN=3
-Stack_Mem       SPACE   Stack_Size
-__initial_sp
-
-
-; <h> Heap Configuration
-;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
-; </h>
-
-Heap_Size       EQU     0x00000200
-
-                AREA    HEAP, NOINIT, READWRITE, ALIGN=3
-__heap_base
-Heap_Mem        SPACE   Heap_Size
-__heap_limit
-
-                PRESERVE8
-                THUMB
-
-
-; Vector Table Mapped to Address 0 at Reset
-                AREA    RESET, DATA, READONLY
-                EXPORT  __Vectors
-                EXPORT  __Vectors_End
-                EXPORT  __Vectors_Size
-
-__Vectors       DCD     __initial_sp               ; Top of Stack
-                DCD     Reset_Handler              ; Reset Handler
-                DCD     NMI_Handler                ; NMI Handler
-                DCD     HardFault_Handler          ; Hard Fault Handler
-                DCD     MemManage_Handler          ; MPU Fault Handler
-                DCD     BusFault_Handler           ; Bus Fault Handler
-                DCD     UsageFault_Handler         ; Usage Fault Handler
-                DCD     0                          ; Reserved
-                DCD     0                          ; Reserved
-                DCD     0                          ; Reserved
-                DCD     0                          ; Reserved
-                DCD     SVC_Handler                ; SVCall Handler
-                DCD     DebugMon_Handler           ; Debug Monitor Handler
-                DCD     0                          ; Reserved
-                DCD     PendSV_Handler             ; PendSV Handler
-                DCD     SysTick_Handler            ; SysTick Handler
-
-                ; External Interrupts
-                DCD     WWDG_IRQHandler            ; Window Watchdog
-                DCD     PVD_IRQHandler             ; PVD through EXTI Line detect
-                DCD     TAMPER_IRQHandler          ; Tamper
-                DCD     RTC_IRQHandler             ; RTC
-                DCD     FLASH_IRQHandler           ; Flash
-                DCD     RCC_IRQHandler             ; RCC
-                DCD     EXTI0_IRQHandler           ; EXTI Line 0
-                DCD     EXTI1_IRQHandler           ; EXTI Line 1
-                DCD     EXTI2_IRQHandler           ; EXTI Line 2
-                DCD     EXTI3_IRQHandler           ; EXTI Line 3
-                DCD     EXTI4_IRQHandler           ; EXTI Line 4
-                DCD     DMA1_Channel1_IRQHandler   ; DMA1 Channel 1
-                DCD     DMA1_Channel2_IRQHandler   ; DMA1 Channel 2
-                DCD     DMA1_Channel3_IRQHandler   ; DMA1 Channel 3
-                DCD     DMA1_Channel4_IRQHandler   ; DMA1 Channel 4
-                DCD     DMA1_Channel5_IRQHandler   ; DMA1 Channel 5
-                DCD     DMA1_Channel6_IRQHandler   ; DMA1 Channel 6
-                DCD     DMA1_Channel7_IRQHandler   ; DMA1 Channel 7
-                DCD     ADC1_2_IRQHandler          ; ADC1_2
-                DCD     USB_HP_CAN1_TX_IRQHandler  ; USB High Priority or CAN1 TX
-                DCD     USB_LP_CAN1_RX0_IRQHandler ; USB Low  Priority or CAN1 RX0
-                DCD     CAN1_RX1_IRQHandler        ; CAN1 RX1
-                DCD     CAN1_SCE_IRQHandler        ; CAN1 SCE
-                DCD     EXTI9_5_IRQHandler         ; EXTI Line 9..5
-                DCD     TIM1_BRK_IRQHandler        ; TIM1 Break
-                DCD     TIM1_UP_IRQHandler         ; TIM1 Update
-                DCD     TIM1_TRG_COM_IRQHandler    ; TIM1 Trigger and Commutation
-                DCD     TIM1_CC_IRQHandler         ; TIM1 Capture Compare
-                DCD     TIM2_IRQHandler            ; TIM2
-                DCD     TIM3_IRQHandler            ; TIM3
-                DCD     TIM4_IRQHandler            ; TIM4
-                DCD     I2C1_EV_IRQHandler         ; I2C1 Event
-                DCD     I2C1_ER_IRQHandler         ; I2C1 Error
-                DCD     I2C2_EV_IRQHandler         ; I2C2 Event
-                DCD     I2C2_ER_IRQHandler         ; I2C2 Error
-                DCD     SPI1_IRQHandler            ; SPI1
-                DCD     SPI2_IRQHandler            ; SPI2
-                DCD     USART1_IRQHandler          ; USART1
-                DCD     USART2_IRQHandler          ; USART2
-                DCD     USART3_IRQHandler          ; USART3
-                DCD     EXTI15_10_IRQHandler       ; EXTI Line 15..10
-                DCD     RTCAlarm_IRQHandler        ; RTC Alarm through EXTI Line
-                DCD     USBWakeUp_IRQHandler       ; USB Wakeup from suspend
-__Vectors_End
-
-__Vectors_Size  EQU  __Vectors_End - __Vectors
-
-                AREA    |.text|, CODE, READONLY
-
-; Reset handler
-Reset_Handler    PROC
-                 EXPORT  Reset_Handler             [WEAK]
-     IMPORT  __main
-     IMPORT  SystemInit
-                 LDR     R0, =SystemInit
-                 BLX     R0
-                 LDR     R0, =__main
-                 BX      R0
-                 ENDP
-
-; Dummy Exception Handlers (infinite loops which can be modified)
-
-NMI_Handler     PROC
-                EXPORT  NMI_Handler                [WEAK]
-                B       .
-                ENDP
-HardFault_Handler\
-                PROC
-                EXPORT  HardFault_Handler          [WEAK]
-                B       .
-                ENDP
-MemManage_Handler\
-                PROC
-                EXPORT  MemManage_Handler          [WEAK]
-                B       .
-                ENDP
-BusFault_Handler\
-                PROC
-                EXPORT  BusFault_Handler           [WEAK]
-                B       .
-                ENDP
-UsageFault_Handler\
-                PROC
-                EXPORT  UsageFault_Handler         [WEAK]
-                B       .
-                ENDP
-SVC_Handler     PROC
-                EXPORT  SVC_Handler                [WEAK]
-                B       .
-                ENDP
-DebugMon_Handler\
-                PROC
-                EXPORT  DebugMon_Handler           [WEAK]
-                B       .
-                ENDP
-PendSV_Handler  PROC
-                EXPORT  PendSV_Handler             [WEAK]
-                B       .
-                ENDP
-SysTick_Handler PROC
-                EXPORT  SysTick_Handler            [WEAK]
-                B       .
-                ENDP
-
-Default_Handler PROC
-
-                EXPORT  WWDG_IRQHandler            [WEAK]
-                EXPORT  PVD_IRQHandler             [WEAK]
-                EXPORT  TAMPER_IRQHandler          [WEAK]
-                EXPORT  RTC_IRQHandler             [WEAK]
-                EXPORT  FLASH_IRQHandler           [WEAK]
-                EXPORT  RCC_IRQHandler             [WEAK]
-                EXPORT  EXTI0_IRQHandler           [WEAK]
-                EXPORT  EXTI1_IRQHandler           [WEAK]
-                EXPORT  EXTI2_IRQHandler           [WEAK]
-                EXPORT  EXTI3_IRQHandler           [WEAK]
-                EXPORT  EXTI4_IRQHandler           [WEAK]
-                EXPORT  DMA1_Channel1_IRQHandler   [WEAK]
-                EXPORT  DMA1_Channel2_IRQHandler   [WEAK]
-                EXPORT  DMA1_Channel3_IRQHandler   [WEAK]
-                EXPORT  DMA1_Channel4_IRQHandler   [WEAK]
-                EXPORT  DMA1_Channel5_IRQHandler   [WEAK]
-                EXPORT  DMA1_Channel6_IRQHandler   [WEAK]
-                EXPORT  DMA1_Channel7_IRQHandler   [WEAK]
-                EXPORT  ADC1_2_IRQHandler          [WEAK]
-                EXPORT  USB_HP_CAN1_TX_IRQHandler  [WEAK]
-                EXPORT  USB_LP_CAN1_RX0_IRQHandler [WEAK]
-                EXPORT  CAN1_RX1_IRQHandler        [WEAK]
-                EXPORT  CAN1_SCE_IRQHandler        [WEAK]
-                EXPORT  EXTI9_5_IRQHandler         [WEAK]
-                EXPORT  TIM1_BRK_IRQHandler        [WEAK]
-                EXPORT  TIM1_UP_IRQHandler         [WEAK]
-                EXPORT  TIM1_TRG_COM_IRQHandler    [WEAK]
-                EXPORT  TIM1_CC_IRQHandler         [WEAK]
-                EXPORT  TIM2_IRQHandler            [WEAK]
-                EXPORT  TIM3_IRQHandler            [WEAK]
-                EXPORT  TIM4_IRQHandler            [WEAK]
-                EXPORT  I2C1_EV_IRQHandler         [WEAK]
-                EXPORT  I2C1_ER_IRQHandler         [WEAK]
-                EXPORT  I2C2_EV_IRQHandler         [WEAK]
-                EXPORT  I2C2_ER_IRQHandler         [WEAK]
-                EXPORT  SPI1_IRQHandler            [WEAK]
-                EXPORT  SPI2_IRQHandler            [WEAK]
-                EXPORT  USART1_IRQHandler          [WEAK]
-                EXPORT  USART2_IRQHandler          [WEAK]
-                EXPORT  USART3_IRQHandler          [WEAK]
-                EXPORT  EXTI15_10_IRQHandler       [WEAK]
-                EXPORT  RTCAlarm_IRQHandler        [WEAK]
-                EXPORT  USBWakeUp_IRQHandler       [WEAK]
-
-WWDG_IRQHandler
-PVD_IRQHandler
-TAMPER_IRQHandler
-RTC_IRQHandler
-FLASH_IRQHandler
-RCC_IRQHandler
-EXTI0_IRQHandler
-EXTI1_IRQHandler
-EXTI2_IRQHandler
-EXTI3_IRQHandler
-EXTI4_IRQHandler
-DMA1_Channel1_IRQHandler
-DMA1_Channel2_IRQHandler
-DMA1_Channel3_IRQHandler
-DMA1_Channel4_IRQHandler
-DMA1_Channel5_IRQHandler
-DMA1_Channel6_IRQHandler
-DMA1_Channel7_IRQHandler
-ADC1_2_IRQHandler
-USB_HP_CAN1_TX_IRQHandler
-USB_LP_CAN1_RX0_IRQHandler
-CAN1_RX1_IRQHandler
-CAN1_SCE_IRQHandler
-EXTI9_5_IRQHandler
-TIM1_BRK_IRQHandler
-TIM1_UP_IRQHandler
-TIM1_TRG_COM_IRQHandler
-TIM1_CC_IRQHandler
-TIM2_IRQHandler
-TIM3_IRQHandler
-TIM4_IRQHandler
-I2C1_EV_IRQHandler
-I2C1_ER_IRQHandler
-I2C2_EV_IRQHandler
-I2C2_ER_IRQHandler
-SPI1_IRQHandler
-SPI2_IRQHandler
-USART1_IRQHandler
-USART2_IRQHandler
-USART3_IRQHandler
-EXTI15_10_IRQHandler
-RTCAlarm_IRQHandler
-USBWakeUp_IRQHandler
-
-                B       .
-
-                ENDP
-
-                ALIGN
-
-;*******************************************************************************
-; User Stack and Heap initialization
-;*******************************************************************************
-                 IF      :DEF:__MICROLIB           
-                
-                 EXPORT  __initial_sp
-                 EXPORT  __heap_base
-                 EXPORT  __heap_limit
-                
-                 ELSE
-                
-                 IMPORT  __use_two_region_memory
-                 EXPORT  __user_initial_stackheap
-                 
-__user_initial_stackheap
-
-                 LDR     R0, =  Heap_Mem
-                 LDR     R1, =(Stack_Mem + Stack_Size)
-                 LDR     R2, = (Heap_Mem +  Heap_Size)
-                 LDR     R3, = Stack_Mem
-                 BX      LR
-
-                 ALIGN
-
-                 ENDIF
-
-                 END
-
-;******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE*****

+ 0 - 468
Libraries/Startup/gcc_ride7/startup_stm32f10x_cl.s

@@ -1,468 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_cl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Connectivity line Devices vector table for RIDE7 toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR 
-  *                  address.
-  *                - Configure the clock system    
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-    
-  .syntax unified
-  .cpu cortex-m3
-  .fpu softvfp
-  .thumb
-
-.global  g_pfnVectors
-.global  Default_Handler
-
-/* start address for the initialization values of the .data section. 
-defined in linker script */
-.word  _sidata
-/* start address for the .data section. defined in linker script */  
-.word  _sdata
-/* end address for the .data section. defined in linker script */
-.word  _edata
-/* start address for the .bss section. defined in linker script */
-.word  _sbss
-/* end address for the .bss section. defined in linker script */
-.word  _ebss
-
-.equ  BootRAM, 0xF1E0F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called. 
- * @param  None
- * @retval : None
-*/
-
-    .section  .text.Reset_Handler
-  .weak  Reset_Handler
-  .type  Reset_Handler, %function
-Reset_Handler:
-
-/* Copy the data segment initializers from flash to SRAM */
-  movs  r1, #0
-  b     LoopCopyDataInit
-
-CopyDataInit:
-  ldr   r3, =_sidata
-  ldr   r3, [r3, r1]
-  str   r3, [r0, r1]
-  adds  r1, r1, #4
-    
-LoopCopyDataInit:
-  ldr   r0, =_sdata
-  ldr   r3, =_edata
-  adds  r2, r0, r1
-  cmp   r2, r3
-  bcc   CopyDataInit
-  ldr   r2, =_sbss
-  b     LoopFillZerobss
-
-/* Zero fill the bss segment. */
-FillZerobss:
-  movs  r3, #0
-  str   r3, [r2], #4
-    
-LoopFillZerobss:
-  ldr   r3, = _ebss
-  cmp   r2, r3
-  bcc   FillZerobss
-/* Call the clock system intitialization function.*/
-  bl  SystemInit  
-/* Call the application's entry point.*/
-  bl    main
-  bx    lr
-.size   Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an 
- *         unexpected interrupt. This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- * @param  None
- * @retval None
-*/
-    .section  .text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-  b  Infinite_Loop
-  .size  Default_Handler, .-Default_Handler
-
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3. Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-* 
-*******************************************************************************/
-  .section  .isr_vector,"a",%progbits
-  .type  g_pfnVectors, %object
-  .size  g_pfnVectors, .-g_pfnVectors
-    
-    
-g_pfnVectors:
-  .word  _estack
-  .word  Reset_Handler
-  .word  NMI_Handler
-  .word  HardFault_Handler
-  .word  MemManage_Handler
-  .word  BusFault_Handler
-  .word  UsageFault_Handler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  SVC_Handler
-  .word  DebugMon_Handler
-  .word  0
-  .word  PendSV_Handler
-  .word  SysTick_Handler
-  .word  WWDG_IRQHandler
-  .word  PVD_IRQHandler
-  .word  TAMPER_IRQHandler
-  .word  RTC_IRQHandler
-  .word  FLASH_IRQHandler
-  .word  RCC_IRQHandler
-  .word  EXTI0_IRQHandler
-  .word  EXTI1_IRQHandler
-  .word  EXTI2_IRQHandler
-  .word  EXTI3_IRQHandler
-  .word  EXTI4_IRQHandler
-  .word  DMA1_Channel1_IRQHandler
-  .word  DMA1_Channel2_IRQHandler
-  .word  DMA1_Channel3_IRQHandler
-  .word  DMA1_Channel4_IRQHandler
-  .word  DMA1_Channel5_IRQHandler
-  .word  DMA1_Channel6_IRQHandler
-  .word  DMA1_Channel7_IRQHandler
-  .word  ADC1_2_IRQHandler
-  .word  CAN1_TX_IRQHandler
-  .word  CAN1_RX0_IRQHandler
-  .word  CAN1_RX1_IRQHandler
-  .word  CAN1_SCE_IRQHandler
-  .word  EXTI9_5_IRQHandler
-  .word  TIM1_BRK_IRQHandler
-  .word  TIM1_UP_IRQHandler
-  .word  TIM1_TRG_COM_IRQHandler
-  .word  TIM1_CC_IRQHandler
-  .word  TIM2_IRQHandler
-  .word  TIM3_IRQHandler
-  .word  TIM4_IRQHandler
-  .word  I2C1_EV_IRQHandler
-  .word  I2C1_ER_IRQHandler
-  .word  I2C2_EV_IRQHandler
-  .word  I2C2_ER_IRQHandler
-  .word  SPI1_IRQHandler
-  .word  SPI2_IRQHandler
-  .word  USART1_IRQHandler
-  .word  USART2_IRQHandler
-  .word  USART3_IRQHandler
-  .word  EXTI15_10_IRQHandler
-  .word  RTCAlarm_IRQHandler
-  .word  OTG_FS_WKUP_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  TIM5_IRQHandler
-  .word  SPI3_IRQHandler
-  .word  UART4_IRQHandler
-  .word  UART5_IRQHandler
-  .word  TIM6_IRQHandler
-  .word  TIM7_IRQHandler
-  .word  DMA2_Channel1_IRQHandler
-  .word  DMA2_Channel2_IRQHandler
-  .word  DMA2_Channel3_IRQHandler
-  .word  DMA2_Channel4_IRQHandler
-  .word  DMA2_Channel5_IRQHandler
-  .word  ETH_IRQHandler
-  .word  ETH_WKUP_IRQHandler
-  .word  CAN2_TX_IRQHandler
-  .word  CAN2_RX0_IRQHandler
-  .word  CAN2_RX1_IRQHandler
-  .word  CAN2_SCE_IRQHandler
-  .word  OTG_FS_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  BootRAM     /* @0x1E0. This is for boot in RAM mode for 
-                         STM32F10x Connectivity line Devices. */
-
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler. 
-* As they are weak aliases, any function with the same name will override 
-* this definition.
-*
-*******************************************************************************/
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_2_IRQHandler
-  .thumb_set ADC1_2_IRQHandler,Default_Handler
-
-  .weak  CAN1_TX_IRQHandler
-  .thumb_set CAN1_TX_IRQHandler,Default_Handler
-
-  .weak  CAN1_RX0_IRQHandler
-  .thumb_set CAN1_RX0_IRQHandler,Default_Handler
-
-  .weak  CAN1_RX1_IRQHandler
-  .thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-  .weak  CAN1_SCE_IRQHandler
-  .thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_IRQHandler
-  .thumb_set TIM1_BRK_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_IRQHandler
-  .thumb_set TIM1_UP_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_IRQHandler
-  .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  TIM4_IRQHandler
-  .thumb_set TIM4_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  I2C2_EV_IRQHandler
-  .thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-  .weak  I2C2_ER_IRQHandler
-  .thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  SPI2_IRQHandler
-  .thumb_set SPI2_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  USART3_IRQHandler
-  .thumb_set USART3_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  OTG_FS_WKUP_IRQHandler
-  .thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
-
-  .weak  TIM5_IRQHandler
-  .thumb_set TIM5_IRQHandler,Default_Handler
-
-  .weak  SPI3_IRQHandler  
-  .thumb_set SPI3_IRQHandler,Default_Handler
-
-  .weak  UART4_IRQHandler  
-  .thumb_set UART4_IRQHandler,Default_Handler
-
-  .weak  UART5_IRQHandler  
-  .thumb_set UART5_IRQHandler,Default_Handler
-
-  .weak  TIM6_IRQHandler  
-  .thumb_set TIM6_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler  
-  .thumb_set TIM7_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel1_IRQHandler  
-  .thumb_set DMA2_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel2_IRQHandler  
-  .thumb_set DMA2_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel3_IRQHandler  
-  .thumb_set DMA2_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel4_IRQHandler  
-  .thumb_set DMA2_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel5_IRQHandler  
-  .thumb_set DMA2_Channel5_IRQHandler,Default_Handler
-
-  .weak  ETH_IRQHandler  
-  .thumb_set ETH_IRQHandler,Default_Handler
-
-  .weak  ETH_WKUP_IRQHandler  
-  .thumb_set ETH_WKUP_IRQHandler,Default_Handler
-
-  .weak  CAN2_TX_IRQHandler  
-  .thumb_set CAN2_TX_IRQHandler,Default_Handler
-
-  .weak  CAN2_RX0_IRQHandler  
-  .thumb_set CAN2_RX0_IRQHandler,Default_Handler
-
-  .weak  CAN2_RX1_IRQHandler  
-  .thumb_set CAN2_RX1_IRQHandler,Default_Handler
-
-  .weak  CAN2_SCE_IRQHandler  
-  .thumb_set CAN2_SCE_IRQHandler,Default_Handler
-
-  .weak  OTG_FS_IRQHandler  
-  .thumb_set OTG_FS_IRQHandler ,Default_Handler
- 
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 465
Libraries/Startup/gcc_ride7/startup_stm32f10x_hd.s

@@ -1,465 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_hd.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x High Density Devices vector table for RIDE7 toolchain. 
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system and the external SRAM mounted on 
-  *                  STM3210E-EVAL board to be used as data memory (optional, 
-  *                  to be enabled by user)
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-    
-  .syntax unified
-  .cpu cortex-m3
-  .fpu softvfp
-  .thumb
-
-.global  g_pfnVectors
-.global  Default_Handler
-
-/* start address for the initialization values of the .data section. 
-defined in linker script */
-.word  _sidata
-/* start address for the .data section. defined in linker script */  
-.word  _sdata
-/* end address for the .data section. defined in linker script */
-.word  _edata
-/* start address for the .bss section. defined in linker script */
-.word  _sbss
-/* end address for the .bss section. defined in linker script */
-.word  _ebss
-/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
-
-.equ  BootRAM,        0xF1E0F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called. 
- * @param  None
- * @retval : None
-*/
-
-    .section  .text.Reset_Handler
-  .weak  Reset_Handler
-  .type  Reset_Handler, %function
-Reset_Handler:  
-
-/* Copy the data segment initializers from flash to SRAM */  
-  movs  r1, #0
-  b  LoopCopyDataInit
-
-CopyDataInit:
-  ldr  r3, =_sidata
-  ldr  r3, [r3, r1]
-  str  r3, [r0, r1]
-  adds  r1, r1, #4
-    
-LoopCopyDataInit:
-  ldr  r0, =_sdata
-  ldr  r3, =_edata
-  adds  r2, r0, r1
-  cmp  r2, r3
-  bcc  CopyDataInit
-  ldr  r2, =_sbss
-  b  LoopFillZerobss
-/* Zero fill the bss segment. */  
-FillZerobss:
-  movs  r3, #0
-  str  r3, [r2], #4
-    
-LoopFillZerobss:
-  ldr  r3, = _ebss
-  cmp  r2, r3
-  bcc  FillZerobss
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
-/* Call the application's entry point.*/
-  bl  main
-  bx  lr    
-.size  Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an 
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- * @param  None     
- * @retval None       
-*/
-    .section  .text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-  b  Infinite_Loop
-  .size  Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3. Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-* 
-*******************************************************************************/
-   .section  .isr_vector,"a",%progbits
-  .type  g_pfnVectors, %object
-  .size  g_pfnVectors, .-g_pfnVectors
-    
-    
-g_pfnVectors:
-  .word  _estack
-  .word  Reset_Handler
-  .word  NMI_Handler
-  .word  HardFault_Handler
-  .word  MemManage_Handler
-  .word  BusFault_Handler
-  .word  UsageFault_Handler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  SVC_Handler
-  .word  DebugMon_Handler
-  .word  0
-  .word  PendSV_Handler
-  .word  SysTick_Handler
-  .word  WWDG_IRQHandler
-  .word  PVD_IRQHandler
-  .word  TAMPER_IRQHandler
-  .word  RTC_IRQHandler
-  .word  FLASH_IRQHandler
-  .word  RCC_IRQHandler
-  .word  EXTI0_IRQHandler
-  .word  EXTI1_IRQHandler
-  .word  EXTI2_IRQHandler
-  .word  EXTI3_IRQHandler
-  .word  EXTI4_IRQHandler
-  .word  DMA1_Channel1_IRQHandler
-  .word  DMA1_Channel2_IRQHandler
-  .word  DMA1_Channel3_IRQHandler
-  .word  DMA1_Channel4_IRQHandler
-  .word  DMA1_Channel5_IRQHandler
-  .word  DMA1_Channel6_IRQHandler
-  .word  DMA1_Channel7_IRQHandler
-  .word  ADC1_2_IRQHandler
-  .word  USB_HP_CAN1_TX_IRQHandler
-  .word  USB_LP_CAN1_RX0_IRQHandler
-  .word  CAN1_RX1_IRQHandler
-  .word  CAN1_SCE_IRQHandler
-  .word  EXTI9_5_IRQHandler
-  .word  TIM1_BRK_IRQHandler
-  .word  TIM1_UP_IRQHandler
-  .word  TIM1_TRG_COM_IRQHandler
-  .word  TIM1_CC_IRQHandler
-  .word  TIM2_IRQHandler
-  .word  TIM3_IRQHandler
-  .word  TIM4_IRQHandler
-  .word  I2C1_EV_IRQHandler
-  .word  I2C1_ER_IRQHandler
-  .word  I2C2_EV_IRQHandler
-  .word  I2C2_ER_IRQHandler
-  .word  SPI1_IRQHandler
-  .word  SPI2_IRQHandler
-  .word  USART1_IRQHandler
-  .word  USART2_IRQHandler
-  .word  USART3_IRQHandler
-  .word  EXTI15_10_IRQHandler
-  .word  RTCAlarm_IRQHandler
-  .word  USBWakeUp_IRQHandler
-  .word  TIM8_BRK_IRQHandler
-  .word  TIM8_UP_IRQHandler
-  .word  TIM8_TRG_COM_IRQHandler
-  .word  TIM8_CC_IRQHandler
-  .word  ADC3_IRQHandler
-  .word  FSMC_IRQHandler
-  .word  SDIO_IRQHandler
-  .word  TIM5_IRQHandler
-  .word  SPI3_IRQHandler
-  .word  UART4_IRQHandler
-  .word  UART5_IRQHandler
-  .word  TIM6_IRQHandler
-  .word  TIM7_IRQHandler
-  .word  DMA2_Channel1_IRQHandler
-  .word  DMA2_Channel2_IRQHandler
-  .word  DMA2_Channel3_IRQHandler
-  .word  DMA2_Channel4_5_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  BootRAM       /* @0x1E0. This is for boot in RAM mode for 
-                         STM32F10x High Density devices. */
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler. 
-* As they are weak aliases, any function with the same name will override 
-* this definition.
-* 
-*******************************************************************************/
-    
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_2_IRQHandler
-  .thumb_set ADC1_2_IRQHandler,Default_Handler
-
-  .weak  USB_HP_CAN1_TX_IRQHandler
-  .thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
-
-  .weak  USB_LP_CAN1_RX0_IRQHandler
-  .thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
-
-  .weak  CAN1_RX1_IRQHandler
-  .thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-  .weak  CAN1_SCE_IRQHandler
-  .thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_IRQHandler
-  .thumb_set TIM1_BRK_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_IRQHandler
-  .thumb_set TIM1_UP_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_IRQHandler
-  .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  TIM4_IRQHandler
-  .thumb_set TIM4_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  I2C2_EV_IRQHandler
-  .thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-  .weak  I2C2_ER_IRQHandler
-  .thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  SPI2_IRQHandler
-  .thumb_set SPI2_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  USART3_IRQHandler
-  .thumb_set USART3_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  USBWakeUp_IRQHandler
-  .thumb_set USBWakeUp_IRQHandler,Default_Handler
-
-  .weak  TIM8_BRK_IRQHandler
-  .thumb_set TIM8_BRK_IRQHandler,Default_Handler
-
-  .weak  TIM8_UP_IRQHandler
-  .thumb_set TIM8_UP_IRQHandler,Default_Handler
-
-  .weak  TIM8_TRG_COM_IRQHandler
-  .thumb_set TIM8_TRG_COM_IRQHandler,Default_Handler
-
-  .weak  TIM8_CC_IRQHandler
-  .thumb_set TIM8_CC_IRQHandler,Default_Handler
-
-  .weak  ADC3_IRQHandler
-  .thumb_set ADC3_IRQHandler,Default_Handler
-
-  .weak  FSMC_IRQHandler
-  .thumb_set FSMC_IRQHandler,Default_Handler
-
-  .weak  SDIO_IRQHandler
-  .thumb_set SDIO_IRQHandler,Default_Handler
-
-  .weak  TIM5_IRQHandler
-  .thumb_set TIM5_IRQHandler,Default_Handler
-
-  .weak  SPI3_IRQHandler
-  .thumb_set SPI3_IRQHandler,Default_Handler
-
-  .weak  UART4_IRQHandler
-  .thumb_set UART4_IRQHandler,Default_Handler
-
-  .weak  UART5_IRQHandler
-  .thumb_set UART5_IRQHandler,Default_Handler
-
-  .weak  TIM6_IRQHandler
-  .thumb_set TIM6_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler
-  .thumb_set TIM7_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel1_IRQHandler
-  .thumb_set DMA2_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel2_IRQHandler
-  .thumb_set DMA2_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel3_IRQHandler
-  .thumb_set DMA2_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel4_5_IRQHandler
-  .thumb_set DMA2_Channel4_5_IRQHandler,Default_Handler
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 442
Libraries/Startup/gcc_ride7/startup_stm32f10x_hd_vl.s

@@ -1,442 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_hd_vl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x High Density Value Line Devices vector table for RIDE7
-  *            toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system and the external SRAM mounted on 
-  *                  STM32100E-EVAL board to be used as data memory (optional, 
-  *                  to be enabled by user)               
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-    
-  .syntax unified
-  .cpu cortex-m3
-  .fpu softvfp
-  .thumb
-
-.global  g_pfnVectors
-.global  Default_Handler
-
-/* start address for the initialization values of the .data section. 
-defined in linker script */
-.word  _sidata
-/* start address for the .data section. defined in linker script */  
-.word  _sdata
-/* end address for the .data section. defined in linker script */
-.word  _edata
-/* start address for the .bss section. defined in linker script */
-.word  _sbss
-/* end address for the .bss section. defined in linker script */
-.word  _ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called. 
- * @param  None
- * @retval None
-*/
-
-  .section  .text.Reset_Handler
-  .weak  Reset_Handler
-  .type  Reset_Handler, %function
-Reset_Handler:  
-
-/* Copy the data segment initializers from flash to SRAM */  
-  movs  r1, #0
-  b     LoopCopyDataInit
-
-CopyDataInit:
-  ldr   r3, =_sidata
-  ldr   r3, [r3, r1]
-  str   r3, [r0, r1]
-  adds  r1, r1, #4
-    
-LoopCopyDataInit:
-  ldr   r0, =_sdata
-  ldr   r3, =_edata
-  adds  r2, r0, r1
-  cmp   r2, r3
-  bcc   CopyDataInit
-  ldr   r2, =_sbss
-  b     LoopFillZerobss
-/* Zero fill the bss segment. */  
-FillZerobss:
-  movs  r3, #0
-  str   r3, [r2], #4
-    
-LoopFillZerobss:
-  ldr   r3, = _ebss
-  cmp   r2, r3
-  bcc   FillZerobss
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
-/* Call the application's entry point.*/
-  bl    main
-  bx    lr    
-.size   Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an 
- *         unexpected interrupt. This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- * @param  None     
- * @retval None       
-*/
-  .section  .text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-  b  Infinite_Loop
-  .size  Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3. Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-* 
-******************************************************************************/    
-  .section  .isr_vector,"a",%progbits
-  .type  g_pfnVectors, %object
-  .size  g_pfnVectors, .-g_pfnVectors
-
-g_pfnVectors:
-  .word  _estack
-  .word  Reset_Handler
-  .word  NMI_Handler
-  .word  HardFault_Handler
-  .word  MemManage_Handler
-  .word  BusFault_Handler
-  .word  UsageFault_Handler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  SVC_Handler
-  .word  DebugMon_Handler
-  .word  0
-  .word  PendSV_Handler
-  .word  SysTick_Handler
-  .word  WWDG_IRQHandler
-  .word  PVD_IRQHandler
-  .word  TAMPER_IRQHandler
-  .word  RTC_IRQHandler
-  .word  FLASH_IRQHandler
-  .word  RCC_IRQHandler
-  .word  EXTI0_IRQHandler
-  .word  EXTI1_IRQHandler
-  .word  EXTI2_IRQHandler
-  .word  EXTI3_IRQHandler
-  .word  EXTI4_IRQHandler
-  .word  DMA1_Channel1_IRQHandler
-  .word  DMA1_Channel2_IRQHandler
-  .word  DMA1_Channel3_IRQHandler
-  .word  DMA1_Channel4_IRQHandler
-  .word  DMA1_Channel5_IRQHandler
-  .word  DMA1_Channel6_IRQHandler
-  .word  DMA1_Channel7_IRQHandler
-  .word  ADC1_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  EXTI9_5_IRQHandler
-  .word  TIM1_BRK_TIM15_IRQHandler
-  .word  TIM1_UP_TIM16_IRQHandler
-  .word  TIM1_TRG_COM_TIM17_IRQHandler
-  .word  TIM1_CC_IRQHandler
-  .word  TIM2_IRQHandler
-  .word  TIM3_IRQHandler
-  .word  TIM4_IRQHandler
-  .word  I2C1_EV_IRQHandler
-  .word  I2C1_ER_IRQHandler
-  .word  I2C2_EV_IRQHandler
-  .word  I2C2_ER_IRQHandler
-  .word  SPI1_IRQHandler
-  .word  SPI2_IRQHandler
-  .word  USART1_IRQHandler
-  .word  USART2_IRQHandler
-  .word  USART3_IRQHandler
-  .word  EXTI15_10_IRQHandler
-  .word  RTCAlarm_IRQHandler
-  .word  CEC_IRQHandler  
-  .word  TIM12_IRQHandler
-  .word  TIM13_IRQHandler
-  .word  TIM14_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  TIM5_IRQHandler
-  .word  SPI3_IRQHandler
-  .word  UART4_IRQHandler
-  .word  UART5_IRQHandler
-  .word  TIM6_DAC_IRQHandler
-  .word  TIM7_IRQHandler  
-  .word  DMA2_Channel1_IRQHandler
-  .word  DMA2_Channel2_IRQHandler
-  .word  DMA2_Channel3_IRQHandler
-  .word  DMA2_Channel4_5_IRQHandler
-  .word  DMA2_Channel5_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  BootRAM       /* @0x1E0. This is for boot in RAM mode for 
-                         STM32F10x High Density Value line devices. */
-   
-/*******************************************************************************
-* Provide weak aliases for each Exception handler to the Default_Handler. 
-* As they are weak aliases, any function with the same name will override 
-* this definition.
-*******************************************************************************/
-    
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_IRQHandler
-  .thumb_set ADC1_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_TIM15_IRQHandler
-  .thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_TIM16_IRQHandler
-  .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_TIM17_IRQHandler
-  .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  TIM4_IRQHandler
-  .thumb_set TIM4_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  I2C2_EV_IRQHandler
-  .thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-  .weak  I2C2_ER_IRQHandler
-  .thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  SPI2_IRQHandler
-  .thumb_set SPI2_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  USART3_IRQHandler
-  .thumb_set USART3_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  CEC_IRQHandler
-  .thumb_set CEC_IRQHandler,Default_Handler
-
-  .weak  TIM12_IRQHandler
-  .thumb_set TIM12_IRQHandler,Default_Handler
-
-  .weak  TIM13_IRQHandler
-  .thumb_set TIM13_IRQHandler,Default_Handler
-
-  .weak  TIM14_IRQHandler
-  .thumb_set TIM14_IRQHandler,Default_Handler
-
-  .weak  TIM5_IRQHandler
-  .thumb_set TIM5_IRQHandler,Default_Handler
-
-  .weak  SPI3_IRQHandler
-  .thumb_set SPI3_IRQHandler,Default_Handler
-
-  .weak  UART4_IRQHandler
-  .thumb_set UART4_IRQHandler,Default_Handler
-
-  .weak  UART5_IRQHandler
-  .thumb_set UART5_IRQHandler,Default_Handler
-  
-  .weak  TIM6_DAC_IRQHandler
-  .thumb_set TIM6_DAC_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler
-  .thumb_set TIM7_IRQHandler,Default_Handler 
-
-  .weak  DMA2_Channel1_IRQHandler
-  .thumb_set DMA2_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel2_IRQHandler
-  .thumb_set DMA2_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel3_IRQHandler
-  .thumb_set DMA2_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel4_5_IRQHandler
-  .thumb_set DMA2_Channel4_5_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel5_IRQHandler
-  .thumb_set DMA2_Channel5_IRQHandler,Default_Handler      
-  
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 343
Libraries/Startup/gcc_ride7/startup_stm32f10x_ld.s

@@ -1,343 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_ld.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Low Density Devices vector table for RIDE7 toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system  
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */	
-    
-  .syntax unified
-	.cpu cortex-m3
-	.fpu softvfp
-	.thumb
-
-.global	g_pfnVectors
-.global	Default_Handler
-
-/* start address for the initialization values of the .data section. 
-defined in linker script */
-.word	_sidata
-/* start address for the .data section. defined in linker script */  
-.word	_sdata
-/* end address for the .data section. defined in linker script */
-.word	_edata
-/* start address for the .bss section. defined in linker script */
-.word	_sbss
-/* end address for the .bss section. defined in linker script */
-.word	_ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called. 
- * @param  None
- * @retval : None
-*/
-
-    .section	.text.Reset_Handler
-	.weak	Reset_Handler
-	.type	Reset_Handler, %function
-Reset_Handler:	
-
-/* Copy the data segment initializers from flash to SRAM */  
-  movs	r1, #0
-  b	LoopCopyDataInit
-
-CopyDataInit:
-	ldr	r3, =_sidata
-	ldr	r3, [r3, r1]
-	str	r3, [r0, r1]
-	adds	r1, r1, #4
-    
-LoopCopyDataInit:
-	ldr	r0, =_sdata
-	ldr	r3, =_edata
-	adds	r2, r0, r1
-	cmp	r2, r3
-	bcc	CopyDataInit
-	ldr	r2, =_sbss
-	b	LoopFillZerobss
-/* Zero fill the bss segment. */  
-FillZerobss:
-	movs	r3, #0
-	str	r3, [r2], #4
-    
-LoopFillZerobss:
-	ldr	r3, = _ebss
-	cmp	r2, r3
-	bcc	FillZerobss
-/* Call the clock system intitialization function.*/
-  bl  SystemInit  
-/* Call the application's entry point.*/
-	bl	main
-	bx	lr    
-.size	Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an 
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- * @param  None     
- * @retval None       
-*/
-    .section	.text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-	b	Infinite_Loop
-	.size	Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3.  Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/    
- 	.section	.isr_vector,"a",%progbits
-	.type	g_pfnVectors, %object
-	.size	g_pfnVectors, .-g_pfnVectors
-    
-    
-g_pfnVectors:
-	.word	_estack
-	.word	Reset_Handler
-	.word	NMI_Handler
-	.word	HardFault_Handler
-	.word	MemManage_Handler
-	.word	BusFault_Handler
-	.word	UsageFault_Handler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	SVC_Handler
-	.word	DebugMon_Handler
-	.word	0
-	.word	PendSV_Handler
-	.word	SysTick_Handler
-	.word	WWDG_IRQHandler
-	.word	PVD_IRQHandler
-	.word	TAMPER_IRQHandler
-	.word	RTC_IRQHandler
-	.word	FLASH_IRQHandler
-	.word	RCC_IRQHandler
-	.word	EXTI0_IRQHandler
-	.word	EXTI1_IRQHandler
-	.word	EXTI2_IRQHandler
-	.word	EXTI3_IRQHandler
-	.word	EXTI4_IRQHandler
-	.word	DMA1_Channel1_IRQHandler
-	.word	DMA1_Channel2_IRQHandler
-	.word	DMA1_Channel3_IRQHandler
-	.word	DMA1_Channel4_IRQHandler
-	.word	DMA1_Channel5_IRQHandler
-	.word	DMA1_Channel6_IRQHandler
-	.word	DMA1_Channel7_IRQHandler
-	.word	ADC1_2_IRQHandler
-	.word	USB_HP_CAN1_TX_IRQHandler
-	.word	USB_LP_CAN1_RX0_IRQHandler
-	.word	CAN1_RX1_IRQHandler
-	.word	CAN1_SCE_IRQHandler
-	.word	EXTI9_5_IRQHandler
-	.word	TIM1_BRK_IRQHandler
-	.word	TIM1_UP_IRQHandler
-	.word	TIM1_TRG_COM_IRQHandler
-	.word	TIM1_CC_IRQHandler
-	.word	TIM2_IRQHandler
-	.word	TIM3_IRQHandler
-	.word	0
-	.word	I2C1_EV_IRQHandler
-	.word	I2C1_ER_IRQHandler
-	.word	0
-	.word	0
-	.word	SPI1_IRQHandler
-	.word	0
-	.word	USART1_IRQHandler
-	.word	USART2_IRQHandler
-	.word	0
-	.word	EXTI15_10_IRQHandler
-	.word	RTCAlarm_IRQHandler
-	.word	USBWakeUp_IRQHandler	
-  .word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	BootRAM        /* @0x108. This is for boot in RAM mode for 
-                          STM32F10x Low Density devices.*/
-   
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler. 
-* As they are weak aliases, any function with the same name will override 
-* this definition.
-*
-*******************************************************************************/
-    
-  .weak	NMI_Handler
-	.thumb_set NMI_Handler,Default_Handler
-	
-  .weak	HardFault_Handler
-	.thumb_set HardFault_Handler,Default_Handler
-	
-  .weak	MemManage_Handler
-	.thumb_set MemManage_Handler,Default_Handler
-	
-  .weak	BusFault_Handler
-	.thumb_set BusFault_Handler,Default_Handler
-
-	.weak	UsageFault_Handler
-	.thumb_set UsageFault_Handler,Default_Handler
-
-	.weak	SVC_Handler
-	.thumb_set SVC_Handler,Default_Handler
-
-	.weak	DebugMon_Handler
-	.thumb_set DebugMon_Handler,Default_Handler
-
-	.weak	PendSV_Handler
-	.thumb_set PendSV_Handler,Default_Handler
-
-	.weak	SysTick_Handler
-	.thumb_set SysTick_Handler,Default_Handler
-
-	.weak	WWDG_IRQHandler
-	.thumb_set WWDG_IRQHandler,Default_Handler
-
-	.weak	PVD_IRQHandler
-	.thumb_set PVD_IRQHandler,Default_Handler
-
-	.weak	TAMPER_IRQHandler
-	.thumb_set TAMPER_IRQHandler,Default_Handler
-
-	.weak	RTC_IRQHandler
-	.thumb_set RTC_IRQHandler,Default_Handler
-
-	.weak	FLASH_IRQHandler
-	.thumb_set FLASH_IRQHandler,Default_Handler
-
-	.weak	RCC_IRQHandler
-	.thumb_set RCC_IRQHandler,Default_Handler
-
-	.weak	EXTI0_IRQHandler
-	.thumb_set EXTI0_IRQHandler,Default_Handler
-
-	.weak	EXTI1_IRQHandler
-	.thumb_set EXTI1_IRQHandler,Default_Handler
-
-	.weak	EXTI2_IRQHandler
-	.thumb_set EXTI2_IRQHandler,Default_Handler
-
-	.weak	EXTI3_IRQHandler
-	.thumb_set EXTI3_IRQHandler,Default_Handler
-
-	.weak	EXTI4_IRQHandler
-	.thumb_set EXTI4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel1_IRQHandler
-	.thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel2_IRQHandler
-	.thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel3_IRQHandler
-	.thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel4_IRQHandler
-	.thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel5_IRQHandler
-	.thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel6_IRQHandler
-	.thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel7_IRQHandler
-	.thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-	.weak	ADC1_2_IRQHandler
-	.thumb_set ADC1_2_IRQHandler,Default_Handler
-
-	.weak	USB_HP_CAN1_TX_IRQHandler
-	.thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
-
-	.weak	USB_LP_CAN1_RX0_IRQHandler
-	.thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
-
-	.weak	CAN1_RX1_IRQHandler
-	.thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-	.weak	CAN1_SCE_IRQHandler
-	.thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-	.weak	EXTI9_5_IRQHandler
-	.thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-	.weak	TIM1_BRK_IRQHandler
-	.thumb_set TIM1_BRK_IRQHandler,Default_Handler
-
-	.weak	TIM1_UP_IRQHandler
-	.thumb_set TIM1_UP_IRQHandler,Default_Handler
-
-	.weak	TIM1_TRG_COM_IRQHandler
-	.thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
-
-	.weak	TIM1_CC_IRQHandler
-	.thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-	.weak	TIM2_IRQHandler
-	.thumb_set TIM2_IRQHandler,Default_Handler
-
-	.weak	TIM3_IRQHandler
-	.thumb_set TIM3_IRQHandler,Default_Handler
-
-	.weak	I2C1_EV_IRQHandler
-	.thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-	.weak	I2C1_ER_IRQHandler
-	.thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-	.weak	SPI1_IRQHandler
-	.thumb_set SPI1_IRQHandler,Default_Handler
-
-	.weak	USART1_IRQHandler
-	.thumb_set USART1_IRQHandler,Default_Handler
-
-	.weak	USART2_IRQHandler
-	.thumb_set USART2_IRQHandler,Default_Handler
-
-	.weak	EXTI15_10_IRQHandler
-	.thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-	.weak	RTCAlarm_IRQHandler
-	.thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-	.weak	USBWakeUp_IRQHandler
-	.thumb_set USBWakeUp_IRQHandler,Default_Handler  
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 383
Libraries/Startup/gcc_ride7/startup_stm32f10x_ld_vl.s

@@ -1,383 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_ld_vl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Low Density Value Line Devices vector table for RIDE7
-  *            toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system 
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-    
-  .syntax unified
-  .cpu cortex-m3
-  .fpu softvfp
-  .thumb
-
-.global  g_pfnVectors
-.global  Default_Handler
-
-/* start address for the initialization values of the .data section. 
-defined in linker script */
-.word  _sidata
-/* start address for the .data section. defined in linker script */  
-.word  _sdata
-/* end address for the .data section. defined in linker script */
-.word  _edata
-/* start address for the .bss section. defined in linker script */
-.word  _sbss
-/* end address for the .bss section. defined in linker script */
-.word  _ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called. 
- * @param  None
- * @retval None
-*/
-
-  .section  .text.Reset_Handler
-  .weak  Reset_Handler
-  .type  Reset_Handler, %function
-Reset_Handler:  
-
-/* Copy the data segment initializers from flash to SRAM */  
-  movs  r1, #0
-  b     LoopCopyDataInit
-
-CopyDataInit:
-  ldr   r3, =_sidata
-  ldr   r3, [r3, r1]
-  str   r3, [r0, r1]
-  adds  r1, r1, #4
-    
-LoopCopyDataInit:
-  ldr   r0, =_sdata
-  ldr   r3, =_edata
-  adds  r2, r0, r1
-  cmp   r2, r3
-  bcc   CopyDataInit
-  ldr   r2, =_sbss
-  b     LoopFillZerobss
-/* Zero fill the bss segment. */  
-FillZerobss:
-  movs  r3, #0
-  str   r3, [r2], #4
-    
-LoopFillZerobss:
-  ldr   r3, = _ebss
-  cmp   r2, r3
-  bcc   FillZerobss
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
-/* Call the application's entry point.*/
-  bl    main
-  bx    lr    
-.size  Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an 
- *         unexpected interrupt. This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- * @param  None     
- * @retval None       
-*/
-  .section  .text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-  b  Infinite_Loop
-  .size  Default_Handler, .-Default_Handler
-/******************************************************************************
-* The minimal vector table for a Cortex M3. Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-* 
-******************************************************************************/    
-  .section  .isr_vector,"a",%progbits
-  .type  g_pfnVectors, %object
-  .size  g_pfnVectors, .-g_pfnVectors
-
-g_pfnVectors:
-  .word  _estack
-  .word  Reset_Handler
-  .word  NMI_Handler
-  .word  HardFault_Handler
-  .word  MemManage_Handler
-  .word  BusFault_Handler
-  .word  UsageFault_Handler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  SVC_Handler
-  .word  DebugMon_Handler
-  .word  0
-  .word  PendSV_Handler
-  .word  SysTick_Handler
-  .word  WWDG_IRQHandler
-  .word  PVD_IRQHandler
-  .word  TAMPER_IRQHandler
-  .word  RTC_IRQHandler
-  .word  FLASH_IRQHandler
-  .word  RCC_IRQHandler
-  .word  EXTI0_IRQHandler
-  .word  EXTI1_IRQHandler
-  .word  EXTI2_IRQHandler
-  .word  EXTI3_IRQHandler
-  .word  EXTI4_IRQHandler
-  .word  DMA1_Channel1_IRQHandler
-  .word  DMA1_Channel2_IRQHandler
-  .word  DMA1_Channel3_IRQHandler
-  .word  DMA1_Channel4_IRQHandler
-  .word  DMA1_Channel5_IRQHandler
-  .word  DMA1_Channel6_IRQHandler
-  .word  DMA1_Channel7_IRQHandler
-  .word  ADC1_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  EXTI9_5_IRQHandler
-  .word  TIM1_BRK_TIM15_IRQHandler
-  .word  TIM1_UP_TIM16_IRQHandler
-  .word  TIM1_TRG_COM_TIM17_IRQHandler
-  .word  TIM1_CC_IRQHandler
-  .word  TIM2_IRQHandler
-  .word  TIM3_IRQHandler
-  .word  0
-  .word  I2C1_EV_IRQHandler
-  .word  I2C1_ER_IRQHandler
-  .word  0
-  .word  0
-  .word  SPI1_IRQHandler
-  .word  0
-  .word  USART1_IRQHandler
-  .word  USART2_IRQHandler
-  .word  0
-  .word  EXTI15_10_IRQHandler
-  .word  RTCAlarm_IRQHandler
-  .word  CEC_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  TIM6_DAC_IRQHandler
-  .word  TIM7_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  BootRAM          /* @0x01CC. This is for boot in RAM mode for 
-                            STM32F10x Low Density Value Line devices. */
-   
-/*******************************************************************************
-* Provide weak aliases for each Exception handler to the Default_Handler. 
-* As they are weak aliases, any function with the same name will override 
-* this definition.
-*******************************************************************************/
-    
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_IRQHandler
-  .thumb_set ADC1_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_TIM15_IRQHandler
-  .thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_TIM16_IRQHandler
-  .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_TIM17_IRQHandler
-  .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  CEC_IRQHandler
-  .thumb_set CEC_IRQHandler,Default_Handler
-
-  .weak  TIM6_DAC_IRQHandler
-  .thumb_set TIM6_DAC_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler
-  .thumb_set TIM7_IRQHandler,Default_Handler  
-  
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 358
Libraries/Startup/gcc_ride7/startup_stm32f10x_md.s

@@ -1,358 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_md.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Medium Density Devices vector table for RIDE7 toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system 
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-    
-  .syntax unified
-	.cpu cortex-m3
-	.fpu softvfp
-	.thumb
-
-.global	g_pfnVectors
-.global	Default_Handler
-
-/* start address for the initialization values of the .data section. 
-defined in linker script */
-.word	_sidata
-/* start address for the .data section. defined in linker script */  
-.word	_sdata
-/* end address for the .data section. defined in linker script */
-.word	_edata
-/* start address for the .bss section. defined in linker script */
-.word	_sbss
-/* end address for the .bss section. defined in linker script */
-.word	_ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called. 
- * @param  None
- * @retval : None
-*/
-
-    .section	.text.Reset_Handler
-	.weak	Reset_Handler
-	.type	Reset_Handler, %function
-Reset_Handler:	
-
-/* Copy the data segment initializers from flash to SRAM */  
-  movs	r1, #0
-  b	LoopCopyDataInit
-
-CopyDataInit:
-	ldr	r3, =_sidata
-	ldr	r3, [r3, r1]
-	str	r3, [r0, r1]
-	adds	r1, r1, #4
-    
-LoopCopyDataInit:
-	ldr	r0, =_sdata
-	ldr	r3, =_edata
-	adds	r2, r0, r1
-	cmp	r2, r3
-	bcc	CopyDataInit
-	ldr	r2, =_sbss
-	b	LoopFillZerobss
-/* Zero fill the bss segment. */  
-FillZerobss:
-	movs	r3, #0
-	str	r3, [r2], #4
-    
-LoopFillZerobss:
-	ldr	r3, = _ebss
-	cmp	r2, r3
-	bcc	FillZerobss
-/* Call the clock system intitialization function.*/
-  bl  SystemInit 	
-/* Call the application's entry point.*/
-	bl	main
-	bx	lr    
-.size	Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an 
- *         unexpected interrupt. This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- * @param  None     
- * @retval None       
-*/
-    .section	.text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-	b	Infinite_Loop
-	.size	Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3.  Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/    
- 	.section	.isr_vector,"a",%progbits
-	.type	g_pfnVectors, %object
-	.size	g_pfnVectors, .-g_pfnVectors
-    
-    
-g_pfnVectors:
-	.word	_estack
-	.word	Reset_Handler
-	.word	NMI_Handler
-	.word	HardFault_Handler
-	.word	MemManage_Handler
-	.word	BusFault_Handler
-	.word	UsageFault_Handler
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	SVC_Handler
-	.word	DebugMon_Handler
-	.word	0
-	.word	PendSV_Handler
-	.word	SysTick_Handler
-	.word	WWDG_IRQHandler
-	.word	PVD_IRQHandler
-	.word	TAMPER_IRQHandler
-	.word	RTC_IRQHandler
-	.word	FLASH_IRQHandler
-	.word	RCC_IRQHandler
-	.word	EXTI0_IRQHandler
-	.word	EXTI1_IRQHandler
-	.word	EXTI2_IRQHandler
-	.word	EXTI3_IRQHandler
-	.word	EXTI4_IRQHandler
-	.word	DMA1_Channel1_IRQHandler
-	.word	DMA1_Channel2_IRQHandler
-	.word	DMA1_Channel3_IRQHandler
-	.word	DMA1_Channel4_IRQHandler
-	.word	DMA1_Channel5_IRQHandler
-	.word	DMA1_Channel6_IRQHandler
-	.word	DMA1_Channel7_IRQHandler
-	.word	ADC1_2_IRQHandler
-	.word	USB_HP_CAN1_TX_IRQHandler
-	.word	USB_LP_CAN1_RX0_IRQHandler
-	.word	CAN1_RX1_IRQHandler
-	.word	CAN1_SCE_IRQHandler
-	.word	EXTI9_5_IRQHandler
-	.word	TIM1_BRK_IRQHandler
-	.word	TIM1_UP_IRQHandler
-	.word	TIM1_TRG_COM_IRQHandler
-	.word	TIM1_CC_IRQHandler
-	.word	TIM2_IRQHandler
-	.word	TIM3_IRQHandler
-	.word	TIM4_IRQHandler
-	.word	I2C1_EV_IRQHandler
-	.word	I2C1_ER_IRQHandler
-	.word	I2C2_EV_IRQHandler
-	.word	I2C2_ER_IRQHandler
-	.word	SPI1_IRQHandler
-	.word	SPI2_IRQHandler
-	.word	USART1_IRQHandler
-	.word	USART2_IRQHandler
-	.word	USART3_IRQHandler
-	.word	EXTI15_10_IRQHandler
-	.word	RTCAlarm_IRQHandler
-	.word	USBWakeUp_IRQHandler	
-  .word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	0
-	.word	BootRAM          /* @0x108. This is for boot in RAM mode for 
-                            STM32F10x Medium Density devices. */
-   
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler. 
-* As they are weak aliases, any function with the same name will override 
-* this definition.
-*
-*******************************************************************************/
-    
-  .weak	NMI_Handler
-	.thumb_set NMI_Handler,Default_Handler
-	
-  .weak	HardFault_Handler
-	.thumb_set HardFault_Handler,Default_Handler
-	
-  .weak	MemManage_Handler
-	.thumb_set MemManage_Handler,Default_Handler
-	
-  .weak	BusFault_Handler
-	.thumb_set BusFault_Handler,Default_Handler
-
-	.weak	UsageFault_Handler
-	.thumb_set UsageFault_Handler,Default_Handler
-
-	.weak	SVC_Handler
-	.thumb_set SVC_Handler,Default_Handler
-
-	.weak	DebugMon_Handler
-	.thumb_set DebugMon_Handler,Default_Handler
-
-	.weak	PendSV_Handler
-	.thumb_set PendSV_Handler,Default_Handler
-
-	.weak	SysTick_Handler
-	.thumb_set SysTick_Handler,Default_Handler
-
-	.weak	WWDG_IRQHandler
-	.thumb_set WWDG_IRQHandler,Default_Handler
-
-	.weak	PVD_IRQHandler
-	.thumb_set PVD_IRQHandler,Default_Handler
-
-	.weak	TAMPER_IRQHandler
-	.thumb_set TAMPER_IRQHandler,Default_Handler
-
-	.weak	RTC_IRQHandler
-	.thumb_set RTC_IRQHandler,Default_Handler
-
-	.weak	FLASH_IRQHandler
-	.thumb_set FLASH_IRQHandler,Default_Handler
-
-	.weak	RCC_IRQHandler
-	.thumb_set RCC_IRQHandler,Default_Handler
-
-	.weak	EXTI0_IRQHandler
-	.thumb_set EXTI0_IRQHandler,Default_Handler
-
-	.weak	EXTI1_IRQHandler
-	.thumb_set EXTI1_IRQHandler,Default_Handler
-
-	.weak	EXTI2_IRQHandler
-	.thumb_set EXTI2_IRQHandler,Default_Handler
-
-	.weak	EXTI3_IRQHandler
-	.thumb_set EXTI3_IRQHandler,Default_Handler
-
-	.weak	EXTI4_IRQHandler
-	.thumb_set EXTI4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel1_IRQHandler
-	.thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel2_IRQHandler
-	.thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel3_IRQHandler
-	.thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel4_IRQHandler
-	.thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel5_IRQHandler
-	.thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel6_IRQHandler
-	.thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-	.weak	DMA1_Channel7_IRQHandler
-	.thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-	.weak	ADC1_2_IRQHandler
-	.thumb_set ADC1_2_IRQHandler,Default_Handler
-
-	.weak	USB_HP_CAN1_TX_IRQHandler
-	.thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
-
-	.weak	USB_LP_CAN1_RX0_IRQHandler
-	.thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
-
-	.weak	CAN1_RX1_IRQHandler
-	.thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-	.weak	CAN1_SCE_IRQHandler
-	.thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-	.weak	EXTI9_5_IRQHandler
-	.thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-	.weak	TIM1_BRK_IRQHandler
-	.thumb_set TIM1_BRK_IRQHandler,Default_Handler
-
-	.weak	TIM1_UP_IRQHandler
-	.thumb_set TIM1_UP_IRQHandler,Default_Handler
-
-	.weak	TIM1_TRG_COM_IRQHandler
-	.thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
-
-	.weak	TIM1_CC_IRQHandler
-	.thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-	.weak	TIM2_IRQHandler
-	.thumb_set TIM2_IRQHandler,Default_Handler
-
-	.weak	TIM3_IRQHandler
-	.thumb_set TIM3_IRQHandler,Default_Handler
-
-	.weak	TIM4_IRQHandler
-	.thumb_set TIM4_IRQHandler,Default_Handler
-
-	.weak	I2C1_EV_IRQHandler
-	.thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-	.weak	I2C1_ER_IRQHandler
-	.thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-	.weak	I2C2_EV_IRQHandler
-	.thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-	.weak	I2C2_ER_IRQHandler
-	.thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-	.weak	SPI1_IRQHandler
-	.thumb_set SPI1_IRQHandler,Default_Handler
-
-	.weak	SPI2_IRQHandler
-	.thumb_set SPI2_IRQHandler,Default_Handler
-
-	.weak	USART1_IRQHandler
-	.thumb_set USART1_IRQHandler,Default_Handler
-
-	.weak	USART2_IRQHandler
-	.thumb_set USART2_IRQHandler,Default_Handler
-
-	.weak	USART3_IRQHandler
-	.thumb_set USART3_IRQHandler,Default_Handler
-
-	.weak	EXTI15_10_IRQHandler
-	.thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-	.weak	RTCAlarm_IRQHandler
-	.thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-	.weak	USBWakeUp_IRQHandler
-	.thumb_set USBWakeUp_IRQHandler,Default_Handler
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 399
Libraries/Startup/gcc_ride7/startup_stm32f10x_md_vl.s

@@ -1,399 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_md_vl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x Medium Density Value Line Devices vector table for RIDE7
-  *            toolchain.
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system                 
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-    
-  .syntax unified
-  .cpu cortex-m3
-  .fpu softvfp
-  .thumb
-
-.global  g_pfnVectors
-.global  Default_Handler
-
-/* start address for the initialization values of the .data section. 
-defined in linker script */
-.word  _sidata
-/* start address for the .data section. defined in linker script */  
-.word  _sdata
-/* end address for the .data section. defined in linker script */
-.word  _edata
-/* start address for the .bss section. defined in linker script */
-.word  _sbss
-/* end address for the .bss section. defined in linker script */
-.word  _ebss
-
-.equ  BootRAM, 0xF108F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called. 
- * @param  None
- * @retval None
-*/
-
-  .section  .text.Reset_Handler
-  .weak  Reset_Handler
-  .type  Reset_Handler, %function
-Reset_Handler:  
-
-/* Copy the data segment initializers from flash to SRAM */  
-  movs  r1, #0
-  b     LoopCopyDataInit
-
-CopyDataInit:
-  ldr   r3, =_sidata
-  ldr   r3, [r3, r1]
-  str   r3, [r0, r1]
-  adds  r1, r1, #4
-    
-LoopCopyDataInit:
-  ldr   r0, =_sdata
-  ldr   r3, =_edata
-  adds  r2, r0, r1
-  cmp   r2, r3
-  bcc   CopyDataInit
-  ldr   r2, =_sbss
-  b     LoopFillZerobss
-/* Zero fill the bss segment. */  
-FillZerobss:
-  movs  r3, #0
-  str   r3, [r2], #4
-    
-LoopFillZerobss:
-  ldr   r3, = _ebss
-  cmp   r2, r3
-  bcc   FillZerobss
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
-/* Call the application's entry point.*/
-  bl    main
-  bx    lr    
-.size   Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an 
- *         unexpected interrupt. This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- * @param  None     
- * @retval None       
-*/
-  .section  .text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-  b  Infinite_Loop
-  .size  Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3. Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-* 
-******************************************************************************/    
-  .section  .isr_vector,"a",%progbits
-  .type  g_pfnVectors, %object
-  .size  g_pfnVectors, .-g_pfnVectors
-
-g_pfnVectors:
-  .word  _estack
-  .word  Reset_Handler
-  .word  NMI_Handler
-  .word  HardFault_Handler
-  .word  MemManage_Handler
-  .word  BusFault_Handler
-  .word  UsageFault_Handler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  SVC_Handler
-  .word  DebugMon_Handler
-  .word  0
-  .word  PendSV_Handler
-  .word  SysTick_Handler
-  .word  WWDG_IRQHandler
-  .word  PVD_IRQHandler
-  .word  TAMPER_IRQHandler
-  .word  RTC_IRQHandler
-  .word  FLASH_IRQHandler
-  .word  RCC_IRQHandler
-  .word  EXTI0_IRQHandler
-  .word  EXTI1_IRQHandler
-  .word  EXTI2_IRQHandler
-  .word  EXTI3_IRQHandler
-  .word  EXTI4_IRQHandler
-  .word  DMA1_Channel1_IRQHandler
-  .word  DMA1_Channel2_IRQHandler
-  .word  DMA1_Channel3_IRQHandler
-  .word  DMA1_Channel4_IRQHandler
-  .word  DMA1_Channel5_IRQHandler
-  .word  DMA1_Channel6_IRQHandler
-  .word  DMA1_Channel7_IRQHandler
-  .word  ADC1_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  EXTI9_5_IRQHandler
-  .word  TIM1_BRK_TIM15_IRQHandler
-  .word  TIM1_UP_TIM16_IRQHandler
-  .word  TIM1_TRG_COM_TIM17_IRQHandler
-  .word  TIM1_CC_IRQHandler
-  .word  TIM2_IRQHandler
-  .word  TIM3_IRQHandler
-  .word  TIM4_IRQHandler
-  .word  I2C1_EV_IRQHandler
-  .word  I2C1_ER_IRQHandler
-  .word  I2C2_EV_IRQHandler
-  .word  I2C2_ER_IRQHandler
-  .word  SPI1_IRQHandler
-  .word  SPI2_IRQHandler
-  .word  USART1_IRQHandler
-  .word  USART2_IRQHandler
-  .word  USART3_IRQHandler
-  .word  EXTI15_10_IRQHandler
-  .word  RTCAlarm_IRQHandler
-  .word  CEC_IRQHandler  
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0  
-  .word  0
-  .word  0
-  .word  0
-  .word  TIM6_DAC_IRQHandler
-  .word  TIM7_IRQHandler  
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  BootRAM          /* @0x01CC. This is for boot in RAM mode for 
-                            STM32F10x Medium Value Line Density devices. */
-   
-/*******************************************************************************
-* Provide weak aliases for each Exception handler to the Default_Handler. 
-* As they are weak aliases, any function with the same name will override 
-* this definition.
-*******************************************************************************/
-    
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_IRQHandler
-  .thumb_set ADC1_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_TIM15_IRQHandler
-  .thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_TIM16_IRQHandler
-  .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_TIM17_IRQHandler
-  .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  TIM4_IRQHandler
-  .thumb_set TIM4_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  I2C2_EV_IRQHandler
-  .thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-  .weak  I2C2_ER_IRQHandler
-  .thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  SPI2_IRQHandler
-  .thumb_set SPI2_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  USART3_IRQHandler
-  .thumb_set USART3_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  CEC_IRQHandler
-  .thumb_set CEC_IRQHandler,Default_Handler
-
-  .weak  TIM6_DAC_IRQHandler
-  .thumb_set TIM6_DAC_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler
-  .thumb_set TIM7_IRQHandler,Default_Handler  
-  
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 465
Libraries/Startup/gcc_ride7/startup_stm32f10x_xl.s

@@ -1,465 +0,0 @@
-/**
-  ******************************************************************************
-  * @file      startup_stm32f10x_xl.s
-  * @author    MCD Application Team
-  * @version   V3.5.0
-  * @date      11-March-2011
-  * @brief     STM32F10x XL-Density Devices vector table for RIDE7 toolchain. 
-  *            This module performs:
-  *                - Set the initial SP
-  *                - Set the initial PC == Reset_Handler,
-  *                - Set the vector table entries with the exceptions ISR address
-  *                - Configure the clock system and the external SRAM mounted on 
-  *                  STM3210E-EVAL board to be used as data memory (optional, 
-  *                  to be enabled by user)
-  *                - Branches to main in the C library (which eventually
-  *                  calls main()).
-  *            After Reset the Cortex-M3 processor is in Thread mode,
-  *            priority is Privileged, and the Stack is set to Main.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
-  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
-  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
-  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */
-    
-  .syntax unified
-  .cpu cortex-m3
-  .fpu softvfp
-  .thumb
-
-.global  g_pfnVectors
-.global  Default_Handler
-
-/* start address for the initialization values of the .data section. 
-defined in linker script */
-.word  _sidata
-/* start address for the .data section. defined in linker script */  
-.word  _sdata
-/* end address for the .data section. defined in linker script */
-.word  _edata
-/* start address for the .bss section. defined in linker script */
-.word  _sbss
-/* end address for the .bss section. defined in linker script */
-.word  _ebss
-/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
-
-.equ  BootRAM,        0xF1E0F85F
-/**
- * @brief  This is the code that gets called when the processor first
- *          starts execution following a reset event. Only the absolutely
- *          necessary set is performed, after which the application
- *          supplied main() routine is called. 
- * @param  None
- * @retval : None
-*/
-
-    .section  .text.Reset_Handler
-  .weak  Reset_Handler
-  .type  Reset_Handler, %function
-Reset_Handler:  
-
-/* Copy the data segment initializers from flash to SRAM */  
-  movs  r1, #0
-  b  LoopCopyDataInit
-
-CopyDataInit:
-  ldr  r3, =_sidata
-  ldr  r3, [r3, r1]
-  str  r3, [r0, r1]
-  adds  r1, r1, #4
-    
-LoopCopyDataInit:
-  ldr  r0, =_sdata
-  ldr  r3, =_edata
-  adds  r2, r0, r1
-  cmp  r2, r3
-  bcc  CopyDataInit
-  ldr  r2, =_sbss
-  b  LoopFillZerobss
-/* Zero fill the bss segment. */  
-FillZerobss:
-  movs  r3, #0
-  str  r3, [r2], #4
-    
-LoopFillZerobss:
-  ldr  r3, = _ebss
-  cmp  r2, r3
-  bcc  FillZerobss
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
-/* Call the application's entry point.*/
-  bl  main
-  bx  lr    
-.size  Reset_Handler, .-Reset_Handler
-
-/**
- * @brief  This is the code that gets called when the processor receives an 
- *         unexpected interrupt.  This simply enters an infinite loop, preserving
- *         the system state for examination by a debugger.
- * @param  None     
- * @retval None       
-*/
-    .section  .text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
-  b  Infinite_Loop
-  .size  Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex M3. Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-* 
-*******************************************************************************/
-   .section  .isr_vector,"a",%progbits
-  .type  g_pfnVectors, %object
-  .size  g_pfnVectors, .-g_pfnVectors
-    
-    
-g_pfnVectors:
-  .word  _estack
-  .word  Reset_Handler
-  .word  NMI_Handler
-  .word  HardFault_Handler
-  .word  MemManage_Handler
-  .word  BusFault_Handler
-  .word  UsageFault_Handler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  SVC_Handler
-  .word  DebugMon_Handler
-  .word  0
-  .word  PendSV_Handler
-  .word  SysTick_Handler
-  .word  WWDG_IRQHandler
-  .word  PVD_IRQHandler
-  .word  TAMPER_IRQHandler
-  .word  RTC_IRQHandler
-  .word  FLASH_IRQHandler
-  .word  RCC_IRQHandler
-  .word  EXTI0_IRQHandler
-  .word  EXTI1_IRQHandler
-  .word  EXTI2_IRQHandler
-  .word  EXTI3_IRQHandler
-  .word  EXTI4_IRQHandler
-  .word  DMA1_Channel1_IRQHandler
-  .word  DMA1_Channel2_IRQHandler
-  .word  DMA1_Channel3_IRQHandler
-  .word  DMA1_Channel4_IRQHandler
-  .word  DMA1_Channel5_IRQHandler
-  .word  DMA1_Channel6_IRQHandler
-  .word  DMA1_Channel7_IRQHandler
-  .word  ADC1_2_IRQHandler
-  .word  USB_HP_CAN1_TX_IRQHandler
-  .word  USB_LP_CAN1_RX0_IRQHandler
-  .word  CAN1_RX1_IRQHandler
-  .word  CAN1_SCE_IRQHandler
-  .word  EXTI9_5_IRQHandler
-  .word  TIM1_BRK_TIM9_IRQHandler
-  .word  TIM1_UP_TIM10_IRQHandler
-  .word  TIM1_TRG_COM_TIM11_IRQHandler
-  .word  TIM1_CC_IRQHandler
-  .word  TIM2_IRQHandler
-  .word  TIM3_IRQHandler
-  .word  TIM4_IRQHandler
-  .word  I2C1_EV_IRQHandler
-  .word  I2C1_ER_IRQHandler
-  .word  I2C2_EV_IRQHandler
-  .word  I2C2_ER_IRQHandler
-  .word  SPI1_IRQHandler
-  .word  SPI2_IRQHandler
-  .word  USART1_IRQHandler
-  .word  USART2_IRQHandler
-  .word  USART3_IRQHandler
-  .word  EXTI15_10_IRQHandler
-  .word  RTCAlarm_IRQHandler
-  .word  USBWakeUp_IRQHandler
-  .word  TIM8_BRK_TIM12_IRQHandler
-  .word  TIM8_UP_TIM13_IRQHandler
-  .word  TIM8_TRG_COM_TIM14_IRQHandler
-  .word  TIM8_CC_IRQHandler
-  .word  ADC3_IRQHandler
-  .word  FSMC_IRQHandler
-  .word  SDIO_IRQHandler
-  .word  TIM5_IRQHandler
-  .word  SPI3_IRQHandler
-  .word  UART4_IRQHandler
-  .word  UART5_IRQHandler
-  .word  TIM6_IRQHandler
-  .word  TIM7_IRQHandler
-  .word  DMA2_Channel1_IRQHandler
-  .word  DMA2_Channel2_IRQHandler
-  .word  DMA2_Channel3_IRQHandler
-  .word  DMA2_Channel4_5_IRQHandler
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  0
-  .word  BootRAM       /* @0x1E0. This is for boot in RAM mode for 
-                         STM32F10x XL Density devices. */
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler. 
-* As they are weak aliases, any function with the same name will override 
-* this definition.
-* 
-*******************************************************************************/
-    
-  .weak  NMI_Handler
-  .thumb_set NMI_Handler,Default_Handler
-  
-  .weak  HardFault_Handler
-  .thumb_set HardFault_Handler,Default_Handler
-  
-  .weak  MemManage_Handler
-  .thumb_set MemManage_Handler,Default_Handler
-  
-  .weak  BusFault_Handler
-  .thumb_set BusFault_Handler,Default_Handler
-
-  .weak  UsageFault_Handler
-  .thumb_set UsageFault_Handler,Default_Handler
-
-  .weak  SVC_Handler
-  .thumb_set SVC_Handler,Default_Handler
-
-  .weak  DebugMon_Handler
-  .thumb_set DebugMon_Handler,Default_Handler
-
-  .weak  PendSV_Handler
-  .thumb_set PendSV_Handler,Default_Handler
-
-  .weak  SysTick_Handler
-  .thumb_set SysTick_Handler,Default_Handler
-
-  .weak  WWDG_IRQHandler
-  .thumb_set WWDG_IRQHandler,Default_Handler
-
-  .weak  PVD_IRQHandler
-  .thumb_set PVD_IRQHandler,Default_Handler
-
-  .weak  TAMPER_IRQHandler
-  .thumb_set TAMPER_IRQHandler,Default_Handler
-
-  .weak  RTC_IRQHandler
-  .thumb_set RTC_IRQHandler,Default_Handler
-
-  .weak  FLASH_IRQHandler
-  .thumb_set FLASH_IRQHandler,Default_Handler
-
-  .weak  RCC_IRQHandler
-  .thumb_set RCC_IRQHandler,Default_Handler
-
-  .weak  EXTI0_IRQHandler
-  .thumb_set EXTI0_IRQHandler,Default_Handler
-
-  .weak  EXTI1_IRQHandler
-  .thumb_set EXTI1_IRQHandler,Default_Handler
-
-  .weak  EXTI2_IRQHandler
-  .thumb_set EXTI2_IRQHandler,Default_Handler
-
-  .weak  EXTI3_IRQHandler
-  .thumb_set EXTI3_IRQHandler,Default_Handler
-
-  .weak  EXTI4_IRQHandler
-  .thumb_set EXTI4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel1_IRQHandler
-  .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel2_IRQHandler
-  .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel3_IRQHandler
-  .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel4_IRQHandler
-  .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel5_IRQHandler
-  .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel6_IRQHandler
-  .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
-  .weak  DMA1_Channel7_IRQHandler
-  .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
-  .weak  ADC1_2_IRQHandler
-  .thumb_set ADC1_2_IRQHandler,Default_Handler
-
-  .weak  USB_HP_CAN1_TX_IRQHandler
-  .thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
-
-  .weak  USB_LP_CAN1_RX0_IRQHandler
-  .thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
-
-  .weak  CAN1_RX1_IRQHandler
-  .thumb_set CAN1_RX1_IRQHandler,Default_Handler
-
-  .weak  CAN1_SCE_IRQHandler
-  .thumb_set CAN1_SCE_IRQHandler,Default_Handler
-
-  .weak  EXTI9_5_IRQHandler
-  .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
-  .weak  TIM1_BRK_TIM9_IRQHandler
-  .thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
-
-  .weak  TIM1_UP_TIM10_IRQHandler
-  .thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
-
-  .weak  TIM1_TRG_COM_TIM11_IRQHandler
-  .thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
-
-  .weak  TIM1_CC_IRQHandler
-  .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
-  .weak  TIM2_IRQHandler
-  .thumb_set TIM2_IRQHandler,Default_Handler
-
-  .weak  TIM3_IRQHandler
-  .thumb_set TIM3_IRQHandler,Default_Handler
-
-  .weak  TIM4_IRQHandler
-  .thumb_set TIM4_IRQHandler,Default_Handler
-
-  .weak  I2C1_EV_IRQHandler
-  .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
-  .weak  I2C1_ER_IRQHandler
-  .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
-  .weak  I2C2_EV_IRQHandler
-  .thumb_set I2C2_EV_IRQHandler,Default_Handler
-
-  .weak  I2C2_ER_IRQHandler
-  .thumb_set I2C2_ER_IRQHandler,Default_Handler
-
-  .weak  SPI1_IRQHandler
-  .thumb_set SPI1_IRQHandler,Default_Handler
-
-  .weak  SPI2_IRQHandler
-  .thumb_set SPI2_IRQHandler,Default_Handler
-
-  .weak  USART1_IRQHandler
-  .thumb_set USART1_IRQHandler,Default_Handler
-
-  .weak  USART2_IRQHandler
-  .thumb_set USART2_IRQHandler,Default_Handler
-
-  .weak  USART3_IRQHandler
-  .thumb_set USART3_IRQHandler,Default_Handler
-
-  .weak  EXTI15_10_IRQHandler
-  .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
-  .weak  RTCAlarm_IRQHandler
-  .thumb_set RTCAlarm_IRQHandler,Default_Handler
-
-  .weak  USBWakeUp_IRQHandler
-  .thumb_set USBWakeUp_IRQHandler,Default_Handler
-
-  .weak  TIM8_BRK_TIM12_IRQHandler
-  .thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
-
-  .weak  TIM8_UP_TIM13_IRQHandler
-  .thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
-
-  .weak  TIM8_TRG_COM_TIM14_IRQHandler
-  .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
-
-  .weak  TIM8_CC_IRQHandler
-  .thumb_set TIM8_CC_IRQHandler,Default_Handler
-
-  .weak  ADC3_IRQHandler
-  .thumb_set ADC3_IRQHandler,Default_Handler
-
-  .weak  FSMC_IRQHandler
-  .thumb_set FSMC_IRQHandler,Default_Handler
-
-  .weak  SDIO_IRQHandler
-  .thumb_set SDIO_IRQHandler,Default_Handler
-
-  .weak  TIM5_IRQHandler
-  .thumb_set TIM5_IRQHandler,Default_Handler
-
-  .weak  SPI3_IRQHandler
-  .thumb_set SPI3_IRQHandler,Default_Handler
-
-  .weak  UART4_IRQHandler
-  .thumb_set UART4_IRQHandler,Default_Handler
-
-  .weak  UART5_IRQHandler
-  .thumb_set UART5_IRQHandler,Default_Handler
-
-  .weak  TIM6_IRQHandler
-  .thumb_set TIM6_IRQHandler,Default_Handler
-
-  .weak  TIM7_IRQHandler
-  .thumb_set TIM7_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel1_IRQHandler
-  .thumb_set DMA2_Channel1_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel2_IRQHandler
-  .thumb_set DMA2_Channel2_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel3_IRQHandler
-  .thumb_set DMA2_Channel3_IRQHandler,Default_Handler
-
-  .weak  DMA2_Channel4_5_IRQHandler
-  .thumb_set DMA2_Channel4_5_IRQHandler,Default_Handler
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 507
Libraries/Startup/iar/startup_stm32f10x_cl.s

@@ -1,507 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics *******************
-;* File Name          : startup_stm32f10x_cl.s
-;* Author             : MCD Application Team
-;* Version            : V3.5.0
-;* Date               : 11-March-2011
-;* Description        : STM32F10x Connectivity line devices vector table for 
-;*                      EWARM toolchain.
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Configure the clock system
-;*                      - Set the initial PC == __iar_program_start,
-;*                      - Set the vector table entries with the exceptions ISR 
-;*                        address.
-;*                      After Reset the Cortex-M3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;********************************************************************************
-;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-;
-;
-; The modules in this file are included in the libraries, and may be replaced
-; by any user-defined modules that define the PUBLIC symbol _program_start or
-; a user defined start symbol.
-; To override the cstartup defined in the library, simply add your modified
-; version to the workbench project.
-;
-; The vector table is normally located at address 0.
-; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
-; The name "__vector_table" has special meaning for C-SPY:
-; it is where the SP start value is found, and the NVIC vector
-; table register (VTOR) is initialized to this address if != 0.
-;
-; Cortex-M version
-;
-
-        MODULE  ?cstartup
-
-        ;; Forward declaration of sections.
-        SECTION CSTACK:DATA:NOROOT(3)
-
-        SECTION .intvec:CODE:NOROOT(2)
-
-        EXTERN  __iar_program_start
-        EXTERN  SystemInit        
-        PUBLIC  __vector_table
-
-        DATA
-__vector_table
-        DCD     sfe(CSTACK)
-        DCD     Reset_Handler             ; Reset Handler
-        DCD     NMI_Handler               ; NMI Handler
-        DCD     HardFault_Handler         ; Hard Fault Handler
-        DCD     MemManage_Handler         ; MPU Fault Handler
-        DCD     BusFault_Handler          ; Bus Fault Handler
-        DCD     UsageFault_Handler        ; Usage Fault Handler
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     SVC_Handler               ; SVCall Handler
-        DCD     DebugMon_Handler          ; Debug Monitor Handler
-        DCD     0                         ; Reserved
-        DCD     PendSV_Handler            ; PendSV Handler
-        DCD     SysTick_Handler           ; SysTick Handler
-
-         ; External Interrupts
-        DCD     WWDG_IRQHandler            ; Window Watchdog
-        DCD     PVD_IRQHandler             ; PVD through EXTI Line detect
-        DCD     TAMPER_IRQHandler          ; Tamper
-        DCD     RTC_IRQHandler             ; RTC
-        DCD     FLASH_IRQHandler           ; Flash
-        DCD     RCC_IRQHandler             ; RCC
-        DCD     EXTI0_IRQHandler           ; EXTI Line 0
-        DCD     EXTI1_IRQHandler           ; EXTI Line 1
-        DCD     EXTI2_IRQHandler           ; EXTI Line 2
-        DCD     EXTI3_IRQHandler           ; EXTI Line 3
-        DCD     EXTI4_IRQHandler           ; EXTI Line 4
-        DCD     DMA1_Channel1_IRQHandler   ; DMA1 Channel 1
-        DCD     DMA1_Channel2_IRQHandler   ; DMA1 Channel 2
-        DCD     DMA1_Channel3_IRQHandler   ; DMA1 Channel 3
-        DCD     DMA1_Channel4_IRQHandler   ; DMA1 Channel 4
-        DCD     DMA1_Channel5_IRQHandler   ; DMA1 Channel 5
-        DCD     DMA1_Channel6_IRQHandler   ; DMA1 Channel 6
-        DCD     DMA1_Channel7_IRQHandler   ; DMA1 Channel 7
-        DCD     ADC1_2_IRQHandler          ; ADC1 and ADC2
-        DCD     CAN1_TX_IRQHandler         ; CAN1 TX
-        DCD     CAN1_RX0_IRQHandler        ; CAN1 RX0
-        DCD     CAN1_RX1_IRQHandler        ; CAN1 RX1
-        DCD     CAN1_SCE_IRQHandler        ; CAN1 SCE
-        DCD     EXTI9_5_IRQHandler         ; EXTI Line 9..5
-        DCD     TIM1_BRK_IRQHandler        ; TIM1 Break
-        DCD     TIM1_UP_IRQHandler         ; TIM1 Update
-        DCD     TIM1_TRG_COM_IRQHandler    ; TIM1 Trigger and Commutation
-        DCD     TIM1_CC_IRQHandler         ; TIM1 Capture Compare
-        DCD     TIM2_IRQHandler            ; TIM2
-        DCD     TIM3_IRQHandler            ; TIM3
-        DCD     TIM4_IRQHandler            ; TIM4
-        DCD     I2C1_EV_IRQHandler         ; I2C1 Event
-        DCD     I2C1_ER_IRQHandler         ; I2C1 Error
-        DCD     I2C2_EV_IRQHandler         ; I2C2 Event
-        DCD     I2C2_ER_IRQHandler         ; I2C1 Error
-        DCD     SPI1_IRQHandler            ; SPI1
-        DCD     SPI2_IRQHandler            ; SPI2
-        DCD     USART1_IRQHandler          ; USART1
-        DCD     USART2_IRQHandler          ; USART2
-        DCD     USART3_IRQHandler          ; USART3
-        DCD     EXTI15_10_IRQHandler       ; EXTI Line 15..10
-        DCD     RTCAlarm_IRQHandler        ; RTC alarm through EXTI line
-        DCD     OTG_FS_WKUP_IRQHandler     ; USB OTG FS Wakeup through EXTI line
-        DCD     0                          ; Reserved
-        DCD     0                          ; Reserved
-        DCD     0                          ; Reserved
-        DCD     0                          ; Reserved
-        DCD     0                          ; Reserved
-        DCD     0                          ; Reserved
-        DCD     0                          ; Reserved
-        DCD     TIM5_IRQHandler            ; TIM5
-        DCD     SPI3_IRQHandler            ; SPI3
-        DCD     UART4_IRQHandler           ; UART4
-        DCD     UART5_IRQHandler           ; UART5
-        DCD     TIM6_IRQHandler            ; TIM6
-        DCD     TIM7_IRQHandler            ; TIM7
-        DCD     DMA2_Channel1_IRQHandler   ; DMA2 Channel1
-        DCD     DMA2_Channel2_IRQHandler   ; DMA2 Channel2
-        DCD     DMA2_Channel3_IRQHandler   ; DMA2 Channel3
-        DCD     DMA2_Channel4_IRQHandler   ; DMA2 Channel4
-        DCD     DMA2_Channel5_IRQHandler   ; DMA2 Channel5
-        DCD     ETH_IRQHandler             ; Ethernet
-        DCD     ETH_WKUP_IRQHandler        ; Ethernet Wakeup through EXTI line
-        DCD     CAN2_TX_IRQHandler         ; CAN2 TX
-        DCD     CAN2_RX0_IRQHandler        ; CAN2 RX0
-        DCD     CAN2_RX1_IRQHandler        ; CAN2 RX1
-        DCD     CAN2_SCE_IRQHandler        ; CAN2 SCE
-        DCD     OTG_FS_IRQHandler          ; USB OTG FS
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Default interrupt handlers.
-;;
-        THUMB
-
-        PUBWEAK Reset_Handler
-        SECTION .text:CODE:REORDER(2)
-Reset_Handler
-        LDR     R0, =SystemInit
-        BLX     R0
-        LDR     R0, =__iar_program_start
-        BX      R0
-        
-        PUBWEAK NMI_Handler
-        SECTION .text:CODE:REORDER(1)
-NMI_Handler
-        B NMI_Handler
-
-        PUBWEAK HardFault_Handler
-        SECTION .text:CODE:REORDER(1)
-HardFault_Handler
-        B HardFault_Handler
-
-        PUBWEAK MemManage_Handler
-        SECTION .text:CODE:REORDER(1)
-MemManage_Handler
-        B MemManage_Handler
-
-        PUBWEAK BusFault_Handler
-        SECTION .text:CODE:REORDER(1)
-BusFault_Handler
-        B BusFault_Handler
-
-        PUBWEAK UsageFault_Handler
-        SECTION .text:CODE:REORDER(1)
-UsageFault_Handler
-        B UsageFault_Handler
-
-        PUBWEAK SVC_Handler
-        SECTION .text:CODE:REORDER(1)
-SVC_Handler
-        B SVC_Handler
-
-        PUBWEAK DebugMon_Handler
-        SECTION .text:CODE:REORDER(1)
-DebugMon_Handler
-        B DebugMon_Handler
-
-        PUBWEAK PendSV_Handler
-        SECTION .text:CODE:REORDER(1)
-PendSV_Handler
-        B PendSV_Handler
-
-        PUBWEAK SysTick_Handler
-        SECTION .text:CODE:REORDER(1)
-SysTick_Handler
-        B SysTick_Handler
-
-        PUBWEAK WWDG_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-WWDG_IRQHandler
-        B WWDG_IRQHandler
-
-        PUBWEAK PVD_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-PVD_IRQHandler
-        B PVD_IRQHandler
-
-        PUBWEAK TAMPER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TAMPER_IRQHandler
-        B TAMPER_IRQHandler
-
-        PUBWEAK RTC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTC_IRQHandler
-        B RTC_IRQHandler
-
-        PUBWEAK FLASH_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FLASH_IRQHandler
-        B FLASH_IRQHandler
-
-        PUBWEAK RCC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RCC_IRQHandler
-        B RCC_IRQHandler
-
-        PUBWEAK EXTI0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI0_IRQHandler
-        B EXTI0_IRQHandler
-
-        PUBWEAK EXTI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI1_IRQHandler
-        B EXTI1_IRQHandler
-
-        PUBWEAK EXTI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI2_IRQHandler
-        B EXTI2_IRQHandler
-
-        PUBWEAK EXTI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI3_IRQHandler
-        B EXTI3_IRQHandler
-
-
-        PUBWEAK EXTI4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI4_IRQHandler
-        B EXTI4_IRQHandler
-
-        PUBWEAK DMA1_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel1_IRQHandler
-        B DMA1_Channel1_IRQHandler
-
-        PUBWEAK DMA1_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel2_IRQHandler
-        B DMA1_Channel2_IRQHandler
-
-        PUBWEAK DMA1_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel3_IRQHandler
-        B DMA1_Channel3_IRQHandler
-
-        PUBWEAK DMA1_Channel4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel4_IRQHandler
-        B DMA1_Channel4_IRQHandler
-
-        PUBWEAK DMA1_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel5_IRQHandler
-        B DMA1_Channel5_IRQHandler
-
-        PUBWEAK DMA1_Channel6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel6_IRQHandler
-        B DMA1_Channel6_IRQHandler
-
-        PUBWEAK DMA1_Channel7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel7_IRQHandler
-        B DMA1_Channel7_IRQHandler
-
-        PUBWEAK ADC1_2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC1_2_IRQHandler
-        B ADC1_2_IRQHandler
-
-        PUBWEAK CAN1_TX_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_TX_IRQHandler
-        B CAN1_TX_IRQHandler
-
-        PUBWEAK CAN1_RX0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_RX0_IRQHandler
-        B CAN1_RX0_IRQHandler
-
-        PUBWEAK CAN1_RX1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_RX1_IRQHandler
-        B CAN1_RX1_IRQHandler
-
-        PUBWEAK CAN1_SCE_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_SCE_IRQHandler
-        B CAN1_SCE_IRQHandler
-
-        PUBWEAK EXTI9_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI9_5_IRQHandler
-        B EXTI9_5_IRQHandler
-
-        PUBWEAK TIM1_BRK_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_BRK_IRQHandler
-        B TIM1_BRK_IRQHandler
-
-        PUBWEAK TIM1_UP_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_UP_IRQHandler
-        B TIM1_UP_IRQHandler
-
-        PUBWEAK TIM1_TRG_COM_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_TRG_COM_IRQHandler
-        B TIM1_TRG_COM_IRQHandler
-
-        PUBWEAK TIM1_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_CC_IRQHandler
-        B TIM1_CC_IRQHandler
-
-        PUBWEAK TIM2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM2_IRQHandler
-        B TIM2_IRQHandler
-
-        PUBWEAK TIM3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM3_IRQHandler
-        B TIM3_IRQHandler
-
-        PUBWEAK TIM4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM4_IRQHandler
-        B TIM4_IRQHandler
-
-        PUBWEAK I2C1_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_EV_IRQHandler
-        B I2C1_EV_IRQHandler
-
-        PUBWEAK I2C1_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_ER_IRQHandler
-        B I2C1_ER_IRQHandler
-
-        PUBWEAK I2C2_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_EV_IRQHandler
-        B I2C2_EV_IRQHandler
-
-        PUBWEAK I2C2_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_ER_IRQHandler
-        B I2C2_ER_IRQHandler
-
-        PUBWEAK SPI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI1_IRQHandler
-        B SPI1_IRQHandler    
-
-        PUBWEAK SPI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI2_IRQHandler
-        B SPI2_IRQHandler
-
-        PUBWEAK USART1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART1_IRQHandler
-        B USART1_IRQHandler
-
-        PUBWEAK USART2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART2_IRQHandler
-        B USART2_IRQHandler
-
-        PUBWEAK USART3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART3_IRQHandler
-        B USART3_IRQHandler
-
-        PUBWEAK EXTI15_10_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI15_10_IRQHandler
-        B EXTI15_10_IRQHandler
-
-        PUBWEAK RTCAlarm_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTCAlarm_IRQHandler
-        B RTCAlarm_IRQHandler
-
-        PUBWEAK OTG_FS_WKUP_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-OTG_FS_WKUP_IRQHandler
-        B OTG_FS_WKUP_IRQHandler
-
-        PUBWEAK TIM5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM5_IRQHandler
-        B TIM5_IRQHandler
-
-        PUBWEAK SPI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI3_IRQHandler
-        B SPI3_IRQHandler
-
-        PUBWEAK UART4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-UART4_IRQHandler
-        B UART4_IRQHandler
-
-        PUBWEAK UART5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-UART5_IRQHandler
-        B UART5_IRQHandler
-
-        PUBWEAK TIM6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM6_IRQHandler
-        B TIM6_IRQHandler
-
-        PUBWEAK TIM7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM7_IRQHandler
-        B TIM7_IRQHandler
-
-        PUBWEAK DMA2_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel1_IRQHandler
-        B DMA2_Channel1_IRQHandler
-
-        PUBWEAK DMA2_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel2_IRQHandler
-        B DMA2_Channel2_IRQHandler
-
-        PUBWEAK DMA2_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel3_IRQHandler
-        B DMA2_Channel3_IRQHandler
-
-        PUBWEAK DMA2_Channel4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel4_IRQHandler
-        B DMA2_Channel4_IRQHandler
-
-        PUBWEAK DMA2_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel5_IRQHandler
-        B DMA2_Channel5_IRQHandler
-
-        PUBWEAK ETH_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ETH_IRQHandler
-        B ETH_IRQHandler
-
-        PUBWEAK ETH_WKUP_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ETH_WKUP_IRQHandler
-        B ETH_WKUP_IRQHandler
-
-        PUBWEAK CAN2_TX_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN2_TX_IRQHandler
-        B CAN2_TX_IRQHandler
-
-        PUBWEAK CAN2_RX0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN2_RX0_IRQHandler
-        B CAN2_RX0_IRQHandler
-
-        PUBWEAK CAN2_RX1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN2_RX1_IRQHandler
-        B CAN2_RX1_IRQHandler
-
-        PUBWEAK CAN2_SCE_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN2_SCE_IRQHandler
-        B CAN2_SCE_IRQHandler
-
-        PUBWEAK OTG_FS_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-OTG_FS_IRQHandler
-        B OTG_FS_IRQHandler
-
-        END
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 496
Libraries/Startup/iar/startup_stm32f10x_hd.s

@@ -1,496 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
-;* File Name          : startup_stm32f10x_hd.s
-;* Author             : MCD Application Team
-;* Version            : V3.5.0
-;* Date               : 11-March-2011
-;* Description        : STM32F10x High Density Devices vector table for EWARM 
-;*                      toolchain.
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Configure the clock system and the external SRAM 
-;*                        mounted on STM3210E-EVAL board to be used as data 
-;*                        memory (optional, to be enabled by user)
-;*                      - Set the initial PC == __iar_program_start,
-;*                      - Set the vector table entries with the exceptions ISR address,
-;*                      After Reset the Cortex-M3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;********************************************************************************
-;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-;
-;
-; The modules in this file are included in the libraries, and may be replaced
-; by any user-defined modules that define the PUBLIC symbol _program_start or
-; a user defined start symbol.
-; To override the cstartup defined in the library, simply add your modified
-; version to the workbench project.
-;
-; The vector table is normally located at address 0.
-; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
-; The name "__vector_table" has special meaning for C-SPY:
-; it is where the SP start value is found, and the NVIC vector
-; table register (VTOR) is initialized to this address if != 0.
-;
-; Cortex-M version
-;     
-  
-    MODULE  ?cstartup
-        
-        ;; Forward declaration of sections.
-        SECTION CSTACK:DATA:NOROOT(3)
-
-        SECTION .intvec:CODE:NOROOT(2)
-
-        EXTERN  __iar_program_start
-        EXTERN  SystemInit        
-        PUBLIC  __vector_table
-
-        DATA
-       
-__vector_table
-        DCD     sfe(CSTACK)
-        DCD     Reset_Handler             ; Reset Handler
-        DCD     NMI_Handler               ; NMI Handler
-        DCD     HardFault_Handler         ; Hard Fault Handler
-        DCD     MemManage_Handler         ; MPU Fault Handler
-        DCD     BusFault_Handler          ; Bus Fault Handler
-        DCD     UsageFault_Handler        ; Usage Fault Handler
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     SVC_Handler               ; SVCall Handler
-        DCD     DebugMon_Handler          ; Debug Monitor Handler
-        DCD     0                         ; Reserved
-        DCD     PendSV_Handler            ; PendSV Handler
-        DCD     SysTick_Handler           ; SysTick Handler
-
-         ; External Interrupts
-        DCD     WWDG_IRQHandler           ; Window Watchdog
-        DCD     PVD_IRQHandler            ; PVD through EXTI Line detect
-        DCD     TAMPER_IRQHandler         ; Tamper
-        DCD     RTC_IRQHandler            ; RTC
-        DCD     FLASH_IRQHandler          ; Flash
-        DCD     RCC_IRQHandler            ; RCC
-        DCD     EXTI0_IRQHandler          ; EXTI Line 0
-        DCD     EXTI1_IRQHandler          ; EXTI Line 1
-        DCD     EXTI2_IRQHandler          ; EXTI Line 2
-        DCD     EXTI3_IRQHandler          ; EXTI Line 3
-        DCD     EXTI4_IRQHandler          ; EXTI Line 4
-        DCD     DMA1_Channel1_IRQHandler  ; DMA1 Channel 1
-        DCD     DMA1_Channel2_IRQHandler  ; DMA1 Channel 2
-        DCD     DMA1_Channel3_IRQHandler  ; DMA1 Channel 3
-        DCD     DMA1_Channel4_IRQHandler  ; DMA1 Channel 4
-        DCD     DMA1_Channel5_IRQHandler  ; DMA1 Channel 5
-        DCD     DMA1_Channel6_IRQHandler  ; DMA1 Channel 6
-        DCD     DMA1_Channel7_IRQHandler  ; DMA1 Channel 7
-        DCD     ADC1_2_IRQHandler         ; ADC1 & ADC2
-        DCD     USB_HP_CAN1_TX_IRQHandler  ; USB High Priority or CAN1 TX
-        DCD     USB_LP_CAN1_RX0_IRQHandler ; USB Low  Priority or CAN1 RX0
-        DCD     CAN1_RX1_IRQHandler       ; CAN1 RX1
-        DCD     CAN1_SCE_IRQHandler       ; CAN1 SCE
-        DCD     EXTI9_5_IRQHandler        ; EXTI Line 9..5
-        DCD     TIM1_BRK_IRQHandler       ; TIM1 Break
-        DCD     TIM1_UP_IRQHandler        ; TIM1 Update
-        DCD     TIM1_TRG_COM_IRQHandler   ; TIM1 Trigger and Commutation
-        DCD     TIM1_CC_IRQHandler        ; TIM1 Capture Compare
-        DCD     TIM2_IRQHandler           ; TIM2
-        DCD     TIM3_IRQHandler           ; TIM3
-        DCD     TIM4_IRQHandler           ; TIM4
-        DCD     I2C1_EV_IRQHandler        ; I2C1 Event
-        DCD     I2C1_ER_IRQHandler        ; I2C1 Error
-        DCD     I2C2_EV_IRQHandler        ; I2C2 Event
-        DCD     I2C2_ER_IRQHandler        ; I2C2 Error
-        DCD     SPI1_IRQHandler           ; SPI1
-        DCD     SPI2_IRQHandler           ; SPI2
-        DCD     USART1_IRQHandler         ; USART1
-        DCD     USART2_IRQHandler         ; USART2
-        DCD     USART3_IRQHandler         ; USART3
-        DCD     EXTI15_10_IRQHandler      ; EXTI Line 15..10
-        DCD     RTCAlarm_IRQHandler       ; RTC Alarm through EXTI Line
-        DCD     USBWakeUp_IRQHandler      ; USB Wakeup from suspend
-        DCD     TIM8_BRK_IRQHandler       ; TIM8 Break
-        DCD     TIM8_UP_IRQHandler        ; TIM8 Update
-        DCD     TIM8_TRG_COM_IRQHandler   ; TIM8 Trigger and Commutation
-        DCD     TIM8_CC_IRQHandler        ; TIM8 Capture Compare
-        DCD     ADC3_IRQHandler           ; ADC3
-        DCD     FSMC_IRQHandler           ; FSMC
-        DCD     SDIO_IRQHandler           ; SDIO
-        DCD     TIM5_IRQHandler           ; TIM5
-        DCD     SPI3_IRQHandler           ; SPI3
-        DCD     UART4_IRQHandler          ; UART4
-        DCD     UART5_IRQHandler          ; UART5
-        DCD     TIM6_IRQHandler           ; TIM6
-        DCD     TIM7_IRQHandler           ; TIM7
-        DCD     DMA2_Channel1_IRQHandler  ; DMA2 Channel1
-        DCD     DMA2_Channel2_IRQHandler  ; DMA2 Channel2
-        DCD     DMA2_Channel3_IRQHandler  ; DMA2 Channel3
-        DCD     DMA2_Channel4_5_IRQHandler ; DMA2 Channel4 & Channel5
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Default interrupt handlers.
-;;
-        THUMB
-
-        PUBWEAK Reset_Handler
-        SECTION .text:CODE:REORDER(2)
-Reset_Handler
-        LDR     R0, =SystemInit
-        BLX     R0
-        LDR     R0, =__iar_program_start
-        BX      R0
-               
-        PUBWEAK NMI_Handler
-        SECTION .text:CODE:REORDER(1)
-NMI_Handler
-        B NMI_Handler
-
-        PUBWEAK HardFault_Handler
-        SECTION .text:CODE:REORDER(1)
-HardFault_Handler
-        B HardFault_Handler
-
-        PUBWEAK MemManage_Handler
-        SECTION .text:CODE:REORDER(1)
-MemManage_Handler
-        B MemManage_Handler
-
-        PUBWEAK BusFault_Handler
-        SECTION .text:CODE:REORDER(1)
-BusFault_Handler
-        B BusFault_Handler
-
-        PUBWEAK UsageFault_Handler
-        SECTION .text:CODE:REORDER(1)
-UsageFault_Handler
-        B UsageFault_Handler
-
-        PUBWEAK SVC_Handler
-        SECTION .text:CODE:REORDER(1)
-SVC_Handler
-        B SVC_Handler
-
-        PUBWEAK DebugMon_Handler
-        SECTION .text:CODE:REORDER(1)
-DebugMon_Handler
-        B DebugMon_Handler
-
-        PUBWEAK PendSV_Handler
-        SECTION .text:CODE:REORDER(1)
-PendSV_Handler
-        B PendSV_Handler
-
-        PUBWEAK SysTick_Handler
-        SECTION .text:CODE:REORDER(1)
-SysTick_Handler
-        B SysTick_Handler
-
-        PUBWEAK WWDG_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-WWDG_IRQHandler
-        B WWDG_IRQHandler
-
-        PUBWEAK PVD_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-PVD_IRQHandler
-        B PVD_IRQHandler
-
-        PUBWEAK TAMPER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TAMPER_IRQHandler
-        B TAMPER_IRQHandler
-
-        PUBWEAK RTC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTC_IRQHandler
-        B RTC_IRQHandler
-
-        PUBWEAK FLASH_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FLASH_IRQHandler
-        B FLASH_IRQHandler
-
-        PUBWEAK RCC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RCC_IRQHandler
-        B RCC_IRQHandler
-
-        PUBWEAK EXTI0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI0_IRQHandler
-        B EXTI0_IRQHandler
-
-        PUBWEAK EXTI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI1_IRQHandler
-        B EXTI1_IRQHandler
-
-        PUBWEAK EXTI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI2_IRQHandler
-        B EXTI2_IRQHandler
-
-        PUBWEAK EXTI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI3_IRQHandler
-        B EXTI3_IRQHandler
-
-        PUBWEAK EXTI4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI4_IRQHandler
-        B EXTI4_IRQHandler
-
-        PUBWEAK DMA1_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel1_IRQHandler
-        B DMA1_Channel1_IRQHandler
-
-        PUBWEAK DMA1_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel2_IRQHandler
-        B DMA1_Channel2_IRQHandler
-
-        PUBWEAK DMA1_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel3_IRQHandler
-        B DMA1_Channel3_IRQHandler
-
-        PUBWEAK DMA1_Channel4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel4_IRQHandler
-        B DMA1_Channel4_IRQHandler
-
-        PUBWEAK DMA1_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel5_IRQHandler
-        B DMA1_Channel5_IRQHandler
-
-        PUBWEAK DMA1_Channel6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel6_IRQHandler
-        B DMA1_Channel6_IRQHandler
-
-        PUBWEAK DMA1_Channel7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel7_IRQHandler
-        B DMA1_Channel7_IRQHandler
-
-        PUBWEAK ADC1_2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC1_2_IRQHandler
-        B ADC1_2_IRQHandler
-
-        PUBWEAK USB_HP_CAN1_TX_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USB_HP_CAN1_TX_IRQHandler
-        B USB_HP_CAN1_TX_IRQHandler
-
-        PUBWEAK USB_LP_CAN1_RX0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USB_LP_CAN1_RX0_IRQHandler
-        B USB_LP_CAN1_RX0_IRQHandler
-
-        PUBWEAK CAN1_RX1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_RX1_IRQHandler
-        B CAN1_RX1_IRQHandler
-
-        PUBWEAK CAN1_SCE_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_SCE_IRQHandler
-        B CAN1_SCE_IRQHandler
-
-        PUBWEAK EXTI9_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI9_5_IRQHandler
-        B EXTI9_5_IRQHandler
-
-        PUBWEAK TIM1_BRK_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_BRK_IRQHandler
-        B TIM1_BRK_IRQHandler
-
-        PUBWEAK TIM1_UP_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_UP_IRQHandler
-        B TIM1_UP_IRQHandler
-
-        PUBWEAK TIM1_TRG_COM_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_TRG_COM_IRQHandler
-        B TIM1_TRG_COM_IRQHandler
-
-        PUBWEAK TIM1_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_CC_IRQHandler
-        B TIM1_CC_IRQHandler
-
-        PUBWEAK TIM2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM2_IRQHandler
-        B TIM2_IRQHandler
-
-        PUBWEAK TIM3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM3_IRQHandler
-        B TIM3_IRQHandler
-
-        PUBWEAK TIM4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM4_IRQHandler
-        B TIM4_IRQHandler
-
-        PUBWEAK I2C1_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_EV_IRQHandler
-        B I2C1_EV_IRQHandler
-
-        PUBWEAK I2C1_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_ER_IRQHandler
-        B I2C1_ER_IRQHandler
-
-        PUBWEAK I2C2_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_EV_IRQHandler
-        B I2C2_EV_IRQHandler
-
-        PUBWEAK I2C2_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_ER_IRQHandler
-        B I2C2_ER_IRQHandler
-
-        PUBWEAK SPI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI1_IRQHandler
-        B SPI1_IRQHandler
-
-        PUBWEAK SPI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI2_IRQHandler
-        B SPI2_IRQHandler
-
-        PUBWEAK USART1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART1_IRQHandler
-        B USART1_IRQHandler
-
-        PUBWEAK USART2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART2_IRQHandler
-        B USART2_IRQHandler
-
-        PUBWEAK USART3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART3_IRQHandler
-        B USART3_IRQHandler
-
-        PUBWEAK EXTI15_10_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI15_10_IRQHandler
-        B EXTI15_10_IRQHandler
-
-        PUBWEAK RTCAlarm_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTCAlarm_IRQHandler
-        B RTCAlarm_IRQHandler
-
-        PUBWEAK USBWakeUp_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USBWakeUp_IRQHandler
-        B USBWakeUp_IRQHandler
-
-        PUBWEAK TIM8_BRK_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM8_BRK_IRQHandler
-        B TIM8_BRK_IRQHandler
-
-        PUBWEAK TIM8_UP_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM8_UP_IRQHandler
-        B TIM8_UP_IRQHandler
-
-        PUBWEAK TIM8_TRG_COM_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM8_TRG_COM_IRQHandler
-        B TIM8_TRG_COM_IRQHandler
-
-        PUBWEAK TIM8_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM8_CC_IRQHandler
-        B TIM8_CC_IRQHandler
-
-        PUBWEAK ADC3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC3_IRQHandler
-        B ADC3_IRQHandler
-
-        PUBWEAK FSMC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FSMC_IRQHandler
-        B FSMC_IRQHandler
-
-        PUBWEAK SDIO_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SDIO_IRQHandler
-        B SDIO_IRQHandler
-
-        PUBWEAK TIM5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM5_IRQHandler
-        B TIM5_IRQHandler
-
-        PUBWEAK SPI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI3_IRQHandler
-        B SPI3_IRQHandler
-
-        PUBWEAK UART4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-UART4_IRQHandler
-        B UART4_IRQHandler
-
-        PUBWEAK UART5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-UART5_IRQHandler
-        B UART5_IRQHandler
-
-        PUBWEAK TIM6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM6_IRQHandler
-        B TIM6_IRQHandler
-
-        PUBWEAK TIM7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM7_IRQHandler
-        B TIM7_IRQHandler
-
-        PUBWEAK DMA2_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel1_IRQHandler
-        B DMA2_Channel1_IRQHandler
-
-        PUBWEAK DMA2_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel2_IRQHandler
-        B DMA2_Channel2_IRQHandler
-
-        PUBWEAK DMA2_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel3_IRQHandler
-        B DMA2_Channel3_IRQHandler
-
-        PUBWEAK DMA2_Channel4_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel4_5_IRQHandler
-        B DMA2_Channel4_5_IRQHandler
-        
-        
-        END
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 461
Libraries/Startup/iar/startup_stm32f10x_hd_vl.s

@@ -1,461 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
-;* File Name          : startup_stm32f10x_hd_vl.s
-;* Author             : MCD Application Team
-;* Version            : V3.5.0
-;* Date               : 11-March-2011
-;* Description        : STM32F10x High Density Value Line Devices vector table 
-;*                      for EWARM toolchain.
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Configure the clock system and the external SRAM 
-;*                        mounted on STM32100E-EVAL board to be used as data 
-;*                        memory (optional, to be enabled by user)
-;*                      - Set the initial PC == __iar_program_start,
-;*                      - Set the vector table entries with the exceptions ISR 
-;*                        address.
-;*                      After Reset the Cortex-M3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;********************************************************************************
-;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-;
-;
-; The modules in this file are included in the libraries, and may be replaced
-; by any user-defined modules that define the PUBLIC symbol _program_start or
-; a user defined start symbol.
-; To override the cstartup defined in the library, simply add your modified
-; version to the workbench project.
-;
-; The vector table is normally located at address 0.
-; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
-; The name "__vector_table" has special meaning for C-SPY:
-; it is where the SP start value is found, and the NVIC vector
-; table register (VTOR) is initialized to this address if != 0.
-;
-; Cortex-M version
-;
-
-        MODULE  ?cstartup
-
-        ;; Forward declaration of sections.
-        SECTION CSTACK:DATA:NOROOT(3)
-
-        SECTION .intvec:CODE:NOROOT(2)
-
-        EXTERN  __iar_program_start
-        EXTERN  SystemInit        
-        PUBLIC  __vector_table
-
-        DATA
-__vector_table
-        DCD     sfe(CSTACK)
-        DCD     Reset_Handler             ; Reset Handler
-        DCD     NMI_Handler               ; NMI Handler
-        DCD     HardFault_Handler         ; Hard Fault Handler
-        DCD     MemManage_Handler         ; MPU Fault Handler
-        DCD     BusFault_Handler          ; Bus Fault Handler
-        DCD     UsageFault_Handler        ; Usage Fault Handler
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     SVC_Handler               ; SVCall Handler
-        DCD     DebugMon_Handler          ; Debug Monitor Handler
-        DCD     0                         ; Reserved
-        DCD     PendSV_Handler            ; PendSV Handler
-        DCD     SysTick_Handler           ; SysTick Handler
-
-         ; External Interrupts
-        DCD     WWDG_IRQHandler               ; Window Watchdog
-        DCD     PVD_IRQHandler                ; PVD through EXTI Line detect
-        DCD     TAMPER_IRQHandler             ; Tamper
-        DCD     RTC_IRQHandler                ; RTC
-        DCD     FLASH_IRQHandler              ; Flash
-        DCD     RCC_IRQHandler                ; RCC
-        DCD     EXTI0_IRQHandler              ; EXTI Line 0
-        DCD     EXTI1_IRQHandler              ; EXTI Line 1
-        DCD     EXTI2_IRQHandler              ; EXTI Line 2
-        DCD     EXTI3_IRQHandler              ; EXTI Line 3
-        DCD     EXTI4_IRQHandler              ; EXTI Line 4
-        DCD     DMA1_Channel1_IRQHandler      ; DMA1 Channel 1
-        DCD     DMA1_Channel2_IRQHandler      ; DMA1 Channel 2
-        DCD     DMA1_Channel3_IRQHandler      ; DMA1 Channel 3
-        DCD     DMA1_Channel4_IRQHandler      ; DMA1 Channel 4
-        DCD     DMA1_Channel5_IRQHandler      ; DMA1 Channel 5
-        DCD     DMA1_Channel6_IRQHandler      ; DMA1 Channel 6
-        DCD     DMA1_Channel7_IRQHandler      ; DMA1 Channel 7
-        DCD     ADC1_IRQHandler               ; ADC1
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     EXTI9_5_IRQHandler            ; EXTI Line 9..5
-        DCD     TIM1_BRK_TIM15_IRQHandler     ; TIM1 Break and TIM15
-        DCD     TIM1_UP_TIM16_IRQHandler      ; TIM1 Update and TIM16
-        DCD     TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Commutation and TIM17
-        DCD     TIM1_CC_IRQHandler            ; TIM1 Capture Compare
-        DCD     TIM2_IRQHandler               ; TIM2
-        DCD     TIM3_IRQHandler               ; TIM3
-        DCD     TIM4_IRQHandler               ; TIM4
-        DCD     I2C1_EV_IRQHandler            ; I2C1 Event
-        DCD     I2C1_ER_IRQHandler            ; I2C1 Error
-        DCD     I2C2_EV_IRQHandler            ; I2C2 Event
-        DCD     I2C2_ER_IRQHandler            ; I2C2 Error
-        DCD     SPI1_IRQHandler               ; SPI1
-        DCD     SPI2_IRQHandler               ; SPI2
-        DCD     USART1_IRQHandler             ; USART1
-        DCD     USART2_IRQHandler             ; USART2
-        DCD     USART3_IRQHandler             ; USART3
-        DCD     EXTI15_10_IRQHandler          ; EXTI Line 15..10
-        DCD     RTCAlarm_IRQHandler           ; RTC Alarm through EXTI Line
-        DCD     CEC_IRQHandler                ; HDMI-CEC
-        DCD     TIM12_IRQHandler              ; TIM12
-        DCD     TIM13_IRQHandler              ; TIM13
-        DCD     TIM14_IRQHandler              ; TIM14
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     TIM5_IRQHandler               ; TIM5
-        DCD     SPI3_IRQHandler               ; SPI3
-        DCD     UART4_IRQHandler              ; UART4
-        DCD     UART5_IRQHandler              ; UART5                       
-        DCD     TIM6_DAC_IRQHandler           ; TIM6 and DAC underrun
-        DCD     TIM7_IRQHandler               ; TIM7     
-        DCD     DMA2_Channel1_IRQHandler      ; DMA2 Channel1
-        DCD     DMA2_Channel2_IRQHandler      ; DMA2 Channel2
-        DCD     DMA2_Channel3_IRQHandler      ; DMA2 Channel3
-        DCD     DMA2_Channel4_5_IRQHandler    ; DMA2 Channel4 & Channel5                   
-        DCD     DMA2_Channel5_IRQHandler      ; DMA2 Channel5
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Default interrupt handlers.
-;;
-        THUMB
-
-        PUBWEAK Reset_Handler
-        SECTION .text:CODE:REORDER(2)
-Reset_Handler
-        LDR     R0, =SystemInit
-        BLX     R0
-        LDR     R0, =__iar_program_start
-        BX      R0
-        
-        PUBWEAK NMI_Handler
-        SECTION .text:CODE:REORDER(1)
-NMI_Handler
-        B NMI_Handler
-
-        PUBWEAK HardFault_Handler
-        SECTION .text:CODE:REORDER(1)
-HardFault_Handler
-        B HardFault_Handler
-
-        PUBWEAK MemManage_Handler
-        SECTION .text:CODE:REORDER(1)
-MemManage_Handler
-        B MemManage_Handler
-
-        PUBWEAK BusFault_Handler
-        SECTION .text:CODE:REORDER(1)
-BusFault_Handler
-        B BusFault_Handler
-
-        PUBWEAK UsageFault_Handler
-        SECTION .text:CODE:REORDER(1)
-UsageFault_Handler
-        B UsageFault_Handler
-
-        PUBWEAK SVC_Handler
-        SECTION .text:CODE:REORDER(1)
-SVC_Handler
-        B SVC_Handler
-
-        PUBWEAK DebugMon_Handler
-        SECTION .text:CODE:REORDER(1)
-DebugMon_Handler
-        B DebugMon_Handler
-
-        PUBWEAK PendSV_Handler
-        SECTION .text:CODE:REORDER(1)
-PendSV_Handler
-        B PendSV_Handler
-
-        PUBWEAK SysTick_Handler
-        SECTION .text:CODE:REORDER(1)
-SysTick_Handler
-        B SysTick_Handler
-
-        PUBWEAK WWDG_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-WWDG_IRQHandler
-        B WWDG_IRQHandler
-
-        PUBWEAK PVD_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-PVD_IRQHandler
-        B PVD_IRQHandler
-
-        PUBWEAK TAMPER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TAMPER_IRQHandler
-        B TAMPER_IRQHandler
-
-        PUBWEAK RTC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTC_IRQHandler
-        B RTC_IRQHandler
-
-        PUBWEAK FLASH_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FLASH_IRQHandler
-        B FLASH_IRQHandler
-
-        PUBWEAK RCC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RCC_IRQHandler
-        B RCC_IRQHandler
-
-        PUBWEAK EXTI0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI0_IRQHandler
-        B EXTI0_IRQHandler
-
-        PUBWEAK EXTI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI1_IRQHandler
-        B EXTI1_IRQHandler
-
-        PUBWEAK EXTI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI2_IRQHandler
-        B EXTI2_IRQHandler
-
-        PUBWEAK EXTI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI3_IRQHandler
-        B EXTI3_IRQHandler
-
-        PUBWEAK EXTI4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI4_IRQHandler
-        B EXTI4_IRQHandler
-
-        PUBWEAK DMA1_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel1_IRQHandler
-        B DMA1_Channel1_IRQHandler
-
-        PUBWEAK DMA1_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel2_IRQHandler
-        B DMA1_Channel2_IRQHandler
-
-        PUBWEAK DMA1_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel3_IRQHandler
-        B DMA1_Channel3_IRQHandler
-
-        PUBWEAK DMA1_Channel4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel4_IRQHandler
-        B DMA1_Channel4_IRQHandler
-
-        PUBWEAK DMA1_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel5_IRQHandler
-        B DMA1_Channel5_IRQHandler
-
-        PUBWEAK DMA1_Channel6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel6_IRQHandler
-        B DMA1_Channel6_IRQHandler
-
-        PUBWEAK DMA1_Channel7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel7_IRQHandler
-        B DMA1_Channel7_IRQHandler
-
-        PUBWEAK ADC1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC1_IRQHandler
-        B ADC1_IRQHandler
-
-        PUBWEAK EXTI9_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI9_5_IRQHandler
-        B EXTI9_5_IRQHandler
-
-        PUBWEAK TIM1_BRK_TIM15_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_BRK_TIM15_IRQHandler
-        B TIM1_BRK_TIM15_IRQHandler
-
-        PUBWEAK TIM1_UP_TIM16_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_UP_TIM16_IRQHandler
-        B TIM1_UP_TIM16_IRQHandler
-
-        PUBWEAK TIM1_TRG_COM_TIM17_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_TRG_COM_TIM17_IRQHandler
-        B TIM1_TRG_COM_TIM17_IRQHandler
-
-        PUBWEAK TIM1_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_CC_IRQHandler
-        B TIM1_CC_IRQHandler
-
-        PUBWEAK TIM2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM2_IRQHandler
-        B TIM2_IRQHandler
-
-        PUBWEAK TIM3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM3_IRQHandler
-        B TIM3_IRQHandler
-
-        PUBWEAK TIM4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM4_IRQHandler
-        B TIM4_IRQHandler
-
-        PUBWEAK I2C1_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_EV_IRQHandler
-        B I2C1_EV_IRQHandler
-
-        PUBWEAK I2C1_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_ER_IRQHandler
-        B I2C1_ER_IRQHandler
-
-        PUBWEAK I2C2_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_EV_IRQHandler
-        B I2C2_EV_IRQHandler
-
-        PUBWEAK I2C2_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_ER_IRQHandler
-        B I2C2_ER_IRQHandler
-
-        PUBWEAK SPI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI1_IRQHandler
-        B SPI1_IRQHandler
-
-        PUBWEAK SPI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI2_IRQHandler
-        B SPI2_IRQHandler
-
-        PUBWEAK USART1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART1_IRQHandler
-        B USART1_IRQHandler
-
-        PUBWEAK USART2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART2_IRQHandler
-        B USART2_IRQHandler
-
-        PUBWEAK USART3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART3_IRQHandler
-        B USART3_IRQHandler
-
-        PUBWEAK EXTI15_10_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI15_10_IRQHandler
-        B EXTI15_10_IRQHandler
-
-        PUBWEAK RTCAlarm_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTCAlarm_IRQHandler
-        B RTCAlarm_IRQHandler
-
-        PUBWEAK CEC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CEC_IRQHandler
-        B CEC_IRQHandler
-
-        PUBWEAK TIM12_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM12_IRQHandler
-        B TIM12_IRQHandler
-
-        PUBWEAK TIM13_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM13_IRQHandler
-        B TIM13_IRQHandler
-
-        PUBWEAK TIM14_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM14_IRQHandler
-        B TIM14_IRQHandler
-
-        PUBWEAK TIM5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM5_IRQHandler
-        B TIM5_IRQHandler
-
-        PUBWEAK SPI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI3_IRQHandler
-        B SPI3_IRQHandler
-
-        PUBWEAK UART4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-UART4_IRQHandler
-        B UART4_IRQHandler
-
-        PUBWEAK UART5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-UART5_IRQHandler
-        B UART5_IRQHandler
-        
-        PUBWEAK TIM6_DAC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM6_DAC_IRQHandler
-        B TIM6_DAC_IRQHandler
-
-        PUBWEAK TIM7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM7_IRQHandler
-        B TIM7_IRQHandler                
-
-        PUBWEAK DMA2_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel1_IRQHandler
-        B DMA2_Channel1_IRQHandler
-
-        PUBWEAK DMA2_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel2_IRQHandler
-        B DMA2_Channel2_IRQHandler
-
-        PUBWEAK DMA2_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel3_IRQHandler
-        B DMA2_Channel3_IRQHandler
-
-        PUBWEAK DMA2_Channel4_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel4_5_IRQHandler
-        B DMA2_Channel4_5_IRQHandler
-
-        PUBWEAK DMA2_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel5_IRQHandler
-        B DMA2_Channel5_IRQHandler
-                
-        END
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 366
Libraries/Startup/iar/startup_stm32f10x_ld.s

@@ -1,366 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
-;* File Name          : startup_stm32f10x_ld.s
-;* Author             : MCD Application Team
-;* Version            : V3.5.0
-;* Date               : 11-March-2011
-;* Description        : STM32F10x Low Density Devices vector table for EWARM
-;*                      toolchain.
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Configure the clock system
-;*                      - Set the initial PC == __iar_program_start,
-;*                      - Set the vector table entries with the exceptions ISR 
-;*                        address.
-;*                      After Reset the Cortex-M3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;********************************************************************************
-;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-;
-;
-; The modules in this file are included in the libraries, and may be replaced
-; by any user-defined modules that define the PUBLIC symbol _program_start or
-; a user defined start symbol.
-; To override the cstartup defined in the library, simply add your modified
-; version to the workbench project.
-;
-; The vector table is normally located at address 0.
-; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
-; The name "__vector_table" has special meaning for C-SPY:
-; it is where the SP start value is found, and the NVIC vector
-; table register (VTOR) is initialized to this address if != 0.
-;
-; Cortex-M version
-;
-
-        MODULE  ?cstartup
-
-        ;; Forward declaration of sections.
-        SECTION CSTACK:DATA:NOROOT(3)
-
-        SECTION .intvec:CODE:NOROOT(2)
-
-        EXTERN  __iar_program_start
-        EXTERN  SystemInit        
-        PUBLIC  __vector_table
-
-        DATA
-__vector_table
-        DCD     sfe(CSTACK)
-        DCD     Reset_Handler             ; Reset Handler
-        DCD     NMI_Handler               ; NMI Handler
-        DCD     HardFault_Handler         ; Hard Fault Handler
-        DCD     MemManage_Handler         ; MPU Fault Handler
-        DCD     BusFault_Handler          ; Bus Fault Handler
-        DCD     UsageFault_Handler        ; Usage Fault Handler
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     SVC_Handler               ; SVCall Handler
-        DCD     DebugMon_Handler          ; Debug Monitor Handler
-        DCD     0                         ; Reserved
-        DCD     PendSV_Handler            ; PendSV Handler
-        DCD     SysTick_Handler           ; SysTick Handler
-
-         ; External Interrupts
-        DCD     WWDG_IRQHandler           ; Window Watchdog
-        DCD     PVD_IRQHandler            ; PVD through EXTI Line detect
-        DCD     TAMPER_IRQHandler         ; Tamper
-        DCD     RTC_IRQHandler            ; RTC
-        DCD     FLASH_IRQHandler          ; Flash
-        DCD     RCC_IRQHandler            ; RCC
-        DCD     EXTI0_IRQHandler          ; EXTI Line 0
-        DCD     EXTI1_IRQHandler          ; EXTI Line 1
-        DCD     EXTI2_IRQHandler          ; EXTI Line 2
-        DCD     EXTI3_IRQHandler          ; EXTI Line 3
-        DCD     EXTI4_IRQHandler          ; EXTI Line 4
-        DCD     DMA1_Channel1_IRQHandler  ; DMA1 Channel 1
-        DCD     DMA1_Channel2_IRQHandler  ; DMA1 Channel 2
-        DCD     DMA1_Channel3_IRQHandler  ; DMA1 Channel 3
-        DCD     DMA1_Channel4_IRQHandler  ; DMA1 Channel 4
-        DCD     DMA1_Channel5_IRQHandler  ; DMA1 Channel 5
-        DCD     DMA1_Channel6_IRQHandler  ; DMA1 Channel 6
-        DCD     DMA1_Channel7_IRQHandler  ; DMA1 Channel 7
-        DCD     ADC1_2_IRQHandler         ; ADC1 & ADC2
-        DCD     USB_HP_CAN1_TX_IRQHandler  ; USB High Priority or CAN1 TX
-        DCD     USB_LP_CAN1_RX0_IRQHandler ; USB Low  Priority or CAN1 RX0
-        DCD     CAN1_RX1_IRQHandler       ; CAN1 RX1
-        DCD     CAN1_SCE_IRQHandler       ; CAN1 SCE
-        DCD     EXTI9_5_IRQHandler        ; EXTI Line 9..5
-        DCD     TIM1_BRK_IRQHandler       ; TIM1 Break
-        DCD     TIM1_UP_IRQHandler        ; TIM1 Update
-        DCD     TIM1_TRG_COM_IRQHandler   ; TIM1 Trigger and Commutation
-        DCD     TIM1_CC_IRQHandler        ; TIM1 Capture Compare
-        DCD     TIM2_IRQHandler           ; TIM2
-        DCD     TIM3_IRQHandler           ; TIM3
-        DCD     0                         ; Reserved
-        DCD     I2C1_EV_IRQHandler        ; I2C1 Event
-        DCD     I2C1_ER_IRQHandler        ; I2C1 Error
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     SPI1_IRQHandler           ; SPI1
-        DCD     0                         ; Reserved
-        DCD     USART1_IRQHandler         ; USART1
-        DCD     USART2_IRQHandler         ; USART2
-        DCD     0                         ; Reserved
-        DCD     EXTI15_10_IRQHandler      ; EXTI Line 15..10
-        DCD     RTCAlarm_IRQHandler       ; RTC Alarm through EXTI Line
-        DCD     USBWakeUp_IRQHandler      ; USB Wakeup from suspend
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Default interrupt handlers.
-;;
-        THUMB
-
-        PUBWEAK Reset_Handler
-        SECTION .text:CODE:REORDER(2)
-Reset_Handler
-        LDR     R0, =SystemInit
-        BLX     R0
-        LDR     R0, =__iar_program_start
-        BX      R0
-        
-        PUBWEAK NMI_Handler
-        SECTION .text:CODE:REORDER(1)
-NMI_Handler
-        B NMI_Handler
-        
-        PUBWEAK HardFault_Handler
-        SECTION .text:CODE:REORDER(1)
-HardFault_Handler
-        B HardFault_Handler
-        
-        PUBWEAK MemManage_Handler
-        SECTION .text:CODE:REORDER(1)
-MemManage_Handler
-        B MemManage_Handler
-        
-        PUBWEAK BusFault_Handler
-        SECTION .text:CODE:REORDER(1)
-BusFault_Handler
-        B BusFault_Handler
-        
-        PUBWEAK UsageFault_Handler
-        SECTION .text:CODE:REORDER(1)
-UsageFault_Handler
-        B UsageFault_Handler
-        
-        PUBWEAK SVC_Handler
-        SECTION .text:CODE:REORDER(1)
-SVC_Handler
-        B SVC_Handler
-        
-        PUBWEAK DebugMon_Handler
-        SECTION .text:CODE:REORDER(1)
-DebugMon_Handler
-        B DebugMon_Handler
-        
-        PUBWEAK PendSV_Handler
-        SECTION .text:CODE:REORDER(1)
-PendSV_Handler
-        B PendSV_Handler
-        
-        PUBWEAK SysTick_Handler
-        SECTION .text:CODE:REORDER(1)
-SysTick_Handler
-        B SysTick_Handler
-        
-        PUBWEAK WWDG_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-WWDG_IRQHandler
-        B WWDG_IRQHandler
-        
-        PUBWEAK PVD_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-PVD_IRQHandler
-        B PVD_IRQHandler
-        
-        PUBWEAK TAMPER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TAMPER_IRQHandler
-        B TAMPER_IRQHandler
-        
-        PUBWEAK RTC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTC_IRQHandler
-        B RTC_IRQHandler
-        
-        PUBWEAK FLASH_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FLASH_IRQHandler
-        B FLASH_IRQHandler
-        
-        PUBWEAK RCC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RCC_IRQHandler
-        B RCC_IRQHandler
-        
-        PUBWEAK EXTI0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI0_IRQHandler
-        B EXTI0_IRQHandler
-        
-        PUBWEAK EXTI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI1_IRQHandler
-        B EXTI1_IRQHandler
-        
-        PUBWEAK EXTI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI2_IRQHandler
-        B EXTI2_IRQHandler
-        
-        PUBWEAK EXTI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI3_IRQHandler
-        B EXTI3_IRQHandler
-        
-        PUBWEAK EXTI4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI4_IRQHandler
-        B EXTI4_IRQHandler
-        
-        PUBWEAK DMA1_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel1_IRQHandler
-        B DMA1_Channel1_IRQHandler
-        
-        PUBWEAK DMA1_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel2_IRQHandler
-        B DMA1_Channel2_IRQHandler
-        
-        PUBWEAK DMA1_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel3_IRQHandler
-        B DMA1_Channel3_IRQHandler
-        
-        PUBWEAK DMA1_Channel4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel4_IRQHandler
-        B DMA1_Channel4_IRQHandler
-        
-        PUBWEAK DMA1_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel5_IRQHandler
-        B DMA1_Channel5_IRQHandler
-        
-        PUBWEAK DMA1_Channel6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel6_IRQHandler
-        B DMA1_Channel6_IRQHandler
-        
-        PUBWEAK DMA1_Channel7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel7_IRQHandler
-        B DMA1_Channel7_IRQHandler
-        
-        PUBWEAK ADC1_2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC1_2_IRQHandler
-        B ADC1_2_IRQHandler
-        
-        PUBWEAK USB_HP_CAN1_TX_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USB_HP_CAN1_TX_IRQHandler
-        B USB_HP_CAN1_TX_IRQHandler
-        
-        PUBWEAK USB_LP_CAN1_RX0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USB_LP_CAN1_RX0_IRQHandler
-        B USB_LP_CAN1_RX0_IRQHandler
-        
-        PUBWEAK CAN1_RX1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_RX1_IRQHandler
-        B CAN1_RX1_IRQHandler
-        
-        PUBWEAK CAN1_SCE_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_SCE_IRQHandler
-        B CAN1_SCE_IRQHandler
-        
-        PUBWEAK EXTI9_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI9_5_IRQHandler
-        B EXTI9_5_IRQHandler
-        
-        PUBWEAK TIM1_BRK_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_BRK_IRQHandler
-        B TIM1_BRK_IRQHandler
-        
-        PUBWEAK TIM1_UP_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_UP_IRQHandler
-        B TIM1_UP_IRQHandler
-        
-        PUBWEAK TIM1_TRG_COM_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_TRG_COM_IRQHandler
-        B TIM1_TRG_COM_IRQHandler
-        
-        PUBWEAK TIM1_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_CC_IRQHandler
-        B TIM1_CC_IRQHandler
-        
-        PUBWEAK TIM2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM2_IRQHandler
-        B TIM2_IRQHandler
-        
-        PUBWEAK TIM3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM3_IRQHandler
-        B TIM3_IRQHandler
-        
-        PUBWEAK I2C1_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_EV_IRQHandler
-        B I2C1_EV_IRQHandler
-        
-        PUBWEAK I2C1_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_ER_IRQHandler
-        B I2C1_ER_IRQHandler
-        
-        PUBWEAK SPI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI1_IRQHandler
-        B SPI1_IRQHandler
-                      
-        PUBWEAK USART1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART1_IRQHandler
-        B USART1_IRQHandler
-
-        PUBWEAK USART2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART2_IRQHandler
-        B USART2_IRQHandler
-
-        PUBWEAK EXTI15_10_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI15_10_IRQHandler
-        B EXTI15_10_IRQHandler
-
-        PUBWEAK RTCAlarm_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTCAlarm_IRQHandler
-        B RTCAlarm_IRQHandler
-
-        PUBWEAK USBWakeUp_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USBWakeUp_IRQHandler
-        B USBWakeUp_IRQHandler
-
-        END
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 369
Libraries/Startup/iar/startup_stm32f10x_ld_vl.s

@@ -1,369 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
-;* File Name          : startup_stm32f10x_ld_vl.s
-;* Author             : MCD Application Team
-;* Version            : V3.5.0
-;* Date               : 11-March-2011
-;* Description        : STM32F10x Low Density Value Line Devices vector table 
-;*                      for EWARM toolchain.
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Configure the clock system
-;*                      - Set the initial PC == __iar_program_start,
-;*                      - Set the vector table entries with the exceptions ISR 
-;*                        address.
-;*                      After Reset the Cortex-M3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;********************************************************************************
-;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-;
-;
-; The modules in this file are included in the libraries, and may be replaced
-; by any user-defined modules that define the PUBLIC symbol _program_start or
-; a user defined start symbol.
-; To override the cstartup defined in the library, simply add your modified
-; version to the workbench project.
-;
-; The vector table is normally located at address 0.
-; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
-; The name "__vector_table" has special meaning for C-SPY:
-; it is where the SP start value is found, and the NVIC vector
-; table register (VTOR) is initialized to this address if != 0.
-;
-; Cortex-M version
-;
-
-        MODULE  ?cstartup
-
-        ;; Forward declaration of sections.
-        SECTION CSTACK:DATA:NOROOT(3)
-
-        SECTION .intvec:CODE:NOROOT(2)
-
-        EXTERN  __iar_program_start
-        EXTERN  SystemInit        
-        PUBLIC  __vector_table
-
-        DATA
-__vector_table
-        DCD     sfe(CSTACK)
-        DCD     Reset_Handler             ; Reset Handler
-        DCD     NMI_Handler               ; NMI Handler
-        DCD     HardFault_Handler         ; Hard Fault Handler
-        DCD     MemManage_Handler         ; MPU Fault Handler
-        DCD     BusFault_Handler          ; Bus Fault Handler
-        DCD     UsageFault_Handler        ; Usage Fault Handler
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     SVC_Handler               ; SVCall Handler
-        DCD     DebugMon_Handler          ; Debug Monitor Handler
-        DCD     0                         ; Reserved
-        DCD     PendSV_Handler            ; PendSV Handler
-        DCD     SysTick_Handler           ; SysTick Handler
-
-         ; External Interrupts
-        DCD     WWDG_IRQHandler               ; Window Watchdog
-        DCD     PVD_IRQHandler                ; PVD through EXTI Line detect
-        DCD     TAMPER_IRQHandler             ; Tamper
-        DCD     RTC_IRQHandler                ; RTC
-        DCD     FLASH_IRQHandler              ; Flash
-        DCD     RCC_IRQHandler                ; RCC
-        DCD     EXTI0_IRQHandler              ; EXTI Line 0
-        DCD     EXTI1_IRQHandler              ; EXTI Line 1
-        DCD     EXTI2_IRQHandler              ; EXTI Line 2
-        DCD     EXTI3_IRQHandler              ; EXTI Line 3
-        DCD     EXTI4_IRQHandler              ; EXTI Line 4
-        DCD     DMA1_Channel1_IRQHandler      ; DMA1 Channel 1
-        DCD     DMA1_Channel2_IRQHandler      ; DMA1 Channel 2
-        DCD     DMA1_Channel3_IRQHandler      ; DMA1 Channel 3
-        DCD     DMA1_Channel4_IRQHandler      ; DMA1 Channel 4
-        DCD     DMA1_Channel5_IRQHandler      ; DMA1 Channel 5
-        DCD     DMA1_Channel6_IRQHandler      ; DMA1 Channel 6
-        DCD     DMA1_Channel7_IRQHandler      ; DMA1 Channel 7
-        DCD     ADC1_IRQHandler               ; ADC1
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     EXTI9_5_IRQHandler            ; EXTI Line 9..5
-        DCD     TIM1_BRK_TIM15_IRQHandler     ; TIM1 Break and TIM15
-        DCD     TIM1_UP_TIM16_IRQHandler      ; TIM1 Update and TIM16
-        DCD     TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Commutation and TIM17
-        DCD     TIM1_CC_IRQHandler            ; TIM1 Capture Compare
-        DCD     TIM2_IRQHandler               ; TIM2
-        DCD     TIM3_IRQHandler               ; TIM3
-        DCD     0                             ; Reserved
-        DCD     I2C1_EV_IRQHandler            ; I2C1 Event
-        DCD     I2C1_ER_IRQHandler            ; I2C1 Error
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     SPI1_IRQHandler               ; SPI1
-        DCD     0                             ; Reserved
-        DCD     USART1_IRQHandler             ; USART1
-        DCD     USART2_IRQHandler             ; USART2
-        DCD     0                             ; Reserved
-        DCD     EXTI15_10_IRQHandler          ; EXTI Line 15..10
-        DCD     RTCAlarm_IRQHandler           ; RTC Alarm through EXTI Line
-        DCD     CEC_IRQHandler                ; HDMI-CEC
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     TIM6_DAC_IRQHandler           ; TIM6 and DAC underrun
-        DCD     TIM7_IRQHandler               ; TIM7
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Default interrupt handlers.
-;;
-        THUMB
-
-        PUBWEAK Reset_Handler
-        SECTION .text:CODE:REORDER(2)
-Reset_Handler
-        LDR     R0, =SystemInit
-        BLX     R0
-        LDR     R0, =__iar_program_start
-        BX      R0
-        
-        PUBWEAK NMI_Handler
-        SECTION .text:CODE:REORDER(1)
-NMI_Handler
-        B NMI_Handler
-
-        PUBWEAK HardFault_Handler
-        SECTION .text:CODE:REORDER(1)
-HardFault_Handler
-        B HardFault_Handler
-
-        PUBWEAK MemManage_Handler
-        SECTION .text:CODE:REORDER(1)
-MemManage_Handler
-        B MemManage_Handler
-
-        PUBWEAK BusFault_Handler
-        SECTION .text:CODE:REORDER(1)
-BusFault_Handler
-        B BusFault_Handler
-
-        PUBWEAK UsageFault_Handler
-        SECTION .text:CODE:REORDER(1)
-UsageFault_Handler
-        B UsageFault_Handler
-
-        PUBWEAK SVC_Handler
-        SECTION .text:CODE:REORDER(1)
-SVC_Handler
-        B SVC_Handler
-
-        PUBWEAK DebugMon_Handler
-        SECTION .text:CODE:REORDER(1)
-DebugMon_Handler
-        B DebugMon_Handler
-
-        PUBWEAK PendSV_Handler
-        SECTION .text:CODE:REORDER(1)
-PendSV_Handler
-        B PendSV_Handler
-
-        PUBWEAK SysTick_Handler
-        SECTION .text:CODE:REORDER(1)
-SysTick_Handler
-        B SysTick_Handler
-
-        PUBWEAK WWDG_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-WWDG_IRQHandler
-        B WWDG_IRQHandler
-
-        PUBWEAK PVD_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-PVD_IRQHandler
-        B PVD_IRQHandler
-
-        PUBWEAK TAMPER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TAMPER_IRQHandler
-        B TAMPER_IRQHandler
-
-        PUBWEAK RTC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTC_IRQHandler
-        B RTC_IRQHandler
-
-        PUBWEAK FLASH_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FLASH_IRQHandler
-        B FLASH_IRQHandler
-
-        PUBWEAK RCC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RCC_IRQHandler
-        B RCC_IRQHandler
-
-        PUBWEAK EXTI0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI0_IRQHandler
-        B EXTI0_IRQHandler
-
-        PUBWEAK EXTI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI1_IRQHandler
-        B EXTI1_IRQHandler
-
-        PUBWEAK EXTI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI2_IRQHandler
-        B EXTI2_IRQHandler
-
-        PUBWEAK EXTI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI3_IRQHandler
-        B EXTI3_IRQHandler
-
-        PUBWEAK EXTI4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI4_IRQHandler
-        B EXTI4_IRQHandler
-
-        PUBWEAK DMA1_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel1_IRQHandler
-        B DMA1_Channel1_IRQHandler
-
-        PUBWEAK DMA1_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel2_IRQHandler
-        B DMA1_Channel2_IRQHandler
-
-        PUBWEAK DMA1_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel3_IRQHandler
-        B DMA1_Channel3_IRQHandler
-
-        PUBWEAK DMA1_Channel4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel4_IRQHandler
-        B DMA1_Channel4_IRQHandler
-
-        PUBWEAK DMA1_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel5_IRQHandler
-        B DMA1_Channel5_IRQHandler
-
-        PUBWEAK DMA1_Channel6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel6_IRQHandler
-        B DMA1_Channel6_IRQHandler
-
-        PUBWEAK DMA1_Channel7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel7_IRQHandler
-        B DMA1_Channel7_IRQHandler
-
-        PUBWEAK ADC1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC1_IRQHandler
-        B ADC1_IRQHandler
-
-        PUBWEAK EXTI9_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI9_5_IRQHandler
-        B EXTI9_5_IRQHandler
-
-        PUBWEAK TIM1_BRK_TIM15_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_BRK_TIM15_IRQHandler
-        B TIM1_BRK_TIM15_IRQHandler
-
-        PUBWEAK TIM1_UP_TIM16_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_UP_TIM16_IRQHandler
-        B TIM1_UP_TIM16_IRQHandler
-
-        PUBWEAK TIM1_TRG_COM_TIM17_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_TRG_COM_TIM17_IRQHandler
-        B TIM1_TRG_COM_TIM17_IRQHandler
-
-        PUBWEAK TIM1_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_CC_IRQHandler
-        B TIM1_CC_IRQHandler
-
-        PUBWEAK TIM2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM2_IRQHandler
-        B TIM2_IRQHandler
-
-        PUBWEAK TIM3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM3_IRQHandler
-        B TIM3_IRQHandler
-
-        PUBWEAK I2C1_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_EV_IRQHandler
-        B I2C1_EV_IRQHandler
-
-        PUBWEAK I2C1_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_ER_IRQHandler
-        B I2C1_ER_IRQHandler
-
-        PUBWEAK SPI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI1_IRQHandler
-        B SPI1_IRQHandler
-
-        PUBWEAK USART1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART1_IRQHandler
-        B USART1_IRQHandler
-
-        PUBWEAK USART2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART2_IRQHandler
-        B USART2_IRQHandler
-
-        PUBWEAK EXTI15_10_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI15_10_IRQHandler
-        B EXTI15_10_IRQHandler
-
-        PUBWEAK RTCAlarm_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTCAlarm_IRQHandler
-        B RTCAlarm_IRQHandler
-
-        PUBWEAK CEC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CEC_IRQHandler
-        B CEC_IRQHandler
-
-        PUBWEAK TIM6_DAC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM6_DAC_IRQHandler
-        B TIM6_DAC_IRQHandler
-
-        PUBWEAK TIM7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM7_IRQHandler
-        B TIM7_IRQHandler                
-
-        END
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 391
Libraries/Startup/iar/startup_stm32f10x_md.s

@@ -1,391 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
-;* File Name          : startup_stm32f10x_md.s
-;* Author             : MCD Application Team
-;* Version            : V3.5.0
-;* Date               : 11-March-2011
-;* Description        : STM32F10x Medium Density Devices vector table for 
-;*                      EWARM toolchain.
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Configure the clock system
-;*                      - Set the initial PC == __iar_program_start,
-;*                      - Set the vector table entries with the exceptions ISR 
-;*                        address.
-;*                      After Reset the Cortex-M3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;********************************************************************************
-;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-;
-;
-; The modules in this file are included in the libraries, and may be replaced
-; by any user-defined modules that define the PUBLIC symbol _program_start or
-; a user defined start symbol.
-; To override the cstartup defined in the library, simply add your modified
-; version to the workbench project.
-;
-; The vector table is normally located at address 0.
-; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
-; The name "__vector_table" has special meaning for C-SPY:
-; it is where the SP start value is found, and the NVIC vector
-; table register (VTOR) is initialized to this address if != 0.
-;
-; Cortex-M version
-;
-
-        MODULE  ?cstartup
-
-        ;; Forward declaration of sections.
-        SECTION CSTACK:DATA:NOROOT(3)
-
-        SECTION .intvec:CODE:NOROOT(2)
-
-        EXTERN  __iar_program_start
-        EXTERN  SystemInit        
-        PUBLIC  __vector_table
-
-        DATA
-__vector_table
-        DCD     sfe(CSTACK)
-        DCD     Reset_Handler             ; Reset Handler
-        DCD     NMI_Handler               ; NMI Handler
-        DCD     HardFault_Handler         ; Hard Fault Handler
-        DCD     MemManage_Handler         ; MPU Fault Handler
-        DCD     BusFault_Handler          ; Bus Fault Handler
-        DCD     UsageFault_Handler        ; Usage Fault Handler
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     SVC_Handler               ; SVCall Handler
-        DCD     DebugMon_Handler          ; Debug Monitor Handler
-        DCD     0                         ; Reserved
-        DCD     PendSV_Handler            ; PendSV Handler
-        DCD     SysTick_Handler           ; SysTick Handler
-
-         ; External Interrupts
-        DCD     WWDG_IRQHandler           ; Window Watchdog
-        DCD     PVD_IRQHandler            ; PVD through EXTI Line detect
-        DCD     TAMPER_IRQHandler         ; Tamper
-        DCD     RTC_IRQHandler            ; RTC
-        DCD     FLASH_IRQHandler          ; Flash
-        DCD     RCC_IRQHandler            ; RCC
-        DCD     EXTI0_IRQHandler          ; EXTI Line 0
-        DCD     EXTI1_IRQHandler          ; EXTI Line 1
-        DCD     EXTI2_IRQHandler          ; EXTI Line 2
-        DCD     EXTI3_IRQHandler          ; EXTI Line 3
-        DCD     EXTI4_IRQHandler          ; EXTI Line 4
-        DCD     DMA1_Channel1_IRQHandler  ; DMA1 Channel 1
-        DCD     DMA1_Channel2_IRQHandler  ; DMA1 Channel 2
-        DCD     DMA1_Channel3_IRQHandler  ; DMA1 Channel 3
-        DCD     DMA1_Channel4_IRQHandler  ; DMA1 Channel 4
-        DCD     DMA1_Channel5_IRQHandler  ; DMA1 Channel 5
-        DCD     DMA1_Channel6_IRQHandler  ; DMA1 Channel 6
-        DCD     DMA1_Channel7_IRQHandler  ; DMA1 Channel 7
-        DCD     ADC1_2_IRQHandler         ; ADC1 & ADC2
-        DCD     USB_HP_CAN1_TX_IRQHandler  ; USB High Priority or CAN1 TX
-        DCD     USB_LP_CAN1_RX0_IRQHandler ; USB Low  Priority or CAN1 RX0
-        DCD     CAN1_RX1_IRQHandler       ; CAN1 RX1
-        DCD     CAN1_SCE_IRQHandler       ; CAN1 SCE
-        DCD     EXTI9_5_IRQHandler        ; EXTI Line 9..5
-        DCD     TIM1_BRK_IRQHandler       ; TIM1 Break
-        DCD     TIM1_UP_IRQHandler        ; TIM1 Update
-        DCD     TIM1_TRG_COM_IRQHandler   ; TIM1 Trigger and Commutation
-        DCD     TIM1_CC_IRQHandler        ; TIM1 Capture Compare
-        DCD     TIM2_IRQHandler           ; TIM2
-        DCD     TIM3_IRQHandler           ; TIM3
-        DCD     TIM4_IRQHandler           ; TIM4
-        DCD     I2C1_EV_IRQHandler        ; I2C1 Event
-        DCD     I2C1_ER_IRQHandler        ; I2C1 Error
-        DCD     I2C2_EV_IRQHandler        ; I2C2 Event
-        DCD     I2C2_ER_IRQHandler        ; I2C2 Error
-        DCD     SPI1_IRQHandler           ; SPI1
-        DCD     SPI2_IRQHandler           ; SPI2
-        DCD     USART1_IRQHandler         ; USART1
-        DCD     USART2_IRQHandler         ; USART2
-        DCD     USART3_IRQHandler         ; USART3
-        DCD     EXTI15_10_IRQHandler      ; EXTI Line 15..10
-        DCD     RTCAlarm_IRQHandler       ; RTC Alarm through EXTI Line
-        DCD     USBWakeUp_IRQHandler      ; USB Wakeup from suspend
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Default interrupt handlers.
-;;
-        THUMB
-
-        PUBWEAK Reset_Handler
-        SECTION .text:CODE:REORDER(2)
-Reset_Handler
-        LDR     R0, =SystemInit
-        BLX     R0
-        LDR     R0, =__iar_program_start
-        BX      R0
-        
-        PUBWEAK NMI_Handler
-        SECTION .text:CODE:REORDER(1)
-NMI_Handler
-        B NMI_Handler
-
-        PUBWEAK HardFault_Handler
-        SECTION .text:CODE:REORDER(1)
-HardFault_Handler
-        B HardFault_Handler
-
-        PUBWEAK MemManage_Handler
-        SECTION .text:CODE:REORDER(1)
-MemManage_Handler
-        B MemManage_Handler
-
-        PUBWEAK BusFault_Handler
-        SECTION .text:CODE:REORDER(1)
-BusFault_Handler
-        B BusFault_Handler
-
-        PUBWEAK UsageFault_Handler
-        SECTION .text:CODE:REORDER(1)
-UsageFault_Handler
-        B UsageFault_Handler
-
-        PUBWEAK SVC_Handler
-        SECTION .text:CODE:REORDER(1)
-SVC_Handler
-        B SVC_Handler
-
-        PUBWEAK DebugMon_Handler
-        SECTION .text:CODE:REORDER(1)
-DebugMon_Handler
-        B DebugMon_Handler
-
-        PUBWEAK PendSV_Handler
-        SECTION .text:CODE:REORDER(1)
-PendSV_Handler
-        B PendSV_Handler
-
-        PUBWEAK SysTick_Handler
-        SECTION .text:CODE:REORDER(1)
-SysTick_Handler
-        B SysTick_Handler
-
-        PUBWEAK WWDG_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-WWDG_IRQHandler
-        B WWDG_IRQHandler
-
-        PUBWEAK PVD_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-PVD_IRQHandler
-        B PVD_IRQHandler
-
-        PUBWEAK TAMPER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TAMPER_IRQHandler
-        B TAMPER_IRQHandler
-
-        PUBWEAK RTC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTC_IRQHandler
-        B RTC_IRQHandler
-
-        PUBWEAK FLASH_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FLASH_IRQHandler
-        B FLASH_IRQHandler
-
-        PUBWEAK RCC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RCC_IRQHandler
-        B RCC_IRQHandler
-
-        PUBWEAK EXTI0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI0_IRQHandler
-        B EXTI0_IRQHandler
-
-        PUBWEAK EXTI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI1_IRQHandler
-        B EXTI1_IRQHandler
-
-        PUBWEAK EXTI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI2_IRQHandler
-        B EXTI2_IRQHandler
-
-        PUBWEAK EXTI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI3_IRQHandler
-        B EXTI3_IRQHandler
-
-        PUBWEAK EXTI4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI4_IRQHandler
-        B EXTI4_IRQHandler
-
-        PUBWEAK DMA1_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel1_IRQHandler
-        B DMA1_Channel1_IRQHandler
-
-        PUBWEAK DMA1_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel2_IRQHandler
-        B DMA1_Channel2_IRQHandler
-
-        PUBWEAK DMA1_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel3_IRQHandler
-        B DMA1_Channel3_IRQHandler
-
-        PUBWEAK DMA1_Channel4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel4_IRQHandler
-        B DMA1_Channel4_IRQHandler
-
-        PUBWEAK DMA1_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel5_IRQHandler
-        B DMA1_Channel5_IRQHandler
-
-        PUBWEAK DMA1_Channel6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel6_IRQHandler
-        B DMA1_Channel6_IRQHandler
-
-        PUBWEAK DMA1_Channel7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel7_IRQHandler
-        B DMA1_Channel7_IRQHandler
-
-        PUBWEAK ADC1_2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC1_2_IRQHandler
-        B ADC1_2_IRQHandler
-
-        PUBWEAK USB_HP_CAN1_TX_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USB_HP_CAN1_TX_IRQHandler
-        B USB_HP_CAN1_TX_IRQHandler
-
-        PUBWEAK USB_LP_CAN1_RX0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USB_LP_CAN1_RX0_IRQHandler
-        B USB_LP_CAN1_RX0_IRQHandler
-
-        PUBWEAK CAN1_RX1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_RX1_IRQHandler
-        B CAN1_RX1_IRQHandler
-
-        PUBWEAK CAN1_SCE_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_SCE_IRQHandler
-        B CAN1_SCE_IRQHandler
-
-        PUBWEAK EXTI9_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI9_5_IRQHandler
-        B EXTI9_5_IRQHandler
-
-        PUBWEAK TIM1_BRK_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_BRK_IRQHandler
-        B TIM1_BRK_IRQHandler
-
-        PUBWEAK TIM1_UP_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_UP_IRQHandler
-        B TIM1_UP_IRQHandler
-
-        PUBWEAK TIM1_TRG_COM_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_TRG_COM_IRQHandler
-        B TIM1_TRG_COM_IRQHandler
-
-        PUBWEAK TIM1_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_CC_IRQHandler
-        B TIM1_CC_IRQHandler
-
-        PUBWEAK TIM2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM2_IRQHandler
-        B TIM2_IRQHandler
-
-        PUBWEAK TIM3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM3_IRQHandler
-        B TIM3_IRQHandler
-
-        PUBWEAK TIM4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM4_IRQHandler
-        B TIM4_IRQHandler
-
-        PUBWEAK I2C1_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_EV_IRQHandler
-        B I2C1_EV_IRQHandler
-
-        PUBWEAK I2C1_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_ER_IRQHandler
-        B I2C1_ER_IRQHandler
-
-        PUBWEAK I2C2_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_EV_IRQHandler
-        B I2C2_EV_IRQHandler
-
-        PUBWEAK I2C2_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_ER_IRQHandler
-        B I2C2_ER_IRQHandler
-
-        PUBWEAK SPI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI1_IRQHandler
-        B SPI1_IRQHandler
-
-        PUBWEAK SPI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI2_IRQHandler
-        B SPI2_IRQHandler
-
-        PUBWEAK USART1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART1_IRQHandler
-        B USART1_IRQHandler
-
-        PUBWEAK USART2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART2_IRQHandler
-        B USART2_IRQHandler
-
-        PUBWEAK USART3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART3_IRQHandler
-        B USART3_IRQHandler
-
-        PUBWEAK EXTI15_10_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI15_10_IRQHandler
-        B EXTI15_10_IRQHandler
-
-        PUBWEAK RTCAlarm_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTCAlarm_IRQHandler
-        B RTCAlarm_IRQHandler
-
-        PUBWEAK USBWakeUp_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USBWakeUp_IRQHandler
-        B USBWakeUp_IRQHandler
-
-        END
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 394
Libraries/Startup/iar/startup_stm32f10x_md_vl.s

@@ -1,394 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
-;* File Name          : startup_stm32f10x_md_vl.s
-;* Author             : MCD Application Team
-;* Version            : V3.5.0
-;* Date               : 11-March-2011
-;* Description        : STM32F10x Medium Density Value Line Devices vector table 
-;*                      for EWARM toolchain.
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Configure the clock system
-;*                      - Set the initial PC == __iar_program_start,
-;*                      - Set the vector table entries with the exceptions ISR 
-;*                        address.
-;*                      After Reset the Cortex-M3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;********************************************************************************
-;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-;
-;
-; The modules in this file are included in the libraries, and may be replaced
-; by any user-defined modules that define the PUBLIC symbol _program_start or
-; a user defined start symbol.
-; To override the cstartup defined in the library, simply add your modified
-; version to the workbench project.
-;
-; The vector table is normally located at address 0.
-; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
-; The name "__vector_table" has special meaning for C-SPY:
-; it is where the SP start value is found, and the NVIC vector
-; table register (VTOR) is initialized to this address if != 0.
-;
-; Cortex-M version
-;
-
-        MODULE  ?cstartup
-
-        ;; Forward declaration of sections.
-        SECTION CSTACK:DATA:NOROOT(3)
-
-        SECTION .intvec:CODE:NOROOT(2)
-
-        EXTERN  __iar_program_start
-        EXTERN  SystemInit        
-        PUBLIC  __vector_table
-
-        DATA
-__vector_table
-        DCD     sfe(CSTACK)
-        DCD     Reset_Handler             ; Reset Handler
-        DCD     NMI_Handler               ; NMI Handler
-        DCD     HardFault_Handler         ; Hard Fault Handler
-        DCD     MemManage_Handler         ; MPU Fault Handler
-        DCD     BusFault_Handler          ; Bus Fault Handler
-        DCD     UsageFault_Handler        ; Usage Fault Handler
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     SVC_Handler               ; SVCall Handler
-        DCD     DebugMon_Handler          ; Debug Monitor Handler
-        DCD     0                         ; Reserved
-        DCD     PendSV_Handler            ; PendSV Handler
-        DCD     SysTick_Handler           ; SysTick Handler
-
-         ; External Interrupts
-        DCD     WWDG_IRQHandler               ; Window Watchdog
-        DCD     PVD_IRQHandler                ; PVD through EXTI Line detect
-        DCD     TAMPER_IRQHandler             ; Tamper
-        DCD     RTC_IRQHandler                ; RTC
-        DCD     FLASH_IRQHandler              ; Flash
-        DCD     RCC_IRQHandler                ; RCC
-        DCD     EXTI0_IRQHandler              ; EXTI Line 0
-        DCD     EXTI1_IRQHandler              ; EXTI Line 1
-        DCD     EXTI2_IRQHandler              ; EXTI Line 2
-        DCD     EXTI3_IRQHandler              ; EXTI Line 3
-        DCD     EXTI4_IRQHandler              ; EXTI Line 4
-        DCD     DMA1_Channel1_IRQHandler      ; DMA1 Channel 1
-        DCD     DMA1_Channel2_IRQHandler      ; DMA1 Channel 2
-        DCD     DMA1_Channel3_IRQHandler      ; DMA1 Channel 3
-        DCD     DMA1_Channel4_IRQHandler      ; DMA1 Channel 4
-        DCD     DMA1_Channel5_IRQHandler      ; DMA1 Channel 5
-        DCD     DMA1_Channel6_IRQHandler      ; DMA1 Channel 6
-        DCD     DMA1_Channel7_IRQHandler      ; DMA1 Channel 7
-        DCD     ADC1_IRQHandler               ; ADC1
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     EXTI9_5_IRQHandler            ; EXTI Line 9..5
-        DCD     TIM1_BRK_TIM15_IRQHandler     ; TIM1 Break and TIM15
-        DCD     TIM1_UP_TIM16_IRQHandler      ; TIM1 Update and TIM16
-        DCD     TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Commutation and TIM17
-        DCD     TIM1_CC_IRQHandler            ; TIM1 Capture Compare
-        DCD     TIM2_IRQHandler               ; TIM2
-        DCD     TIM3_IRQHandler               ; TIM3
-        DCD     TIM4_IRQHandler               ; TIM4
-        DCD     I2C1_EV_IRQHandler            ; I2C1 Event
-        DCD     I2C1_ER_IRQHandler            ; I2C1 Error
-        DCD     I2C2_EV_IRQHandler            ; I2C2 Event
-        DCD     I2C2_ER_IRQHandler            ; I2C2 Error
-        DCD     SPI1_IRQHandler               ; SPI1
-        DCD     SPI2_IRQHandler               ; SPI2
-        DCD     USART1_IRQHandler             ; USART1
-        DCD     USART2_IRQHandler             ; USART2
-        DCD     USART3_IRQHandler             ; USART3
-        DCD     EXTI15_10_IRQHandler          ; EXTI Line 15..10
-        DCD     RTCAlarm_IRQHandler           ; RTC Alarm through EXTI Line
-        DCD     CEC_IRQHandler                ; HDMI-CEC
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved
-        DCD     0                             ; Reserved                        
-        DCD     TIM6_DAC_IRQHandler           ; TIM6 and DAC underrun
-        DCD     TIM7_IRQHandler               ; TIM7                
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Default interrupt handlers.
-;;
-        THUMB
-
-        PUBWEAK Reset_Handler
-        SECTION .text:CODE:REORDER(2)
-Reset_Handler
-        LDR     R0, =SystemInit
-        BLX     R0
-        LDR     R0, =__iar_program_start
-        BX      R0
-        
-        PUBWEAK NMI_Handler
-        SECTION .text:CODE:REORDER(1)
-NMI_Handler
-        B NMI_Handler
-
-        PUBWEAK HardFault_Handler
-        SECTION .text:CODE:REORDER(1)
-HardFault_Handler
-        B HardFault_Handler
-
-        PUBWEAK MemManage_Handler
-        SECTION .text:CODE:REORDER(1)
-MemManage_Handler
-        B MemManage_Handler
-
-        PUBWEAK BusFault_Handler
-        SECTION .text:CODE:REORDER(1)
-BusFault_Handler
-        B BusFault_Handler
-
-        PUBWEAK UsageFault_Handler
-        SECTION .text:CODE:REORDER(1)
-UsageFault_Handler
-        B UsageFault_Handler
-
-        PUBWEAK SVC_Handler
-        SECTION .text:CODE:REORDER(1)
-SVC_Handler
-        B SVC_Handler
-
-        PUBWEAK DebugMon_Handler
-        SECTION .text:CODE:REORDER(1)
-DebugMon_Handler
-        B DebugMon_Handler
-
-        PUBWEAK PendSV_Handler
-        SECTION .text:CODE:REORDER(1)
-PendSV_Handler
-        B PendSV_Handler
-
-        PUBWEAK SysTick_Handler
-        SECTION .text:CODE:REORDER(1)
-SysTick_Handler
-        B SysTick_Handler
-
-        PUBWEAK WWDG_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-WWDG_IRQHandler
-        B WWDG_IRQHandler
-
-        PUBWEAK PVD_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-PVD_IRQHandler
-        B PVD_IRQHandler
-
-        PUBWEAK TAMPER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TAMPER_IRQHandler
-        B TAMPER_IRQHandler
-
-        PUBWEAK RTC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTC_IRQHandler
-        B RTC_IRQHandler
-
-        PUBWEAK FLASH_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FLASH_IRQHandler
-        B FLASH_IRQHandler
-
-        PUBWEAK RCC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RCC_IRQHandler
-        B RCC_IRQHandler
-
-        PUBWEAK EXTI0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI0_IRQHandler
-        B EXTI0_IRQHandler
-
-        PUBWEAK EXTI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI1_IRQHandler
-        B EXTI1_IRQHandler
-
-        PUBWEAK EXTI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI2_IRQHandler
-        B EXTI2_IRQHandler
-
-        PUBWEAK EXTI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI3_IRQHandler
-        B EXTI3_IRQHandler
-
-        PUBWEAK EXTI4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI4_IRQHandler
-        B EXTI4_IRQHandler
-
-        PUBWEAK DMA1_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel1_IRQHandler
-        B DMA1_Channel1_IRQHandler
-
-        PUBWEAK DMA1_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel2_IRQHandler
-        B DMA1_Channel2_IRQHandler
-
-        PUBWEAK DMA1_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel3_IRQHandler
-        B DMA1_Channel3_IRQHandler
-
-        PUBWEAK DMA1_Channel4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel4_IRQHandler
-        B DMA1_Channel4_IRQHandler
-
-        PUBWEAK DMA1_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel5_IRQHandler
-        B DMA1_Channel5_IRQHandler
-
-        PUBWEAK DMA1_Channel6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel6_IRQHandler
-        B DMA1_Channel6_IRQHandler
-
-        PUBWEAK DMA1_Channel7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel7_IRQHandler
-        B DMA1_Channel7_IRQHandler
-
-        PUBWEAK ADC1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC1_IRQHandler
-        B ADC1_IRQHandler
-
-        PUBWEAK EXTI9_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI9_5_IRQHandler
-        B EXTI9_5_IRQHandler
-
-        PUBWEAK TIM1_BRK_TIM15_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_BRK_TIM15_IRQHandler
-        B TIM1_BRK_TIM15_IRQHandler
-
-        PUBWEAK TIM1_UP_TIM16_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_UP_TIM16_IRQHandler
-        B TIM1_UP_TIM16_IRQHandler
-
-        PUBWEAK TIM1_TRG_COM_TIM17_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_TRG_COM_TIM17_IRQHandler
-        B TIM1_TRG_COM_TIM17_IRQHandler
-
-        PUBWEAK TIM1_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_CC_IRQHandler
-        B TIM1_CC_IRQHandler
-
-        PUBWEAK TIM2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM2_IRQHandler
-        B TIM2_IRQHandler
-
-        PUBWEAK TIM3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM3_IRQHandler
-        B TIM3_IRQHandler
-
-        PUBWEAK TIM4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM4_IRQHandler
-        B TIM4_IRQHandler
-
-        PUBWEAK I2C1_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_EV_IRQHandler
-        B I2C1_EV_IRQHandler
-
-        PUBWEAK I2C1_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_ER_IRQHandler
-        B I2C1_ER_IRQHandler
-
-        PUBWEAK I2C2_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_EV_IRQHandler
-        B I2C2_EV_IRQHandler
-
-        PUBWEAK I2C2_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_ER_IRQHandler
-        B I2C2_ER_IRQHandler
-
-        PUBWEAK SPI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI1_IRQHandler
-        B SPI1_IRQHandler
-
-        PUBWEAK SPI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI2_IRQHandler
-        B SPI2_IRQHandler
-
-        PUBWEAK USART1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART1_IRQHandler
-        B USART1_IRQHandler
-
-        PUBWEAK USART2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART2_IRQHandler
-        B USART2_IRQHandler
-
-        PUBWEAK USART3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART3_IRQHandler
-        B USART3_IRQHandler
-
-        PUBWEAK EXTI15_10_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI15_10_IRQHandler
-        B EXTI15_10_IRQHandler
-
-        PUBWEAK RTCAlarm_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTCAlarm_IRQHandler
-        B RTCAlarm_IRQHandler
-
-        PUBWEAK CEC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CEC_IRQHandler
-        B CEC_IRQHandler
-
-        PUBWEAK TIM6_DAC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM6_DAC_IRQHandler
-        B TIM6_DAC_IRQHandler
-
-        PUBWEAK TIM7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM7_IRQHandler
-        B TIM7_IRQHandler                
-
-        END
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 496
Libraries/Startup/iar/startup_stm32f10x_xl.s

@@ -1,496 +0,0 @@
-;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
-;* File Name          : startup_stm32f10x_xl.s
-;* Author             : MCD Application Team
-;* Version            : V3.5.0
-;* Date               : 11-March-2011
-;* Description        : STM32F10x XL-Density Devices vector table for EWARM 
-;*                      toolchain.
-;*                      This module performs:
-;*                      - Set the initial SP
-;*                      - Configure the clock system and the external SRAM 
-;*                        mounted on STM3210E-EVAL board to be used as data 
-;*                        memory (optional, to be enabled by user)
-;*                      - Set the initial PC == __iar_program_start,
-;*                      - Set the vector table entries with the exceptions ISR address,
-;*                      After Reset the Cortex-M3 processor is in Thread mode,
-;*                      priority is Privileged, and the Stack is set to Main.
-;********************************************************************************
-;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
-;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
-;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
-;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
-;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-;*******************************************************************************
-;
-;
-; The modules in this file are included in the libraries, and may be replaced
-; by any user-defined modules that define the PUBLIC symbol _program_start or
-; a user defined start symbol.
-; To override the cstartup defined in the library, simply add your modified
-; version to the workbench project.
-;
-; The vector table is normally located at address 0.
-; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
-; The name "__vector_table" has special meaning for C-SPY:
-; it is where the SP start value is found, and the NVIC vector
-; table register (VTOR) is initialized to this address if != 0.
-;
-; Cortex-M version
-;     
-  
-    MODULE  ?cstartup
-        
-        ;; Forward declaration of sections.
-        SECTION CSTACK:DATA:NOROOT(3)
-
-        SECTION .intvec:CODE:NOROOT(2)
-
-        EXTERN  __iar_program_start
-        EXTERN  SystemInit        
-        PUBLIC  __vector_table
-
-        DATA
-       
-__vector_table
-        DCD     sfe(CSTACK)
-        DCD     Reset_Handler             ; Reset Handler
-        DCD     NMI_Handler               ; NMI Handler
-        DCD     HardFault_Handler         ; Hard Fault Handler
-        DCD     MemManage_Handler         ; MPU Fault Handler
-        DCD     BusFault_Handler          ; Bus Fault Handler
-        DCD     UsageFault_Handler        ; Usage Fault Handler
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     0                         ; Reserved
-        DCD     SVC_Handler               ; SVCall Handler
-        DCD     DebugMon_Handler          ; Debug Monitor Handler
-        DCD     0                         ; Reserved
-        DCD     PendSV_Handler            ; PendSV Handler
-        DCD     SysTick_Handler           ; SysTick Handler
-
-         ; External Interrupts
-        DCD     WWDG_IRQHandler               ; Window Watchdog
-        DCD     PVD_IRQHandler                ; PVD through EXTI Line detect
-        DCD     TAMPER_IRQHandler             ; Tamper
-        DCD     RTC_IRQHandler                ; RTC
-        DCD     FLASH_IRQHandler              ; Flash
-        DCD     RCC_IRQHandler                ; RCC
-        DCD     EXTI0_IRQHandler              ; EXTI Line 0
-        DCD     EXTI1_IRQHandler              ; EXTI Line 1
-        DCD     EXTI2_IRQHandler              ; EXTI Line 2
-        DCD     EXTI3_IRQHandler              ; EXTI Line 3
-        DCD     EXTI4_IRQHandler              ; EXTI Line 4
-        DCD     DMA1_Channel1_IRQHandler      ; DMA1 Channel 1
-        DCD     DMA1_Channel2_IRQHandler      ; DMA1 Channel 2
-        DCD     DMA1_Channel3_IRQHandler      ; DMA1 Channel 3
-        DCD     DMA1_Channel4_IRQHandler      ; DMA1 Channel 4
-        DCD     DMA1_Channel5_IRQHandler      ; DMA1 Channel 5
-        DCD     DMA1_Channel6_IRQHandler      ; DMA1 Channel 6
-        DCD     DMA1_Channel7_IRQHandler      ; DMA1 Channel 7
-        DCD     ADC1_2_IRQHandler             ; ADC1 & ADC2
-        DCD     USB_HP_CAN1_TX_IRQHandler     ; USB High Priority or CAN1 TX
-        DCD     USB_LP_CAN1_RX0_IRQHandler    ; USB Low  Priority or CAN1 RX0
-        DCD     CAN1_RX1_IRQHandler           ; CAN1 RX1
-        DCD     CAN1_SCE_IRQHandler           ; CAN1 SCE
-        DCD     EXTI9_5_IRQHandler            ; EXTI Line 9..5
-        DCD     TIM1_BRK_TIM9_IRQHandler      ; TIM1 Break and TIM9
-        DCD     TIM1_UP_TIM10_IRQHandler      ; TIM1 Update and TIM10
-        DCD     TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11
-        DCD     TIM1_CC_IRQHandler            ; TIM1 Capture Compare
-        DCD     TIM2_IRQHandler               ; TIM2
-        DCD     TIM3_IRQHandler               ; TIM3
-        DCD     TIM4_IRQHandler               ; TIM4
-        DCD     I2C1_EV_IRQHandler            ; I2C1 Event
-        DCD     I2C1_ER_IRQHandler            ; I2C1 Error
-        DCD     I2C2_EV_IRQHandler            ; I2C2 Event
-        DCD     I2C2_ER_IRQHandler            ; I2C2 Error
-        DCD     SPI1_IRQHandler               ; SPI1
-        DCD     SPI2_IRQHandler               ; SPI2
-        DCD     USART1_IRQHandler             ; USART1
-        DCD     USART2_IRQHandler             ; USART2
-        DCD     USART3_IRQHandler             ; USART3
-        DCD     EXTI15_10_IRQHandler          ; EXTI Line 15..10
-        DCD     RTCAlarm_IRQHandler           ; RTC Alarm through EXTI Line
-        DCD     USBWakeUp_IRQHandler          ; USB Wakeup from suspend
-        DCD     TIM8_BRK_TIM12_IRQHandler     ; TIM8 Break and TIM12
-        DCD     TIM8_UP_TIM13_IRQHandler      ; TIM8 Update and TIM13
-        DCD     TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14
-        DCD     TIM8_CC_IRQHandler            ; TIM8 Capture Compare
-        DCD     ADC3_IRQHandler               ; ADC3
-        DCD     FSMC_IRQHandler               ; FSMC
-        DCD     SDIO_IRQHandler               ; SDIO
-        DCD     TIM5_IRQHandler               ; TIM5
-        DCD     SPI3_IRQHandler               ; SPI3
-        DCD     UART4_IRQHandler              ; UART4
-        DCD     UART5_IRQHandler              ; UART5
-        DCD     TIM6_IRQHandler               ; TIM6
-        DCD     TIM7_IRQHandler               ; TIM7
-        DCD     DMA2_Channel1_IRQHandler      ; DMA2 Channel1
-        DCD     DMA2_Channel2_IRQHandler      ; DMA2 Channel2
-        DCD     DMA2_Channel3_IRQHandler      ; DMA2 Channel3
-        DCD     DMA2_Channel4_5_IRQHandler    ; DMA2 Channel4 & Channel5
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Default interrupt handlers.
-;;
-        THUMB
-
-        PUBWEAK Reset_Handler
-        SECTION .text:CODE:REORDER(2)
-Reset_Handler
-        LDR     R0, =SystemInit
-        BLX     R0
-        LDR     R0, =__iar_program_start
-        BX      R0
-               
-        PUBWEAK NMI_Handler
-        SECTION .text:CODE:REORDER(1)
-NMI_Handler
-        B NMI_Handler
-
-        PUBWEAK HardFault_Handler
-        SECTION .text:CODE:REORDER(1)
-HardFault_Handler
-        B HardFault_Handler
-
-        PUBWEAK MemManage_Handler
-        SECTION .text:CODE:REORDER(1)
-MemManage_Handler
-        B MemManage_Handler
-
-        PUBWEAK BusFault_Handler
-        SECTION .text:CODE:REORDER(1)
-BusFault_Handler
-        B BusFault_Handler
-
-        PUBWEAK UsageFault_Handler
-        SECTION .text:CODE:REORDER(1)
-UsageFault_Handler
-        B UsageFault_Handler
-
-        PUBWEAK SVC_Handler
-        SECTION .text:CODE:REORDER(1)
-SVC_Handler
-        B SVC_Handler
-
-        PUBWEAK DebugMon_Handler
-        SECTION .text:CODE:REORDER(1)
-DebugMon_Handler
-        B DebugMon_Handler
-
-        PUBWEAK PendSV_Handler
-        SECTION .text:CODE:REORDER(1)
-PendSV_Handler
-        B PendSV_Handler
-
-        PUBWEAK SysTick_Handler
-        SECTION .text:CODE:REORDER(1)
-SysTick_Handler
-        B SysTick_Handler
-
-        PUBWEAK WWDG_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-WWDG_IRQHandler
-        B WWDG_IRQHandler
-
-        PUBWEAK PVD_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-PVD_IRQHandler
-        B PVD_IRQHandler
-
-        PUBWEAK TAMPER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TAMPER_IRQHandler
-        B TAMPER_IRQHandler
-
-        PUBWEAK RTC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTC_IRQHandler
-        B RTC_IRQHandler
-
-        PUBWEAK FLASH_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FLASH_IRQHandler
-        B FLASH_IRQHandler
-
-        PUBWEAK RCC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RCC_IRQHandler
-        B RCC_IRQHandler
-
-        PUBWEAK EXTI0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI0_IRQHandler
-        B EXTI0_IRQHandler
-
-        PUBWEAK EXTI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI1_IRQHandler
-        B EXTI1_IRQHandler
-
-        PUBWEAK EXTI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI2_IRQHandler
-        B EXTI2_IRQHandler
-
-        PUBWEAK EXTI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI3_IRQHandler
-        B EXTI3_IRQHandler
-
-        PUBWEAK EXTI4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI4_IRQHandler
-        B EXTI4_IRQHandler
-
-        PUBWEAK DMA1_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel1_IRQHandler
-        B DMA1_Channel1_IRQHandler
-
-        PUBWEAK DMA1_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel2_IRQHandler
-        B DMA1_Channel2_IRQHandler
-
-        PUBWEAK DMA1_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel3_IRQHandler
-        B DMA1_Channel3_IRQHandler
-
-        PUBWEAK DMA1_Channel4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel4_IRQHandler
-        B DMA1_Channel4_IRQHandler
-
-        PUBWEAK DMA1_Channel5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel5_IRQHandler
-        B DMA1_Channel5_IRQHandler
-
-        PUBWEAK DMA1_Channel6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel6_IRQHandler
-        B DMA1_Channel6_IRQHandler
-
-        PUBWEAK DMA1_Channel7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA1_Channel7_IRQHandler
-        B DMA1_Channel7_IRQHandler
-
-        PUBWEAK ADC1_2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC1_2_IRQHandler
-        B ADC1_2_IRQHandler
-
-        PUBWEAK USB_HP_CAN1_TX_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USB_HP_CAN1_TX_IRQHandler
-        B USB_HP_CAN1_TX_IRQHandler
-
-        PUBWEAK USB_LP_CAN1_RX0_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USB_LP_CAN1_RX0_IRQHandler
-        B USB_LP_CAN1_RX0_IRQHandler
-
-        PUBWEAK CAN1_RX1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_RX1_IRQHandler
-        B CAN1_RX1_IRQHandler
-
-        PUBWEAK CAN1_SCE_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-CAN1_SCE_IRQHandler
-        B CAN1_SCE_IRQHandler
-
-        PUBWEAK EXTI9_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI9_5_IRQHandler
-        B EXTI9_5_IRQHandler
-
-        PUBWEAK TIM1_BRK_TIM9_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_BRK_TIM9_IRQHandler
-        B TIM1_BRK_TIM9_IRQHandler
-
-        PUBWEAK TIM1_UP_TIM10_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_UP_TIM10_IRQHandler
-        B TIM1_UP_TIM10_IRQHandler
-
-        PUBWEAK TIM1_TRG_COM_TIM11_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_TRG_COM_TIM11_IRQHandler
-        B TIM1_TRG_COM_TIM11_IRQHandler
-
-        PUBWEAK TIM1_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM1_CC_IRQHandler
-        B TIM1_CC_IRQHandler
-
-        PUBWEAK TIM2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM2_IRQHandler
-        B TIM2_IRQHandler
-
-        PUBWEAK TIM3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM3_IRQHandler
-        B TIM3_IRQHandler
-
-        PUBWEAK TIM4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM4_IRQHandler
-        B TIM4_IRQHandler
-
-        PUBWEAK I2C1_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_EV_IRQHandler
-        B I2C1_EV_IRQHandler
-
-        PUBWEAK I2C1_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C1_ER_IRQHandler
-        B I2C1_ER_IRQHandler
-
-        PUBWEAK I2C2_EV_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_EV_IRQHandler
-        B I2C2_EV_IRQHandler
-
-        PUBWEAK I2C2_ER_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-I2C2_ER_IRQHandler
-        B I2C2_ER_IRQHandler
-
-        PUBWEAK SPI1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI1_IRQHandler
-        B SPI1_IRQHandler
-
-        PUBWEAK SPI2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI2_IRQHandler
-        B SPI2_IRQHandler
-
-        PUBWEAK USART1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART1_IRQHandler
-        B USART1_IRQHandler
-
-        PUBWEAK USART2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART2_IRQHandler
-        B USART2_IRQHandler
-
-        PUBWEAK USART3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USART3_IRQHandler
-        B USART3_IRQHandler
-
-        PUBWEAK EXTI15_10_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-EXTI15_10_IRQHandler
-        B EXTI15_10_IRQHandler
-
-        PUBWEAK RTCAlarm_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-RTCAlarm_IRQHandler
-        B RTCAlarm_IRQHandler
-
-        PUBWEAK USBWakeUp_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-USBWakeUp_IRQHandler
-        B USBWakeUp_IRQHandler
-
-        PUBWEAK TIM8_BRK_TIM12_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM8_BRK_TIM12_IRQHandler
-        B TIM8_BRK_TIM12_IRQHandler
-
-        PUBWEAK TIM8_UP_TIM13_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM8_UP_TIM13_IRQHandler
-        B TIM8_UP_TIM13_IRQHandler
-
-        PUBWEAK TIM8_TRG_COM_TIM14_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM8_TRG_COM_TIM14_IRQHandler
-        B TIM8_TRG_COM_TIM14_IRQHandler
-
-        PUBWEAK TIM8_CC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM8_CC_IRQHandler
-        B TIM8_CC_IRQHandler
-
-        PUBWEAK ADC3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-ADC3_IRQHandler
-        B ADC3_IRQHandler
-
-        PUBWEAK FSMC_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-FSMC_IRQHandler
-        B FSMC_IRQHandler
-
-        PUBWEAK SDIO_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SDIO_IRQHandler
-        B SDIO_IRQHandler
-
-        PUBWEAK TIM5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM5_IRQHandler
-        B TIM5_IRQHandler
-
-        PUBWEAK SPI3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-SPI3_IRQHandler
-        B SPI3_IRQHandler
-
-        PUBWEAK UART4_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-UART4_IRQHandler
-        B UART4_IRQHandler
-
-        PUBWEAK UART5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-UART5_IRQHandler
-        B UART5_IRQHandler
-
-        PUBWEAK TIM6_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM6_IRQHandler
-        B TIM6_IRQHandler
-
-        PUBWEAK TIM7_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-TIM7_IRQHandler
-        B TIM7_IRQHandler
-
-        PUBWEAK DMA2_Channel1_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel1_IRQHandler
-        B DMA2_Channel1_IRQHandler
-
-        PUBWEAK DMA2_Channel2_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel2_IRQHandler
-        B DMA2_Channel2_IRQHandler
-
-        PUBWEAK DMA2_Channel3_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel3_IRQHandler
-        B DMA2_Channel3_IRQHandler
-
-        PUBWEAK DMA2_Channel4_5_IRQHandler
-        SECTION .text:CODE:REORDER(1)
-DMA2_Channel4_5_IRQHandler
-        B DMA2_Channel4_5_IRQHandler
-        
-        
-        END
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 0
Libraries/src/misc.c → Library/misc.c


+ 0 - 0
Libraries/inc/misc.h → Library/misc.h


+ 0 - 0
Libraries/src/stm32f10x_adc.c → Library/stm32f10x_adc.c


+ 0 - 0
Libraries/inc/stm32f10x_adc.h → Library/stm32f10x_adc.h


+ 0 - 0
Libraries/src/stm32f10x_bkp.c → Library/stm32f10x_bkp.c


+ 0 - 0
Libraries/inc/stm32f10x_bkp.h → Library/stm32f10x_bkp.h


+ 0 - 0
Libraries/src/stm32f10x_can.c → Library/stm32f10x_can.c


+ 0 - 0
Libraries/inc/stm32f10x_can.h → Library/stm32f10x_can.h


+ 0 - 0
Libraries/src/stm32f10x_cec.c → Library/stm32f10x_cec.c


+ 0 - 0
Libraries/inc/stm32f10x_cec.h → Library/stm32f10x_cec.h


+ 0 - 0
Libraries/src/stm32f10x_crc.c → Library/stm32f10x_crc.c


+ 0 - 0
Libraries/inc/stm32f10x_crc.h → Library/stm32f10x_crc.h


+ 0 - 0
Libraries/src/stm32f10x_dac.c → Library/stm32f10x_dac.c


+ 0 - 0
Libraries/inc/stm32f10x_dac.h → Library/stm32f10x_dac.h


+ 0 - 0
Libraries/src/stm32f10x_dbgmcu.c → Library/stm32f10x_dbgmcu.c


+ 0 - 0
Libraries/inc/stm32f10x_dbgmcu.h → Library/stm32f10x_dbgmcu.h


+ 0 - 0
Libraries/src/stm32f10x_dma.c → Library/stm32f10x_dma.c


+ 0 - 0
Libraries/inc/stm32f10x_dma.h → Library/stm32f10x_dma.h


+ 0 - 0
Libraries/src/stm32f10x_exti.c → Library/stm32f10x_exti.c


+ 0 - 0
Libraries/inc/stm32f10x_exti.h → Library/stm32f10x_exti.h


+ 0 - 0
Libraries/src/stm32f10x_flash.c → Library/stm32f10x_flash.c


+ 0 - 0
Libraries/inc/stm32f10x_flash.h → Library/stm32f10x_flash.h


+ 0 - 0
Libraries/src/stm32f10x_fsmc.c → Library/stm32f10x_fsmc.c


+ 0 - 0
Libraries/inc/stm32f10x_fsmc.h → Library/stm32f10x_fsmc.h


+ 0 - 0
Libraries/src/stm32f10x_gpio.c → Library/stm32f10x_gpio.c


+ 0 - 0
Libraries/inc/stm32f10x_gpio.h → Library/stm32f10x_gpio.h


+ 0 - 0
Libraries/src/stm32f10x_i2c.c → Library/stm32f10x_i2c.c


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio