Restructure include hierarchy

This commit is contained in:
Mario Hüttel 2020-02-12 21:00:35 +01:00
parent d80ce20675
commit f04a5c7930
26 changed files with 49 additions and 46 deletions

View File

@ -3,7 +3,7 @@
#Compiler: arm-none-eabi #Compiler: arm-none-eabi
##################################################################################### #####################################################################################
#Add Files and Folders below######################################################### #Add Files and Folders below#########################################################
CFILES = main.c syscalls.c cmsis_boot/system_stm32f4xx.c systick.c CFILES = main.c syscalls.c setup/system_stm32f4xx.c systick.c
ASFILES = boot/startup_stm32f4xx.S ASFILES = boot/startup_stm32f4xx.S
INCLUDEPATH = -Icmsis -Iinclude INCLUDEPATH = -Icmsis -Iinclude

View File

@ -1,9 +1,9 @@
#include <adc-meas.h> #include <reflow-controller/adc-meas.h>
#include <stm32f4xx.h> #include <stm32/stm32f4xx.h>
#include <core_cm4.h> #include <cmsis/core_cm4.h>
#include <stm32-gpio-macros.h> #include <stm-periph/stm32-gpio-macros.h>
#include <stdlib.h> #include <stdlib.h>
#include <clock-enable-manager.h> #include <stm-periph/clock-enable-manager.h>
static float pt1000_offset; static float pt1000_offset;
static float pt1000_sens_dev; static float pt1000_sens_dev;

View File

@ -1,4 +1,4 @@
#include <clock-enable-manager.h> #include <stm-periph/clock-enable-manager.h>
#include <helper-macros/helper-macros.h> #include <helper-macros/helper-macros.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,7 +1,7 @@
#include <digio.h> #include <reflow-controller/digio.h>
#include <stm32f4xx.h> #include <stm32/stm32f4xx.h>
#include <clock-enable-manager.h> #include <stm-periph/clock-enable-manager.h>
#include <stm32-gpio-macros.h> #include <stm-periph/stm32-gpio-macros.h>
#include <helper-macros/helper-macros.h> #include <helper-macros/helper-macros.h>
static const uint8_t digio_pins[] = {DIGIO_PINS}; static const uint8_t digio_pins[] = {DIGIO_PINS};

View File

@ -151,9 +151,9 @@
#endif #endif
#include <stdint.h> /* standard types definitions */ #include <stdint.h> /* standard types definitions */
#include <core_cmInstr.h> /* Core Instruction Access */ #include <cmsis/core_cmInstr.h> /* Core Instruction Access */
#include <core_cmFunc.h> /* Core Function Access */ #include <cmsis/core_cmFunc.h> /* Core Function Access */
#include <core_cm4_simd.h> /* Compiler specific SIMD Intrinsics */ #include <cmsis/core_cm4_simd.h> /* Compiler specific SIMD Intrinsics */
#endif /* __CORE_CM4_H_GENERIC */ #endif /* __CORE_CM4_H_GENERIC */

View File

@ -3,7 +3,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stm32f4xx.h> #include <stm32/stm32f4xx.h>
/** /**
* @brief Moving average filter coefficient for PT1000 measurement * @brief Moving average filter coefficient for PT1000 measurement
*/ */

View File

@ -2,7 +2,7 @@
#define __CLOCK_ENABLE_MANAGER_H__ #define __CLOCK_ENABLE_MANAGER_H__
#include <stdint.h> #include <stdint.h>
#include <stm32-gpio-macros.h> #include <stm-periph/stm32-gpio-macros.h>
/** /**
* @brief The RCC Enable Manager uses static memory with a fixed maximum * @brief The RCC Enable Manager uses static memory with a fixed maximum

View File

@ -2,7 +2,7 @@
#define __DMA_RING_BUFFER_H__ #define __DMA_RING_BUFFER_H__
#include <stdbool.h> #include <stdbool.h>
#include <stm32f4xx.h> #include <stm32/stm32f4xx.h>
#include <stddef.h> #include <stddef.h>
struct dma_ring_buffer_to_mem { struct dma_ring_buffer_to_mem {

View File

@ -181,8 +181,8 @@ typedef enum
* @} * @}
*/ */
#include "core_cm4.h" /* Cortex-M4 processor and core peripherals */ #include <cmsis/core_cm4.h> /* Cortex-M4 processor and core peripherals */
#include "system_stm32f4xx.h" #include <setup/system_stm32f4xx.h>
#include <stdint.h> #include <stdint.h>
/** @addtogroup Peripheral_registers_structures /** @addtogroup Peripheral_registers_structures

View File

@ -4,18 +4,20 @@
* Created on: Apr 25, 2015 * Created on: Apr 25, 2015
* Author: mari * Author: mari
*/ */
#include <stm32f4xx.h>
#include <systick.h>
//#include <arm_math.h>
#include <stm32-gpio-macros.h>
#include <system_stm32f4xx.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <adc-meas.h> /* #include <arm_math.h> */
#include <clock-enable-manager.h> #include <stm32/stm32f4xx.h>
#include <uart/uart.h> #include <cmsis/core_cm4.h>
#include <shell.h> #include <setup/system_stm32f4xx.h>
#include <digio.h> #include <reflow-controller/systick.h>
#include <reflow-controller/adc-meas.h>
#include <reflow-controller/shell.h>
#include <reflow-controller/digio.h>
#include <stm-periph/stm32-gpio-macros.h>
#include <stm-periph/clock-enable-manager.h>
#include <stm-periph/uart/uart.h>
static void setup_nvic_priorities() static void setup_nvic_priorities()
{ {
@ -25,6 +27,7 @@ static void setup_nvic_priorities()
/* Setup Priorities */ /* Setup Priorities */
NVIC_SetPriority(ADC_IRQn, 2); NVIC_SetPriority(ADC_IRQn, 2);
NVIC_SetPriority(DMA2_Stream0_IRQn, 1); NVIC_SetPriority(DMA2_Stream0_IRQn, 1);
NVIC_SetPriority(DMA2_Stream7_IRQn, 3);
} }
static float pt1000_value; static float pt1000_value;

View File

@ -114,7 +114,7 @@
* @{ * @{
*/ */
#include "stm32f4xx.h" #include <stm32/stm32f4xx.h>
/** /**
* @} * @}

View File

@ -1,11 +1,11 @@
#include <shell.h> #include <reflow-controller/shell.h>
#include <uart/uart.h> #include <stm-periph/uart/uart.h>
#include <string.h> #include <string.h>
#include <adc-meas.h> #include <reflow-controller/adc-meas.h>
#include <digio.h> #include <reflow-controller/digio.h>
#include <stdlib.h> #include <stdlib.h>
#include <helper-macros/helper-macros.h> #include <helper-macros/helper-macros.h>
#include <systick.h> #include <reflow-controller/systick.h>
#ifndef GIT_VER #ifndef GIT_VER
#define GIT_VER "VERSION NOT SET" #define GIT_VER "VERSION NOT SET"

View File

@ -1,4 +1,4 @@
#include <uart/uart.h> #include <stm-periph/uart/uart.h>
char* _sbrk(int incr) { char* _sbrk(int incr) {
extern char heap_low; // Defined by the linker extern char heap_low; // Defined by the linker

View File

@ -1,6 +1,6 @@
#include <systick.h> #include <reflow-controller/systick.h>
#include <stm32f4xx.h> #include <stm32/stm32f4xx.h>
#include <core_cm4.h> #include <cmsis/core_cm4.h>
volatile uint32_t wait_tick_ms; volatile uint32_t wait_tick_ms;
volatile uint64_t global_tick_ms; volatile uint64_t global_tick_ms;

View File

@ -1,5 +1,5 @@
#include <uart/dma-ring-buffer.h> #include <stm-periph/uart/dma-ring-buffer.h>
#include <clock-enable-manager.h> #include <stm-periph/clock-enable-manager.h>
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>

View File

@ -8,11 +8,11 @@
//PA2 => TX //PA2 => TX
//PA3 => RX //PA3 => RX
//Alternate Function 7 //Alternate Function 7
#include <uart/uart.h> #include <stm-periph/uart/uart.h>
#include <stm32f4xx.h> #include <stm32/stm32f4xx.h>
#include <clock-enable-manager.h> #include <stm-periph/clock-enable-manager.h>
#include <stm32-gpio-macros.h> #include <stm-periph/stm32-gpio-macros.h>
#include <uart/dma-ring-buffer.h> #include <stm-periph/uart/dma-ring-buffer.h>
#include <string.h> #include <string.h>
static struct dma_ring_buffer_to_mem ring_buff_rx; static struct dma_ring_buffer_to_mem ring_buff_rx;