1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-22 18:25:18 +00:00

STM32F103.. reorganization, SKR mini fix (#15398)

This commit is contained in:
Tanguy Pruvot 2019-09-29 09:04:53 +02:00 committed by Scott Lahteine
parent 5e9898600b
commit 43d6e9fa43
23 changed files with 98 additions and 55 deletions

View File

@ -240,10 +240,10 @@ jobs:
build_marlin_pio ./ ${TEST_PLATFORM}
restore_configs
echo testing STM32F1 targets...
export TEST_PLATFORM="-e STM32F103R"
export TEST_PLATFORM="-e STM32F103RE"
restore_configs
echo use_example_configs STM32/STM32F103R
use_example_configs STM32/STM32F103R
echo use_example_configs STM32/STM32F103RE
use_example_configs STM32/STM32F103RE
build_marlin_pio ./ ${TEST_PLATFORM}
restore_configs
echo use_example_configs STM32/stm32f103ret6

View File

@ -16,7 +16,7 @@ env:
- TEST_PLATFORM="LPC1768"
- TEST_PLATFORM="LPC1769"
- TEST_PLATFORM="megaatmega2560"
- TEST_PLATFORM="STM32F103R"
- TEST_PLATFORM="STM32F103RE"
- TEST_PLATFORM="teensy31"
- TEST_PLATFORM="teensy35"
@ -31,22 +31,23 @@ env:
- TEST_PLATFORM="ARMED"
- TEST_PLATFORM="BIGTREE_BTT002"
- TEST_PLATFORM="BIGTREE_SKR_PRO"
- TEST_PLATFORM="STM32F103R_bigtree"
- TEST_PLATFORM="STM32F103RC_bigtree"
- TEST_PLATFORM="jgaurora_a5s_a1"
- TEST_PLATFORM="STM32F103V_longer"
- TEST_PLATFORM="STM32F103VE_longer"
- TEST_PLATFORM="STM32F407VE_black"
# Non-working environment tests
#- TEST_PLATFORM="at90usb1286_cdc"
#- TEST_PLATFORM="at90usb1286_dfu"
#- TEST_PLATFORM="malyanm200"
#- TEST_PLATFORM="STM32F103CB_malyan"
#- TEST_PLATFORM="mks_robin"
#- TEST_PLATFORM="mks_robin_lite"
#- TEST_PLATFORM="mks_robin_mini"
#- TEST_PLATFORM="mks_robin_nano"
#- TEST_PLATFORM="SAMD51_grandcentral_m4"
#- TEST_PLATFORM="STM32F103R_bigtree"
#- TEST_PLATFORM="STM32F103R_fysetc"
#- TEST_PLATFORM="STM32F103RC_bigtree"
#- TEST_PLATFORM="STM32F103RC_bigtree_USB"
#- TEST_PLATFORM="STM32F103RC_fysetc"
#- TEST_PLATFORM="STM32F4"
#- TEST_PLATFORM="STM32F7"

View File

@ -255,9 +255,9 @@
// STM32 ARM Cortex-M3
//
#define BOARD_STM32F103R 4000 // STM32F103R Libmaple-based STM32F1 controller
#define BOARD_STM32F103RE 4000 // STM32F103RE Libmaple-based STM32F1 controller
#define BOARD_MALYAN_M200 4001 // STM32C8T6 Libmaple-based STM32F1 controller
#define BOARD_STM3R_MINI 4002 // STM32F103R Libmaple-based STM32F1 controller
#define BOARD_STM3R_MINI 4002 // STM32F103RE Libmaple-based STM32F1 controller
#define BOARD_GTM32_PRO_VB 4003 // STM32F103VET6 controller
#define BOARD_MORPHEUS 4004 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller
#define BOARD_CHITU3D 4005 // Chitu3D (STM32F103RET6)

View File

@ -410,6 +410,7 @@
#define BOARD_FORMBOT_TREX2 -1003
#define BOARD_BIQU_SKR_V1_1 -1004
#define BOARD_STM32F1R -1005
#define BOARD_STM32F103R -1006
#if MB(MKS_13)
#error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
#elif MB(TRIGORILLA)
@ -421,7 +422,9 @@
#elif MB(BIQU_SKR_V1_1)
#error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BIGTREE_SKR_V1_1. Please update your configuration."
#elif MB(STM32F1R)
#error "BOARD_STM32F1R has been renamed BOARD_STM32F103R. Please update your configuration."
#error "BOARD_STM32F1R has been renamed BOARD_STM32F103RE. Please update your configuration."
#elif MB(STM32F103R)
#error "BOARD_STM32F103R has been renamed BOARD_STM32F103RE. Please update your configuration."
#endif
#undef BOARD_MKS_13
#undef BOARD_TRIGORILLA
@ -429,6 +432,7 @@
#undef BOARD_FORMBOT_TREX2
#undef BOARD_BIQU_SKR_V1_1
#undef BOARD_STM32F1R
#undef BOARD_STM32F103R
/**
* Marlin release, version and default string

View File

@ -442,18 +442,18 @@
// STM32 ARM Cortex-M3
//
#elif MB(STM32F103R)
#include "stm32/pins_STM32F1R.h" // STM32F1 env:STM32F103R
#elif MB(STM32F103RE)
#include "stm32/pins_STM32F1R.h" // STM32F1 env:STM32F103RE
#elif MB(MALYAN_M200)
#include "stm32/pins_MALYAN_M200.h" // STM32F1 env:malyanm200
#include "stm32/pins_MALYAN_M200.h" // STM32F1 env:STM32F103CB_malyan
#elif MB(STM3R_MINI)
#include "stm32/pins_STM3R_MINI.h" // STM32F1 env:STM32F103R
#include "stm32/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_PRO_VB)
#include "stm32/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103R
#include "stm32/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE
#elif MB(MORPHEUS)
#include "stm32/pins_MORPHEUS.h" // STM32F1 env:STM32F103R
#include "stm32/pins_MORPHEUS.h" // STM32F1 env:STM32F103RE
#elif MB(CHITU3D)
#include "stm32/pins_CHITU3D.h" // STM32F1 env:STM32F103R
#include "stm32/pins_CHITU3D.h" // STM32F1 env:STM32F103RE
#elif MB(MKS_ROBIN)
#include "stm32/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin
#elif MB(MKS_ROBIN_MINI)
@ -463,21 +463,21 @@
#elif MB(MKS_ROBIN_LITE)
#include "stm32/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
#elif MB(BIGTREE_SKR_MINI_V1_1)
#include "stm32/pins_BIGTREE_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103R_bigtree
#include "stm32/pins_BIGTREE_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_bigtree
#elif MB(BIGTREE_SKR_MINI_E3)
#include "stm32/pins_BIGTREE_SKR_MINI_E3.h" // STM32F1 env:STM32F103R_bigtree
#include "stm32/pins_BIGTREE_SKR_MINI_E3.h" // STM32F1 env:STM32F103RC_bigtree
#elif MB(BIGTREE_SKR_E3_DIP)
#include "stm32/pins_BIGTREE_SKR_E3_DIP.h" // STM32F1 env:STM32F103R_bigtree
#include "stm32/pins_BIGTREE_SKR_E3_DIP.h" // STM32F1 env:STM32F103RC_bigtree
#elif MB(JGAURORA_A5S_A1)
#include "stm32/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1
#elif MB(FYSETC_AIO_II)
#include "stm32/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103R_fysetc
#include "stm32/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc
#elif MB(FYSETC_CHEETAH)
#include "stm32/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103R_fysetc
#include "stm32/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc
#elif MB(FYSETC_CHEETAH_V12)
#include "stm32/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103R_fysetc
#include "stm32/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc
#elif MB(LONGER3D_LK)
#include "stm32/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103V_longer
#include "stm32/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer
//
// ARM Cortex-M4F

View File

@ -33,9 +33,15 @@
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#ifdef MCU_STM32F103RE
#define STM32_FLASH_SIZE (512 * 1024)
#else
#define STM32_FLASH_SIZE (256 * 1024)
#endif
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
#define EEPROM_START_ADDRESS uint32(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE)
#define EEPROM_START_ADDRESS uint32(0x8000000 + STM32_FLASH_SIZE - 2 * EEPROM_PAGE_SIZE)
#undef E2END
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB

View File

@ -33,9 +33,15 @@
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#ifdef MCU_STM32F103RE
#define STM32_FLASH_SIZE (512 * 1024)
#else
#define STM32_FLASH_SIZE (256 * 1024)
#endif
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
#define EEPROM_START_ADDRESS uint32(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE)
#define EEPROM_START_ADDRESS uint32(0x8000000 + STM32_FLASH_SIZE - 2 * EEPROM_PAGE_SIZE)
#undef E2END
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB

View File

@ -33,6 +33,17 @@
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#ifdef MCU_STM32F103RE
#define STM32_FLASH_SIZE (512 * 1024)
#else
#define STM32_FLASH_SIZE (256 * 1024)
#endif
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE (0x800) // 2KB
#define EEPROM_START_ADDRESS (0x8000000 + STM32_FLASH_SIZE - 2 * EEPROM_PAGE_SIZE)
#define E2END (EEPROM_PAGE_SIZE - 1)
//
// Limit Switches
//
@ -208,7 +219,3 @@
#define ST7920_DELAY_3 DELAY_NS(125)
#endif
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE (0x800) // 2KB
#define EEPROM_START_ADDRESS (0x8000000 + (256 * 1024) - 2 * EEPROM_PAGE_SIZE)
#define E2END (EEPROM_PAGE_SIZE - 1)

View File

@ -5,4 +5,4 @@ for define in env['CPPDEFINES']:
if define[0] == "VECT_TAB_ADDR":
env['CPPDEFINES'].remove(define)
env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000"))
env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/STM32F1_SKR_MINI.ld")
env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/STM32F103RC_SKR_MINI.ld")

View File

@ -5,7 +5,7 @@ for define in env['CPPDEFINES']:
if define[0] == "VECT_TAB_ADDR":
env['CPPDEFINES'].remove(define)
env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000"))
env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/longer_STM32.ld")
env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/STM32F103VE_longer.ld")
# Rename ${PROGNAME}.bin and save it as 'project.bin' (No encryption on the Longer3D)
def encrypt(source, target, env):

View File

@ -28,8 +28,8 @@ case $TESTENV in
m128) TESTENV='megaatmega1280' ;;
m256) TESTENV='megaatmega2560' ;;
mega) TESTENV='megaatmega2560' ;;
stm) TESTENV='STM32F103R' ;;
f1) TESTENV='STM32F103R' ;;
stm) TESTENV='STM32F103RE' ;;
f1) TESTENV='STM32F103RE' ;;
f4) TESTENV='STM32F4' ;;
f7) TESTENV='STM32F7' ;;
teensy) TESTENV='teensy31' ;;

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Build tests for STM32F1 malyanM200
# Build tests for STM32F103CB Malyan M200
#
# exit on first failure

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Build tests for STM32F1 Bigtreetech (SKR Mini v1.1)
# Build tests for STM32F103RC Bigtreetech (SKR Mini v1.1)
#
# exit on first failure

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# Build tests for STM32F103RC Bigtreetech (SKR Mini v1.1)
#
# exit on first failure
set -e
#
# Build with the default configurations
#
restore_configs
opt_set MOTHERBOARD BOARD_BIGTREE_SKR_MINI_V1_1
opt_set SERIAL_PORT 1
opt_set SERIAL_PORT_2 -1
exec_test $1 $2 "Bigtreetech SKR Mini v1.1 - Basic Configuration"
# clean up
restore_configs

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Build tests for STM32F1 FYSETC
# Build tests for STM32F103RC FYSETC
#
# exit on first failure

View File

@ -10,7 +10,7 @@ set -e
# Build with the default configurations
#
restore_configs
opt_set MOTHERBOARD BOARD_STM32F103R
opt_set MOTHERBOARD BOARD_STM32F103RE
opt_set EXTRUDERS 2
opt_set SERIAL_PORT -1
opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT \

View File

@ -129,7 +129,7 @@
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_STM32F103R
#define MOTHERBOARD BOARD_STM32F103RE
#endif
// Name displayed in the LCD "Ready" message and Info menu

View File

@ -129,7 +129,7 @@
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_STM32F103R
#define MOTHERBOARD BOARD_STM32F103RE
#endif
// Name displayed in the LCD "Ready" message and Info menu

View File

@ -253,7 +253,7 @@ monitor_speed = 250000
#
# STM32F103RE
#
[env:STM32F103R]
[env:STM32F103RE]
platform = ststm32
framework = arduino
board = genericSTM32F103RE
@ -262,20 +262,20 @@ build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
-DDEBUG_LEVEL=0
build_unflags = -std=gnu++11
lib_deps = ${common.lib_deps}
lib_ignore = U8glib-HAL, Adafruit NeoPixel, SPI
lib_ignore = Adafruit NeoPixel, SPI
src_filter = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
monitor_speed = 250000
#
# STM32F103R_fysetc
# STM32F103RC_fysetc
#
[env:STM32F103R_fysetc]
[env:STM32F103RC_fysetc]
platform = ststm32
framework = arduino
board = genericSTM32F103RC
#board_build.core = maple
platform_packages = tool-stm32duino
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103R_fysetc.py
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
${common.build_flags} -std=gnu++14
-DDEBUG_LEVEL=0 -DHAVE_SW_SERIAL
@ -292,12 +292,12 @@ upload_protocol = serial
#
# BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
#
[env:STM32F103R_bigtree]
[env:STM32F103RC_bigtree]
platform = ststm32
framework = arduino
board = genericSTM32F103RC
platform_packages = tool-stm32duino
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F1_SKR_MINI.py
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
${common.build_flags} -DDEBUG_LEVEL=0 -std=gnu++14
build_unflags = -std=gnu++11
@ -308,12 +308,12 @@ monitor_speed = 115200
upload_protocol = stlink
debug_tool = stlink
[env:STM32F103R_bigtree_USB]
[env:STM32F103RC_bigtree_USB]
platform = ststm32
framework = arduino
board = genericSTM32F103RC
platform_packages = tool-stm32duino
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F1_SKR_MINI.py
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
${common.build_flags} -DDEBUG_LEVEL=0 -DUSE_USB_COMPOSITE -std=gnu++14
build_unflags = -std=gnu++11
@ -366,12 +366,12 @@ monitor_speed = 250000
#
# Longer 3D board in Alfawise U20 (STM32F103VET6)
#
[env:STM32F103V_longer]
[env:STM32F103VE_longer]
platform = ststm32
framework = arduino
board = genericSTM32F103VE
monitor_speed = 250000
extra_scripts = buildroot/share/PlatformIO/scripts/longer_STM32.py
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
${common.build_flags} -std=gnu++14 -USERIAL_USB
-DSTM32F1xx -DU20 -DTS_V12
@ -543,9 +543,9 @@ src_filter = ${common.default_src_filter} +<src/HAL/HAL_TEENSY35_36>
monitor_speed = 250000
#
# Malyan M200 (STM32F1)
# Malyan M200 (STM32F103CB)
#
[env:malyanm200]
[env:STM32F103CB_malyan]
platform = ststm32
framework = arduino
board = malyanM200