From c9a260ee12c9cc6a877a9e1155ddc8c619e4b7a4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 31 May 2020 02:12:29 -0500 Subject: [PATCH] MEEB cleanup, whitespace Followup to #18138 --- .github/workflows/test-builds.yml | 1 + Marlin/src/pins/pins.h | 2 +- .../scripts/STM32F103RC_MEEB_3DP.py | 6 ++--- .../STM32F103RC_MEEB_3DP_create_variant.py | 4 ++-- .../PlatformIO/variants/MEEB_3DP/board.cpp | 22 +++++++++---------- .../variants/MEEB_3DP/ld/stm32f103rb.ld | 2 +- .../variants/MEEB_3DP/ld/stm32f103rc.ld | 2 +- .../variants/MEEB_3DP/ld/stm32f103re.ld | 2 +- .../variants/MEEB_3DP/wirish/boards_setup.cpp | 14 ++++++------ ..._meeb_3dp-tests => STM32F103RC_meeb-tests} | 0 platformio.ini | 2 +- 11 files changed, 28 insertions(+), 29 deletions(-) rename buildroot/share/tests/{STM32F103RC_cc_meeb_3dp-tests => STM32F103RC_meeb-tests} (100%) diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index 22ca222b91..1e48822dcd 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -49,6 +49,7 @@ jobs: - STM32F103RE_btt - STM32F103RE_btt_USB - STM32F103RC_fysetc + - STM32F103RC_meeb - jgaurora_a5s_a1 - STM32F103VE_longer - STM32F407VE_black diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index b8f01e5626..6c19129f93 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -535,7 +535,7 @@ #elif MB(MKS_ROBIN_E3) #include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3 #elif MB(CCROBOT_MEEB_3DP) - #include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_cc_meeb_3dp + #include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_meeb // // ARM Cortex-M4F diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py index 9176ab3278..547d80ace5 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py +++ b/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py @@ -13,7 +13,7 @@ print(projenv) config = configparser.ConfigParser() config.read("platformio.ini") -#com_port = config.get("env:STM32F103RC_cc_meeb_3dp", "upload_port") +#com_port = config.get("env:STM32F103RC_meeb", "upload_port") #print('Use the {0:s} to reboot the board to dfu mode.'.format(com_port)) # @@ -48,7 +48,7 @@ for define in env['CPPDEFINES']: if define[0] == "STM32_FLASH_SIZE": flash_size = define[1] -print('Use the {0:s} address as the marlin app entry point.'.format(vect_tab_addr)) +print('Use the {0:s} address as the marlin app entry point.'.format(vect_tab_addr)) print('Use the {0:d}KB flash version of stm32f103rct6 chip.'.format(flash_size)) custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103RC_MEEB_3DP.ld") @@ -57,5 +57,3 @@ for i, flag in enumerate(env["LINKFLAGS"]): env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script elif flag == "-T": env["LINKFLAGS"][i + 1] = custom_ld_script - - diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP_create_variant.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP_create_variant.py index e4f9b672d1..4849f59ceb 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP_create_variant.py +++ b/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP_create_variant.py @@ -27,8 +27,8 @@ assert os.path.isdir(source_dir) if os.path.isdir(variant_dir): shutil.rmtree(variant_dir) - + if not os.path.isdir(variant_dir): os.mkdir(variant_dir) -copytree(source_dir, variant_dir) \ No newline at end of file +copytree(source_dir, variant_dir) diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/board.cpp b/buildroot/share/PlatformIO/variants/MEEB_3DP/board.cpp index 5b602de49a..9a678c01e7 100644 --- a/buildroot/share/PlatformIO/variants/MEEB_3DP/board.cpp +++ b/buildroot/share/PlatformIO/variants/MEEB_3DP/board.cpp @@ -73,19 +73,19 @@ void boardInit(void) { extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { /* - gpio_dev *gpio_device; GPIO device + gpio_dev *gpio_device; GPIO device timer_dev *timer_device; Pin's timer device, if any. - const adc_dev *adc_device; ADC device, if any. - uint8 gpio_bit; Pin's GPIO port bit. - uint8 timer_channel; Timer channel, or 0 if none. - uint8 adc_channel; Pin ADC channel, or ADCx if none. + const adc_dev *adc_device; ADC device, if any. + uint8 gpio_bit; Pin's GPIO port bit. + uint8 timer_channel; Timer channel, or 0 if none. + uint8 adc_channel; Pin ADC channel, or ADCx if none. */ {&gpioa, &timer2, &adc1, 0, 1, 0}, /* PA0 */ {&gpioa, &timer2, &adc1, 1, 2, 1}, /* PA1 */ {&gpioa, &timer2, &adc1, 2, 3, 2}, /* PA2 */ {&gpioa, &timer2, &adc1, 3, 4, 3}, /* PA3 */ - {&gpioa, NULL, &adc1, 4, 0, 4}, /* PA4 */ + {&gpioa, NULL, &adc1, 4, 0, 4}, /* PA4 */ {&gpioa, NULL, &adc1, 5, 0, 5}, /* PA5 */ {&gpioa, &timer3, &adc1, 6, 1, 6}, /* PA6 */ {&gpioa, &timer3, &adc1, 7, 2, 7}, /* PA7 */ @@ -93,14 +93,14 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpioa, &timer1, NULL, 9, 2, ADCx}, /* PA9 */ {&gpioa, &timer1, NULL, 10, 3, ADCx}, /* PA10 */ {&gpioa, NULL, NULL, 11, 0, ADCx}, /* PA11 */ - {&gpioa, NULL, NULL, 12, 0, ADCx}, /* PA12 */ + {&gpioa, NULL, NULL, 12, 0, ADCx}, /* PA12 */ {&gpioa, NULL, NULL, 13, 0, ADCx}, /* PA13 */ {&gpioa, NULL, NULL, 14, 0, ADCx}, /* PA14 */ {&gpioa, NULL, NULL, 15, 0, ADCx}, /* PA15 */ - + {&gpiob, &timer3, &adc1, 0, 3, 8}, /* PB0 */ {&gpiob, &timer3, &adc1, 1, 4, 9}, /* PB1 */ - {&gpiob, NULL, NULL, 2, 0, ADCx}, /* PB2 */ + {&gpiob, NULL, NULL, 2, 0, ADCx}, /* PB2 */ {&gpiob, NULL, NULL, 3, 0, ADCx}, /* PB3 */ {&gpiob, NULL, NULL, 4, 0, ADCx}, /* PB4 */ {&gpiob, NULL, NULL, 5, 0, ADCx}, /* PB5 */ @@ -122,13 +122,13 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpioc, NULL, &adc1, 3, 0, 13}, /* PC3 */ {&gpioc, NULL, &adc1, 4, 0, 14}, /* PC4 */ {&gpioc, NULL, &adc1, 5, 0, 15}, /* PC5 */ - {&gpioc, &timer8, NULL, 6, 1, ADCx}, /* PC6 */ + {&gpioc, &timer8, NULL, 6, 1, ADCx}, /* PC6 */ {&gpioc, &timer8, NULL, 7, 2, ADCx}, /* PC7 */ {&gpioc, &timer8, NULL, 8, 3, ADCx}, /* PC8 */ {&gpioc, &timer8, NULL, 9, 4, ADCx}, /* PC9 */ {&gpioc, NULL, NULL, 10, 0, ADCx}, /* PC10 UART4_TX/SDIO_D2 */ {&gpioc, NULL, NULL, 11, 0, ADCx}, /* PC11 UART4_RX/SDIO_D3 */ - {&gpioc, NULL, NULL, 12, 0, ADCx}, /* PC12 UART5_TX/SDIO_CK */ + {&gpioc, NULL, NULL, 12, 0, ADCx}, /* PC12 UART5_TX/SDIO_CK */ {&gpioc, NULL, NULL, 13, 0, ADCx}, /* PC13 TAMPER-RTC */ {&gpioc, NULL, NULL, 14, 0, ADCx}, /* PC14 OSC32_IN */ {&gpioc, NULL, NULL, 15, 0, ADCx}, /* PC15 OSC32_OUT */ diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb.ld b/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb.ld index 9c0d19b716..094f2d2928 100644 --- a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb.ld +++ b/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb.ld @@ -1,5 +1,5 @@ /* - * Linker script for Generic STM32F103RB boards. + * Linker script for Generic STM32F103RB boards. */ MEMORY { diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc.ld b/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc.ld index 016d59d00d..c890d69f6d 100644 --- a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc.ld +++ b/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc.ld @@ -1,5 +1,5 @@ /* - * Linker script for Generic STM32F103RC boards. + * Linker script for Generic STM32F103RC boards. */ MEMORY { diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103re.ld b/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103re.ld index 52abb5ad09..9f74fd5292 100644 --- a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103re.ld +++ b/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103re.ld @@ -1,5 +1,5 @@ /* - * Linker script for Generic STM32F103RE boards. + * Linker script for Generic STM32F103RE boards. */ MEMORY { diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards_setup.cpp b/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards_setup.cpp index d4e95925ac..3e534dc3c9 100644 --- a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards_setup.cpp +++ b/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards_setup.cpp @@ -72,8 +72,8 @@ namespace wirish { #if F_CPU == 72000000 rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5); #elif F_CPU == 48000000 - rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1); - #endif + rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1); + #endif } __weak void board_setup_gpio(void) { @@ -81,16 +81,16 @@ namespace wirish { } __weak void board_setup_usb(void) { -#ifdef SERIAL_USB - -#ifdef GENERIC_BOOTLOADER +#ifdef SERIAL_USB + +#ifdef GENERIC_BOOTLOADER //Reset the USB interface on generic boards - developed by Victor PV gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_OUTPUT_PP); gpio_write_bit(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit,0); - + for(volatile unsigned int i=0;i<512;i++);// Only small delay seems to be needed, and USB pins will get configured in Serial.begin gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_INPUT_FLOATING); -#endif +#endif Serial.begin();// Roger Clark. Changed SerialUSB to Serial for Arduino sketch compatibility #endif diff --git a/buildroot/share/tests/STM32F103RC_cc_meeb_3dp-tests b/buildroot/share/tests/STM32F103RC_meeb-tests similarity index 100% rename from buildroot/share/tests/STM32F103RC_cc_meeb_3dp-tests rename to buildroot/share/tests/STM32F103RC_meeb-tests diff --git a/platformio.ini b/platformio.ini index fa27fb9a9a..a8948024b8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -282,7 +282,7 @@ monitor_speed = 115200 # # MEEB_3DP (STM32F103RCT6 with 512K) # -[env:STM32F103RC_cc_meeb_3dp] +[env:STM32F103RC_meeb] platform = ${common_stm32f1.platform} extends = common_stm32f1 board = MEEB_3DP