accidentally removed p_uart_init() via code generation... added it back

stable
Penguin 3 years ago
parent 242068a52d
commit feb61e56a8

@ -0,0 +1,4 @@
q
q
q
q

@ -22,7 +22,9 @@
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "putil.h"
#include "motor_controller.h"
#include "stm32l4xx_hal_uart.h"
#include <stdio.h>
/* USER CODE END Includes */
@ -95,6 +97,7 @@ int main(void)
MX_TIM2_Init();
MX_USART2_UART_Init();
/* USER CODE BEGIN 2 */
p_uart_init(&huart2);
uint8_t buff[256] = {'\0'};
sprintf(buff, "Hello Worldblahblahfjdslkfjlasdfj\r\n");
HAL_UART_Transmit(&huart2, "...\r\n", sizeof("...\r\n"), 100);
@ -109,6 +112,8 @@ int main(void)
HAL_GPIO_WritePin(m1_dir_GPIO_Port, m1_dir_Pin, 1);
HAL_GPIO_WritePin(m2_dir_GPIO_Port, m2_dir_Pin, 1);
PDEBUG("ablahablah\n");
motor_controller_init();
/* USER CODE END 2 */
/* Infinite loop */

@ -59,7 +59,8 @@ Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c \
Core/Src/system_stm32l4xx.c \
shared/putil.c
shared/util/putil.c \
shared/devices/motor_controller.c
# ASM sources
ASM_SOURCES = \
@ -121,7 +122,10 @@ C_INCLUDES = \
-IDrivers/STM32L4xx_HAL_Driver/Inc/Legacy \
-IDrivers/CMSIS/Device/ST/STM32L4xx/Include \
-IDrivers/CMSIS/Include \
-Ishared
-Ishared \
-Ishared/devices \
-Ishared/drivers \
-Ishared/util
# compile gcc flags
@ -130,7 +134,7 @@ ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffuncti
CFLAGS += $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2 -DDEBUG
CFLAGS += -g -gdwarf-2 -D_DEBUG
endif

351
\

@ -1,351 +0,0 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "putil.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
TIM_HandleTypeDef htim2;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_TIM2_Init(void);
static void MX_USART2_UART_Init(void);
/* USER CODE BEGIN PFP */
void setPWM(TIM_HandleTypeDef *timer, uint32_t channel, uint8_t dc_percent);
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_TIM2_Init();
MX_USART2_UART_Init();
p_uart_init(huart2);
/* USER CODE BEGIN 2 */
uint8_t buff[256] = {'\0'};
sprintf(buff, "Hello Worldblahblahfjdslkfjlasdfj\r\n");
HAL_UART_Transmit(&huart2, "...\r\n", sizeof("...\r\n"), 100);
HAL_UART_Transmit(&huart2, buff, sizeof(buff), 100);
PDEBUG("hello darkness my old friend\n");
// HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_2);
// HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_4);
setPWM(&htim2, TIM_CHANNEL_2, 95);
setPWM(&htim2, TIM_CHANNEL_4, 15);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK)
{
Error_Handler();
}
/** Configure LSE Drive Capability
*/
HAL_PWR_EnableBkUpAccess();
__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW);
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE | RCC_OSCILLATORTYPE_MSI;
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
RCC_OscInitStruct.MSIState = RCC_MSI_ON;
RCC_OscInitStruct.MSICalibrationValue = 0;
RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI;
RCC_OscInitStruct.PLL.PLLM = 1;
RCC_OscInitStruct.PLL.PLLN = 16;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK)
{
Error_Handler();
}
/** Enable MSI Auto calibration
*/
HAL_RCCEx_EnableMSIPLLMode();
}
/**
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM2_Init(void)
{
/* USER CODE BEGIN TIM2_Init 0 */
/* USER CODE END TIM2_Init 0 */
TIM_MasterConfigTypeDef sMasterConfig = {0};
TIM_OC_InitTypeDef sConfigOC = {0};
/* USER CODE BEGIN TIM2_Init 1 */
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
htim2.Init.Prescaler = 127;
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 499;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_PWM_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 250;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
{
Error_Handler();
}
sConfigOC.Pulse = 125;
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM2_Init 2 */
/* USER CODE END TIM2_Init 2 */
HAL_TIM_MspPostInit(&htim2);
}
/**
* @brief USART2 Initialization Function
* @param None
* @retval None
*/
static void MX_USART2_UART_Init(void)
{
/* USER CODE BEGIN USART2_Init 0 */
/* USER CODE END USART2_Init 0 */
/* USER CODE BEGIN USART2_Init 1 */
/* USER CODE END USART2_Init 1 */
huart2.Instance = USART2;
huart2.Init.BaudRate = 115200;
huart2.Init.WordLength = UART_WORDLENGTH_8B;
huart2.Init.StopBits = UART_STOPBITS_1;
huart2.Init.Parity = UART_PARITY_NONE;
huart2.Init.Mode = UART_MODE_TX_RX;
huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart2.Init.OverSampling = UART_OVERSAMPLING_16;
huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart2) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART2_Init 2 */
/* USER CODE END USART2_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8 | GPIO_PIN_9, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(LD3_GPIO_Port, LD3_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : PA8 PA9 */
GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pin : LD3_Pin */
GPIO_InitStruct.Pin = LD3_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(LD3_GPIO_Port, &GPIO_InitStruct);
}
/* USER CODE BEGIN 4 */
void setPWM(TIM_HandleTypeDef *timer, uint32_t channel, uint8_t dc_percent)
{
HAL_TIM_PWM_Stop(timer, channel);
// add new period if we need to, but we don't need to here
TIM_OC_InitTypeDef sConfigOC = {0};
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
sConfigOC.Pulse = (uint32_t)((dc_percent * timer->Init.Period) / 100.0f);
HAL_TIM_PWM_ConfigChannel(timer, &sConfigOC, channel);
HAL_TIM_PWM_Start(timer, channel);
}
/* USER CODE END 4 */
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */

@ -15,53 +15,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_dma_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_dma_ex.lst",
"-o",
"build/stm32l4xx_hal_dma_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c"
},
{
"arguments": [
"arm-none-eabi-gcc",
"-c",
"-mcpu=cortex-m4",
"-mthumb",
"-mfpu=fpv4-sp-d16",
"-mfloat-abi=hard",
"-DUSE_HAL_DRIVER",
"-DSTM32L432xx",
"-ICore/Inc",
"-IDrivers/STM32L4xx_HAL_Driver/Inc",
"-IDrivers/STM32L4xx_HAL_Driver/Inc/Legacy",
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_rcc.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_rcc.lst",
"-MFbuild/stm32l4xx_hal_dma.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_dma.lst",
"-o",
"build/stm32l4xx_hal_rcc.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c"
"build/stm32l4xx_hal_dma.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c"
},
{
"arguments": [
@ -79,21 +47,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_tim.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_tim.lst",
"-MFbuild/main.d",
"-Wa,-a,-ad,-alms=build/main.lst",
"-o",
"build/stm32l4xx_hal_tim.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c"
"build/main.o",
"Core/Src/main.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c"
"file": "Core/Src/main.c"
},
{
"arguments": [
@ -111,13 +79,13 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_uart_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_uart_ex.lst",
"-o",
@ -143,21 +111,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_rcc_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_rcc_ex.lst",
"-MFbuild/stm32l4xx_hal_pwr.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_pwr.lst",
"-o",
"build/stm32l4xx_hal_rcc_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c"
"build/stm32l4xx_hal_pwr.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c"
},
{
"arguments": [
@ -175,21 +143,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/putil.d",
"-Wa,-a,-ad,-alms=build/putil.lst",
"-MFbuild/stm32l4xx_hal_tim_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_tim_ex.lst",
"-o",
"build/putil.o",
"shared/putil.c"
"build/stm32l4xx_hal_tim_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "shared/putil.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c"
},
{
"arguments": [
@ -207,21 +175,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_dma.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_dma.lst",
"-MFbuild/stm32l4xx_hal_flash_ramfunc.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_flash_ramfunc.lst",
"-o",
"build/stm32l4xx_hal_dma.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c"
"build/stm32l4xx_hal_flash_ramfunc.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c"
},
{
"arguments": [
@ -239,21 +207,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_pwr.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_pwr.lst",
"-MFbuild/stm32l4xx_hal_tim.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_tim.lst",
"-o",
"build/stm32l4xx_hal_pwr.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c"
"build/stm32l4xx_hal_tim.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c"
},
{
"arguments": [
@ -271,13 +239,13 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/system_stm32l4xx.d",
"-Wa,-a,-ad,-alms=build/system_stm32l4xx.lst",
"-o",
@ -303,54 +271,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_i2c.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_i2c.lst",
"-o",
"build/stm32l4xx_hal_i2c.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c"
},
{
"arguments": [
"arm-none-eabi-gcc",
"-c",
"-x",
"assembler-with-cpp",
"-mcpu=cortex-m4",
"-mthumb",
"-mfpu=fpv4-sp-d16",
"-mfloat-abi=hard",
"-DUSE_HAL_DRIVER",
"-DSTM32L432xx",
"-ICore/Inc",
"-IDrivers/STM32L4xx_HAL_Driver/Inc",
"-IDrivers/STM32L4xx_HAL_Driver/Inc/Legacy",
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/startup_stm32l432xx.d",
"-MFbuild/stm32l4xx_hal_exti.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_exti.lst",
"-o",
"build/startup_stm32l432xx.o",
"startup_stm32l432xx.s"
"build/stm32l4xx_hal_exti.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "startup_stm32l432xx.s"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c"
},
{
"arguments": [
@ -368,21 +303,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/main.d",
"-Wa,-a,-ad,-alms=build/main.lst",
"-MFbuild/stm32l4xx_hal_dma_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_dma_ex.lst",
"-o",
"build/main.o",
"Core/Src/main.c"
"build/stm32l4xx_hal_dma_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Core/Src/main.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c"
},
{
"arguments": [
@ -400,21 +335,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_it.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_it.lst",
"-MFbuild/stm32l4xx_hal_i2c.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_i2c.lst",
"-o",
"build/stm32l4xx_it.o",
"Core/Src/stm32l4xx_it.c"
"build/stm32l4xx_hal_i2c.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Core/Src/stm32l4xx_it.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c"
},
{
"arguments": [
@ -432,21 +367,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_msp.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_msp.lst",
"-MFbuild/stm32l4xx_hal.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal.lst",
"-o",
"build/stm32l4xx_hal_msp.o",
"Core/Src/stm32l4xx_hal_msp.c"
"build/stm32l4xx_hal.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Core/Src/stm32l4xx_hal_msp.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c"
},
{
"arguments": [
@ -464,21 +399,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_flash_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_flash_ex.lst",
"-MFbuild/stm32l4xx_hal_i2c_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_i2c_ex.lst",
"-o",
"build/stm32l4xx_hal_flash_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c"
"build/stm32l4xx_hal_i2c_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c"
},
{
"arguments": [
@ -496,21 +431,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_gpio.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_gpio.lst",
"-MFbuild/stm32l4xx_hal_msp.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_msp.lst",
"-o",
"build/stm32l4xx_hal_gpio.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c"
"build/stm32l4xx_hal_msp.o",
"Core/Src/stm32l4xx_hal_msp.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c"
"file": "Core/Src/stm32l4xx_hal_msp.c"
},
{
"arguments": [
@ -528,21 +463,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_i2c_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_i2c_ex.lst",
"-MFbuild/stm32l4xx_hal_flash.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_flash.lst",
"-o",
"build/stm32l4xx_hal_i2c_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c"
"build/stm32l4xx_hal_flash.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c"
},
{
"arguments": [
@ -560,21 +495,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_tim_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_tim_ex.lst",
"-MFbuild/stm32l4xx_hal_rcc.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_rcc.lst",
"-o",
"build/stm32l4xx_hal_tim_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c"
"build/stm32l4xx_hal_rcc.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c"
},
{
"arguments": [
@ -592,21 +527,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_flash.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_flash.lst",
"-MFbuild/stm32l4xx_hal_flash_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_flash_ex.lst",
"-o",
"build/stm32l4xx_hal_flash.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c"
"build/stm32l4xx_hal_flash_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c"
},
{
"arguments": [
@ -624,21 +559,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_flash_ramfunc.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_flash_ramfunc.lst",
"-MFbuild/stm32l4xx_hal_pwr_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_pwr_ex.lst",
"-o",
"build/stm32l4xx_hal_flash_ramfunc.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c"
"build/stm32l4xx_hal_pwr_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c"
},
{
"arguments": [
@ -656,21 +591,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_uart.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_uart.lst",
"-MFbuild/stm32l4xx_hal_cortex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_cortex.lst",
"-o",
"build/stm32l4xx_hal_uart.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c"
"build/stm32l4xx_hal_cortex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c"
},
{
"arguments": [
@ -688,21 +623,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_cortex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_cortex.lst",
"-MFbuild/stm32l4xx_hal_rcc_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_rcc_ex.lst",
"-o",
"build/stm32l4xx_hal_cortex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c"
"build/stm32l4xx_hal_rcc_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c"
},
{
"arguments": [
@ -720,21 +655,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_pwr_ex.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_pwr_ex.lst",
"-MFbuild/stm32l4xx_hal_gpio.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_gpio.lst",
"-o",
"build/stm32l4xx_hal_pwr_ex.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c"
"build/stm32l4xx_hal_gpio.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c"
},
{
"arguments": [
@ -752,21 +687,21 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal.lst",
"-MFbuild/stm32l4xx_hal_uart.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_uart.lst",
"-o",
"build/stm32l4xx_hal.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c"
"build/stm32l4xx_hal_uart.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c"
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c"
},
{
"arguments": [
@ -784,20 +719,20 @@
"-IDrivers/CMSIS/Device/ST/STM32L4xx/Include",
"-IDrivers/CMSIS/Include",
"-Ishared",
"-Ishared/devices",
"-Ishared/drivers",
"-Ishared/util",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-g",
"-gdwarf-2",
"-DDEBUG",
"-MFbuild/stm32l4xx_hal_exti.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_hal_exti.lst",
"-MFbuild/stm32l4xx_it.d",
"-Wa,-a,-ad,-alms=build/stm32l4xx_it.lst",
"-o",
"build/stm32l4xx_hal_exti.o",
"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c"
"build/stm32l4xx_it.o",
"Core/Src/stm32l4xx_it.c"
],
"directory": "/storage/Shared/Projects/stm32_projects/motor_controller",
"file": "Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c"
"file": "Core/Src/stm32l4xx_it.c"
}
]

@ -445,3 +445,379 @@ A debugging session is active.
Quit anyway? (y or n) [answered Y; input not from terminal]
[Inferior 1 (Remote target) detached]
0x08002d24 in ?? ()
### Assembly ########################################################################################################
0x08002d24 ? movs r0, r0
0x08002d26 ? movs r0, r0
0x08002d28 ? movs r0, r0
0x08002d2a ? movs r0, r0
0x08002d2c ? movs r0, r0
0x08002d2e ? movs r0, r0
0x08002d30 ? movs r0, r0
0x08002d32 ? movs r0, r0
0x08002d34 ? movs r0, r0
0x08002d36 ? movs r0, r0
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08002d24 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x20010000 msp 0x20010000 control 0x00
r4 0x00000000 r9 0x00000000 lr 0xffffffff psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x08002d24
[1] from 0xfffffffe
### Threads #########################################################################################################
[1] id 0 from 0x08002d24
### Variables #######################################################################################################
#####################################################################################################################
generic_push.gdb:7: Error in sourced command file:
Error erasing flash with vFlashErase packet
Detaching from program: /storage/Shared/Projects/stm32_projects/motor_controller/build/motor_controller.hex, Remote target
[Inferior 1 (Remote target) detached]
0x08002d24 in ?? ()
### Assembly ########################################################################################################
0x08002d24 ? movs r0, r0
0x08002d26 ? movs r0, r0
0x08002d28 ? movs r0, r0
0x08002d2a ? movs r0, r0
0x08002d2c ? movs r0, r0
0x08002d2e ? movs r0, r0
0x08002d30 ? movs r0, r0
0x08002d32 ? movs r0, r0
0x08002d34 ? movs r0, r0
0x08002d36 ? movs r0, r0
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08002d24 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x20010000 msp 0x20010000 control 0x00
r4 0x00000000 r9 0x00000000 lr 0xffffffff psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x08002d24
[1] from 0xfffffffe
### Threads #########################################################################################################
[1] id 0 from 0x08002d24
### Variables #######################################################################################################
#####################################################################################################################
generic_push.gdb:7: Error in sourced command file:
Error erasing flash with vFlashErase packet
Detaching from program: /storage/Shared/Projects/stm32_projects/motor_controller/build/motor_controller.hex, Remote target
[Inferior 1 (Remote target) detached]
0x08002d24 in ?? ()
### Assembly ########################################################################################################
0x08002d24 ? movs r0, r0
0x08002d26 ? movs r0, r0
0x08002d28 ? movs r0, r0
0x08002d2a ? movs r0, r0
0x08002d2c ? movs r0, r0
0x08002d2e ? movs r0, r0
0x08002d30 ? movs r0, r0
0x08002d32 ? movs r0, r0
0x08002d34 ? movs r0, r0
0x08002d36 ? movs r0, r0
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08002d24 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x20010000 msp 0x20010000 control 0x00
r4 0x00000000 r9 0x00000000 lr 0xffffffff psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x08002d24
[1] from 0xfffffffe
### Threads #########################################################################################################
[1] id 0 from 0x08002d24
### Variables #######################################################################################################
#####################################################################################################################
generic_push.gdb:7: Error in sourced command file:
Error erasing flash with vFlashErase packet
Detaching from program: /storage/Shared/Projects/stm32_projects/motor_controller/build/motor_controller.hex, Remote target
[Inferior 1 (Remote target) detached]
0x08002d24 in ?? ()
### Assembly ########################################################################################################
0x08002d24 ? movs r0, r0
0x08002d26 ? movs r0, r0
0x08002d28 ? movs r0, r0
0x08002d2a ? movs r0, r0
0x08002d2c ? movs r0, r0
0x08002d2e ? movs r0, r0
0x08002d30 ? movs r0, r0
0x08002d32 ? movs r0, r0
0x08002d34 ? movs r0, r0
0x08002d36 ? movs r0, r0
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08002d24 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x20010000 msp 0x20010000 control 0x00
r4 0x00000000 r9 0x00000000 lr 0xffffffff psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x08002d24
[1] from 0xfffffffe
### Threads #########################################################################################################
[1] id 0 from 0x08002d24
### Variables #######################################################################################################
#####################################################################################################################
generic_push.gdb:7: Error in sourced command file:
Error erasing flash with vFlashErase packet
Detaching from program: /storage/Shared/Projects/stm32_projects/motor_controller/build/motor_controller.hex, Remote target
[Inferior 1 (Remote target) detached]
0x080008c6 in ?? ()
### Assembly ########################################################################################################
0x080008c6 ? b.n 0x80008c6
0x080008c8 ? subs r0, #152 ; 0x98
0x080008ca ? lsrs r0, r0, #32
0x080008cc ? lsls r0, r3, #3
0x080008ce ? movs r0, #0
0x080008d0 ? subs r0, #188 ; 0xbc
0x080008d2 ? lsrs r0, r0, #32
0x080008d4 ? subs r0, #196 ; 0xc4
0x080008d6 ? lsrs r0, r0, #32
0x080008d8 ? lsls r4, r1, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x48000000 r5 0x00000000 r10 0x00000000 pc 0x080008c6 primask 0x00
r1 0x00000020 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00
r2 0x00000001 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x40000000 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04
r4 0x2000008c r9 0x00000000 lr 0x080008c7 psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x080008c6
### Threads #########################################################################################################
[1] id 0 from 0x080008c6
### Variables #######################################################################################################
#####################################################################################################################
Loading section .sec1, size 0x3a38 lma 0x8000000
Start address 0x08002d38, load size 14904
Transfer rate: 18 KB/sec, 14904 bytes/write.
Unable to match requested speed 500 kHz, using 480 kHz
Unable to match requested speed 500 kHz, using 480 kHz
A debugging session is active.
Inferior 1 [Remote target] will be detached.
Quit anyway? (y or n) [answered Y; input not from terminal]
[Inferior 1 (Remote target) detached]
0x080008d0 in ?? ()
### Assembly ########################################################################################################
0x080008d0 ? b.n 0x80008d0
0x080008d2 ? nop
0x080008d4 ? subs r0, #168 ; 0xa8
0x080008d6 ? lsrs r0, r0, #32
0x080008d8 ? lsls r0, r3, #3
0x080008da ? movs r0, #0
0x080008dc ? subs r0, #204 ; 0xcc
0x080008de ? lsrs r0, r0, #32
0x080008e0 ? subs r0, #212 ; 0xd4
0x080008e2 ? lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080008d0 primask 0x00
r1 0x2000fdd8 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x0000000b r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x08002d89 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04
r4 0x2000008c r9 0x00000000 lr 0x080008d1 psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x080008d0
### Threads #########################################################################################################
[1] id 0 from 0x080008d0
### Variables #######################################################################################################
#####################################################################################################################
Loading section .sec1, size 0x3a38 lma 0x8000000
Start address 0x08002d38, load size 14904
Transfer rate: 18 KB/sec, 14904 bytes/write.
Unable to match requested speed 500 kHz, using 480 kHz
Unable to match requested speed 500 kHz, using 480 kHz
A debugging session is active.
Inferior 1 [Remote target] will be detached.
Quit anyway? (y or n) [answered Y; input not from terminal]
[Inferior 1 (Remote target) detached]
0x080008d0 in ?? ()
### Assembly ########################################################################################################
0x080008d0 ? b.n 0x80008d0
0x080008d2 ? nop
0x080008d4 ? subs r0, #168 ; 0xa8
0x080008d6 ? lsrs r0, r0, #32
0x080008d8 ? lsls r0, r3, #3
0x080008da ? movs r0, #0
0x080008dc ? subs r0, #204 ; 0xcc
0x080008de ? lsrs r0, r0, #32
0x080008e0 ? subs r0, #212 ; 0xd4
0x080008e2 ? lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080008d0 primask 0x00
r1 0x2000fdd8 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x0000000b r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x08002d89 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04
r4 0x2000008c r9 0x00000000 lr 0x080008d1 psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x080008d0
### Threads #########################################################################################################
[1] id 0 from 0x080008d0
### Variables #######################################################################################################
#####################################################################################################################
Loading section .sec1, size 0x3a38 lma 0x8000000
Start address 0x08002d38, load size 14904
Transfer rate: 18 KB/sec, 14904 bytes/write.
Unable to match requested speed 500 kHz, using 480 kHz
Unable to match requested speed 500 kHz, using 480 kHz
A debugging session is active.
Inferior 1 [Remote target] will be detached.
Quit anyway? (y or n) [answered Y; input not from terminal]
[Inferior 1 (Remote target) detached]
0x080008d0 in ?? ()
### Assembly ########################################################################################################
0x080008d0 ? b.n 0x80008d0
0x080008d2 ? nop
0x080008d4 ? subs r0, #168 ; 0xa8
0x080008d6 ? lsrs r0, r0, #32
0x080008d8 ? lsls r0, r3, #3
0x080008da ? movs r0, #0
0x080008dc ? subs r0, #204 ; 0xcc
0x080008de ? lsrs r0, r0, #32
0x080008e0 ? subs r0, #212 ; 0xd4
0x080008e2 ? lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080008d0 primask 0x00
r1 0x2000fdd8 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x0000000b r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x08002d89 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04
r4 0x2000008c r9 0x00000000 lr 0x080008d1 psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x080008d0
### Threads #########################################################################################################
[1] id 0 from 0x080008d0
### Variables #######################################################################################################
#####################################################################################################################
Loading section .sec1, size 0x3a38 lma 0x8000000
Start address 0x08002d38, load size 14904
Transfer rate: 18 KB/sec, 14904 bytes/write.
Unable to match requested speed 500 kHz, using 480 kHz
Unable to match requested speed 500 kHz, using 480 kHz
A debugging session is active.
Inferior 1 [Remote target] will be detached.
Quit anyway? (y or n) [answered Y; input not from terminal]
[Inferior 1 (Remote target) detached]
0x080008d0 in ?? ()
### Assembly ########################################################################################################
0x080008d0 ? b.n 0x80008d0
0x080008d2 ? nop
0x080008d4 ? subs r0, #168 ; 0xa8
0x080008d6 ? lsrs r0, r0, #32
0x080008d8 ? lsls r0, r3, #3
0x080008da ? movs r0, #0
0x080008dc ? subs r0, #204 ; 0xcc
0x080008de ? lsrs r0, r0, #32
0x080008e0 ? subs r0, #212 ; 0xd4
0x080008e2 ? lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080008d0 primask 0x00
r1 0x2000fdd8 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x0000000b r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x08002d89 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04
r4 0x2000008c r9 0x00000000 lr 0x080008d1 psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x080008d0
### Threads #########################################################################################################
[1] id 0 from 0x080008d0
### Variables #######################################################################################################
#####################################################################################################################
Loading section .sec1, size 0x3a38 lma 0x8000000
Start address 0x08002d38, load size 14904
Transfer rate: 18 KB/sec, 14904 bytes/write.
Unable to match requested speed 500 kHz, using 480 kHz
Unable to match requested speed 500 kHz, using 480 kHz
A debugging session is active.
Inferior 1 [Remote target] will be detached.
Quit anyway? (y or n) [answered Y; input not from terminal]
[Inferior 1 (Remote target) detached]
0x080008d0 in ?? ()
### Assembly ########################################################################################################
0x080008d0 ? b.n 0x80008d0
0x080008d2 ? nop
0x080008d4 ? subs r0, #168 ; 0xa8
0x080008d6 ? lsrs r0, r0, #32
0x080008d8 ? lsls r0, r3, #3
0x080008da ? movs r0, #0
0x080008dc ? subs r0, #204 ; 0xcc
0x080008de ? lsrs r0, r0, #32
0x080008e0 ? subs r0, #212 ; 0xd4
0x080008e2 ? lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080008d0 primask 0x00
r1 0x2000fdd8 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x0000000b r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x08002d89 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04
r4 0x2000008c r9 0x00000000 lr 0x080008d1 psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x080008d0
### Threads #########################################################################################################
[1] id 0 from 0x080008d0
### Variables #######################################################################################################
#####################################################################################################################
Loading section .sec1, size 0x3a48 lma 0x8000000
Start address 0x08002d48, load size 14920
Transfer rate: 18 KB/sec, 14920 bytes/write.
Unable to match requested speed 500 kHz, using 480 kHz
Unable to match requested speed 500 kHz, using 480 kHz
A debugging session is active.
Inferior 1 [Remote target] will be detached.
Quit anyway? (y or n) [answered Y; input not from terminal]
[Inferior 1 (Remote target) detached]

@ -0,0 +1,6 @@
#include "motor_controller.h"
void motor_controller_init()
{
//
}

@ -0,0 +1,8 @@
#ifndef __MOTOR_CONTROLLER_H__
#define __MOTOR_CONTROLLER_H__
#include "main.h"
void motor_controller_init(void);
#endif

@ -6,10 +6,10 @@
int p_printf(const char* fmt, ...);
void p_uart_init(UART_HandleTypeDef* huart);
#ifdef DEBUG
#ifdef _DEBUG
#define PDEBUG(f_, ...) p_printf((f_), ##__VA_ARGS__)
#else
#define PDEBUG(f_, ...) void((f_), ...)
#define PDEBUG(f_, ...) void(f_, ...)
#endif
#endif
Loading…
Cancel
Save