stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.
This commit is contained in:
parent
f243851ccd
commit
ea8bf81058
@ -47,6 +47,7 @@ INC += -I../lib/timeutils
|
|||||||
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
|
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
|
||||||
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
|
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
|
||||||
CFLAGS += -Iboards/$(BOARD)
|
CFLAGS += -Iboards/$(BOARD)
|
||||||
|
CFLAGS += -DSTM32_HAL_H='<stm32$(MCU_SERIES)xx_hal.h>'
|
||||||
|
|
||||||
LDFLAGS = -nostdlib -T $(LD_FILE) -Map=$(@:.elf=.map) --cref
|
LDFLAGS = -nostdlib -T $(LD_FILE) -Map=$(@:.elf=.map) --cref
|
||||||
LIBS =
|
LIBS =
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "lib/fatfs/ff.h" /* FatFs lower layer API */
|
#include "lib/fatfs/ff.h" /* FatFs lower layer API */
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "dma.h"
|
#include "dma.h"
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "flash.h"
|
#include "flash.h"
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/mpstate.h"
|
#include "py/mpstate.h"
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
|
@ -200,7 +200,7 @@ void mp_hal_stdout_tx_strn_cooked(const char *str, mp_uint_t len);
|
|||||||
// value from disable_irq back to enable_irq. If you really need
|
// value from disable_irq back to enable_irq. If you really need
|
||||||
// to know the machine-specific values, see irq.h.
|
// to know the machine-specific values, see irq.h.
|
||||||
|
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
static inline void enable_irq(mp_uint_t state) {
|
static inline void enable_irq(mp_uint_t state) {
|
||||||
__set_PRIMASK(state);
|
__set_PRIMASK(state);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// We use the ST Cube HAL library for most hardware peripherals
|
// We use the ST Cube HAL library for most hardware peripherals
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
// Basic GPIO functions
|
// Basic GPIO functions
|
||||||
#define GPIO_read_pin(gpio, pin) (((gpio)->IDR >> (pin)) & 1)
|
#define GPIO_read_pin(gpio, pin) (((gpio)->IDR >> (pin)) & 1)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/mpstate.h"
|
#include "py/mpstate.h"
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
#include "rng.h"
|
#include "rng.h"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
// TODO make it work with DMA
|
// TODO make it work with DMA
|
||||||
|
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "stm32f4xx_it.h"
|
#include "stm32f4xx_it.h"
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
#include "pendsv.h"
|
#include "pendsv.h"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
#include "systick.h"
|
#include "systick.h"
|
||||||
|
@ -92,7 +92,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mpconfigboard.h"
|
#include "mpconfigboard.h"
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
|
|
||||||
void __fatal_error(const char *msg);
|
void __fatal_error(const char *msg);
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
#include "irq.h"
|
#include "irq.h"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <stm32f4xx_hal.h>
|
#include STM32_HAL_H
|
||||||
#include "usbd_cdc_msc_hid.h"
|
#include "usbd_cdc_msc_hid.h"
|
||||||
#include "usbd_cdc_interface.h"
|
#include "usbd_cdc_interface.h"
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
#include "usbd_core.h"
|
#include "usbd_core.h"
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#define __USBD_CONF_H
|
#define __USBD_CONF_H
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx_hal.h"
|
#include STM32_HAL_H
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user