<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
+<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="reserved-for-future-use"/> "/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
</launchConfiguration>
--- /dev/null
+/*
+ * System.c
+ *
+ * Created on: Jun 1, 2019
+ * Author: ace
+ */
+
+
+#include "stm32f1xx_hal.h"
+
+void SystemPreInit() {
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+}
+
+
+#define LED_Pin GPIO_PIN_6
+#define LED_GPIO_Port GPIOB
+
+void SystemSetup() {
+ GPIO_InitTypeDef GPIO_InitStruct;
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
+ GPIO_InitStruct.Pin = LED_Pin;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
+
+ HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct);
+}
+
+void SystemLoop() {
+ HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
+ HAL_Delay(1000);
+}
\r
/* Private user code ---------------------------------------------------------*/\r
/* USER CODE BEGIN 0 */\r
-\r
+void SystemPreInit();\r
+void SystemSetup();\r
+void SystemLoop();\r
/* USER CODE END 0 */\r
\r
/**\r
SystemClock_Config();\r
\r
/* USER CODE BEGIN SysInit */\r
-\r
+ SystemPreInit();\r
/* USER CODE END SysInit */\r
\r
/* Initialize all configured peripherals */\r
MX_GPIO_Init();\r
/* USER CODE BEGIN 2 */\r
-\r
+ SystemSetup();\r
/* USER CODE END 2 */\r
\r
/* Infinite loop */\r
/* USER CODE BEGIN WHILE */\r
while (1)\r
{\r
+ SystemLoop();\r
/* USER CODE END WHILE */\r
\r
/* USER CODE BEGIN 3 */\r