forked from eliasbakken/Kamikaze2
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement/add support for 32 kb mcu (#390)
* Compile both 16 KB and 32 KB versions of the klipper binaries * Clean before compiling again. Clean folder to reset sed command * Use patch to add features
- Loading branch information
1 parent
79e60ef
commit c55675f
Showing
4 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
diff --git a/src/stm32/Kconfig b/src/stm32/Kconfig | ||
index e3961176..66363170 100644 | ||
--- a/src/stm32/Kconfig | ||
+++ b/src/stm32/Kconfig | ||
@@ -7,7 +7,7 @@ config STM32_SELECT | ||
default y | ||
select HAVE_GPIO | ||
select HAVE_GPIO_ADC | ||
- select HAVE_GPIO_I2C if !MACH_STM32F031 | ||
+ select HAVE_GPIO_I2C | ||
select HAVE_GPIO_SPI if !MACH_STM32F031 | ||
select HAVE_GPIO_SDIO if MACH_STM32F4 | ||
select HAVE_GPIO_HARD_PWM if MACH_STM32F1 || MACH_STM32F4 || MACH_STM32F7 || MACH_STM32G0 || MACH_STM32H7 | ||
@@ -206,7 +206,7 @@ config CLOCK_FREQ | ||
|
||
config FLASH_SIZE | ||
hex | ||
- default 0x4000 if MACH_STM32F031 | ||
+ default 0x8000 if MACH_STM32F031 | ||
default 0x8000 if MACH_STM32F042 | ||
default 0x20000 if MACH_STM32F070 || MACH_STM32F072 | ||
default 0x10000 if MACH_STM32F103 || MACH_STM32L412 # Flash size of stm32f103x8 (64KiB) | ||
diff --git a/src/stm32/stm32f0_i2c.c b/src/stm32/stm32f0_i2c.c | ||
index e9cadccb..0157bd32 100644 | ||
--- a/src/stm32/stm32f0_i2c.c | ||
+++ b/src/stm32/stm32f0_i2c.c | ||
@@ -22,6 +22,8 @@ struct i2c_info { | ||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PF1_PF0", "PF1,PF0"); | ||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 2); | ||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9"); | ||
+ DECL_ENUMERATION("i2c_bus", "i2c1_PB7_PB8", 3); | ||
+ DECL_CONSTANT_STR("BUS_PINS_i2c1_PB7_PB8", "PB7,PB8"); | ||
// Deprecated "i2c1a" style mappings | ||
DECL_ENUMERATION("i2c_bus", "i2c1", 0); | ||
DECL_CONSTANT_STR("BUS_PINS_i2c1", "PB6,PB7"); | ||
@@ -89,6 +91,7 @@ static const struct i2c_info i2c_bus[] = { | ||
{ I2C1, GPIO('B', 6), GPIO('B', 7), GPIO_FUNCTION(1) }, | ||
{ I2C1, GPIO('F', 1), GPIO('F', 0), GPIO_FUNCTION(1) }, | ||
{ I2C1, GPIO('B', 8), GPIO('B', 9), GPIO_FUNCTION(1) }, | ||
+ { I2C1, GPIO('B', 7), GPIO('B', 8), GPIO_FUNCTION(1) }, | ||
#elif CONFIG_MACH_STM32F7 | ||
{ I2C1, GPIO('B', 6), GPIO('B', 7), GPIO_FUNCTION(1) }, | ||
#elif CONFIG_MACH_STM32G0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Base config file for STM32F031 boards with serial on PA14/PA15 | ||
CONFIG_MACH_STM32=y | ||
CONFIG_MACH_STM32F031=y | ||
CONFIG_SERIAL=y | ||
CONFIG_STM32_FLASH_START_0000=y | ||
CONFIG_STM32_SERIAL_USART2_ALT_PA15_PA14=y | ||
CONFIG_STM32_CLOCK_REF_INTERNAL=y | ||
CONFIG_LOW_LEVEL_OPTIONS=y | ||
CONFIG_WANT_GPIO_BITBANGING=y | ||
CONFIG_WANT_DISPLAYS=n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters