From ba338eebb5e44c533441e5e8ad6f209e5d328d1b Mon Sep 17 00:00:00 2001 From: Attila BODY Date: Sun, 29 Sep 2019 21:56:35 +0200 Subject: [PATCH] Setting up debugging --- .gitignore | 1 + .vscode/launch.json | 20 ++++++++++++++++++++ .vscode/settings.json | 4 ++++ Src/main.c | 3 ++- Src/stm32f4xx_it.c | 2 +- 5 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index d34cfdd..45bc6d1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ _[Bb][Uu][Ii][Ll][Dd]*/ [Dd]ebug/ [Rr]elease/ *.[Bb][Aa][Kk] +.vscode/.* diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..1679e4a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,20 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Cortex Debug", + "cwd": "${workspaceRoot}", + "executable": "./build/f407zgt6_hs_uart.elf", + "request": "launch", + "type": "cortex-debug", + "servertype": "jlink", + "device": "STM32F407ZE", + "interface": "swd", + "ipAddress": null, + "serialNumber": null + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9c37f5b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "cortex-debug.armToolchainPath": "/opt/shared/arm/gcc-arm-none-eabi-8-2018-q4-major/bin/", + "cortex-debug.openocdPath": "/opt/shared/arm/gnu-mcu-eclipse/openocd/0.10.0-12-20190422-2015/bin/", +} \ No newline at end of file diff --git a/Src/main.c b/Src/main.c index 3334727..48381a3 100644 --- a/Src/main.c +++ b/Src/main.c @@ -25,6 +25,7 @@ #include "spi.h" #include "usart.h" #include "gpio.h" +#include "application.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ @@ -102,7 +103,7 @@ int main(void) MX_USART6_UART_Init(); MX_CRC_Init(); /* USER CODE BEGIN 2 */ - + MainLoop(); /* USER CODE END 2 */ /* Infinite loop */ diff --git a/Src/stm32f4xx_it.c b/Src/stm32f4xx_it.c index 61d49d3..c51f91e 100644 --- a/Src/stm32f4xx_it.c +++ b/Src/stm32f4xx_it.c @@ -251,7 +251,7 @@ void DMA1_Stream2_IRQHandler(void) void DMA1_Stream3_IRQHandler(void) { /* USER CODE BEGIN DMA1_Stream3_IRQn 0 */ - HandleUsartTxDmaIrq(&g_uartStatuses[USART1_OFFSET]); + HandleUsartTxDmaIrq(&g_uartStatuses[USART3_OFFSET]); /* USER CODE END DMA1_Stream3_IRQn 0 */ /* USER CODE BEGIN DMA1_Stream3_IRQn 1 */