mirror of
https://github.com/andreili/katapult.git
synced 2025-08-24 03:44:06 +02:00
stm32: Resync stm32f4 with upstream Klipper
There was a Klipper bugfix for STM32F401 clock init. There was a Klipper build bugfix when building with gcc hardfloat flags. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
3d924f52ec
commit
d2ea272de0
@ -16,7 +16,6 @@ CFLAGS-$(CONFIG_MACH_STM32F0) += -mcpu=cortex-m0 -Ilib/stm32f0/include
|
|||||||
CFLAGS-$(CONFIG_MACH_STM32F1) += -mcpu=cortex-m3 -Ilib/stm32f1/include
|
CFLAGS-$(CONFIG_MACH_STM32F1) += -mcpu=cortex-m3 -Ilib/stm32f1/include
|
||||||
CFLAGS-$(CONFIG_MACH_STM32F2) += -mcpu=cortex-m3 -Ilib/stm32f2/include
|
CFLAGS-$(CONFIG_MACH_STM32F2) += -mcpu=cortex-m3 -Ilib/stm32f2/include
|
||||||
CFLAGS-$(CONFIG_MACH_STM32F4) += -mcpu=cortex-m4 -Ilib/stm32f4/include
|
CFLAGS-$(CONFIG_MACH_STM32F4) += -mcpu=cortex-m4 -Ilib/stm32f4/include
|
||||||
CFLAGS-$(CONFIG_MACH_STM32F4) += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
|
||||||
CFLAGS += $(CFLAGS-y) -D$(MCU_UPPER) -mthumb -Ilib/cmsis-core -Ilib/fast-hash
|
CFLAGS += $(CFLAGS-y) -D$(MCU_UPPER) -mthumb -Ilib/cmsis-core -Ilib/fast-hash
|
||||||
|
|
||||||
CFLAGS_canboot.elf += --specs=nano.specs --specs=nosys.specs
|
CFLAGS_canboot.elf += --specs=nano.specs --specs=nosys.specs
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "board/armcm_boot.h" // VectorTable
|
#include "board/armcm_boot.h" // VectorTable
|
||||||
#include "board/irq.h" // irq_disable
|
#include "board/irq.h" // irq_disable
|
||||||
#include "board/usb_cdc.h" // usb_request_bootloader
|
#include "board/usb_cdc.h" // usb_request_bootloader
|
||||||
|
#include "command.h" // DECL_CONSTANT_STR
|
||||||
#include "internal.h" // enable_pclock
|
#include "internal.h" // enable_pclock
|
||||||
#include "sched.h" // sched_main
|
#include "sched.h" // sched_main
|
||||||
|
|
||||||
@ -55,6 +56,10 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
|||||||
RCC->AHB1ENR;
|
RCC->AHB1ENR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||||
|
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clock configuration
|
// Clock configuration
|
||||||
static void
|
static void
|
||||||
enable_clock_stm32f20x(void)
|
enable_clock_stm32f20x(void)
|
||||||
@ -158,7 +163,7 @@ clock_setup(void)
|
|||||||
// Configure and enable PLL
|
// Configure and enable PLL
|
||||||
if (CONFIG_MACH_STM32F207)
|
if (CONFIG_MACH_STM32F207)
|
||||||
enable_clock_stm32f20x();
|
enable_clock_stm32f20x();
|
||||||
else if (CONFIG_MACH_STM32F4x5)
|
else if (CONFIG_MACH_STM32F401 || CONFIG_MACH_STM32F4x5)
|
||||||
enable_clock_stm32f40x();
|
enable_clock_stm32f40x();
|
||||||
else
|
else
|
||||||
enable_clock_stm32f446();
|
enable_clock_stm32f446();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user