MEEB cleanup, whitespace

Followup to #18138
This commit is contained in:
Scott Lahteine 2020-05-31 02:12:29 -05:00
parent ad08722d0d
commit c9a260ee12
11 changed files with 28 additions and 29 deletions

View File

@ -49,6 +49,7 @@ jobs:
- STM32F103RE_btt - STM32F103RE_btt
- STM32F103RE_btt_USB - STM32F103RE_btt_USB
- STM32F103RC_fysetc - STM32F103RC_fysetc
- STM32F103RC_meeb
- jgaurora_a5s_a1 - jgaurora_a5s_a1
- STM32F103VE_longer - STM32F103VE_longer
- STM32F407VE_black - STM32F407VE_black

View File

@ -535,7 +535,7 @@
#elif MB(MKS_ROBIN_E3) #elif MB(MKS_ROBIN_E3)
#include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3 #include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3
#elif MB(CCROBOT_MEEB_3DP) #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 // ARM Cortex-M4F

View File

@ -13,7 +13,7 @@ print(projenv)
config = configparser.ConfigParser() config = configparser.ConfigParser()
config.read("platformio.ini") 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)) #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": if define[0] == "STM32_FLASH_SIZE":
flash_size = define[1] 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)) 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") 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 env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script
elif flag == "-T": elif flag == "-T":
env["LINKFLAGS"][i + 1] = custom_ld_script env["LINKFLAGS"][i + 1] = custom_ld_script

View File

@ -27,8 +27,8 @@ assert os.path.isdir(source_dir)
if os.path.isdir(variant_dir): if os.path.isdir(variant_dir):
shutil.rmtree(variant_dir) shutil.rmtree(variant_dir)
if not os.path.isdir(variant_dir): if not os.path.isdir(variant_dir):
os.mkdir(variant_dir) os.mkdir(variant_dir)
copytree(source_dir, variant_dir) copytree(source_dir, variant_dir)

View File

@ -73,19 +73,19 @@ void boardInit(void) {
extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { 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. timer_dev *timer_device; Pin's timer device, if any.
const adc_dev *adc_device; ADC device, if any. const adc_dev *adc_device; ADC device, if any.
uint8 gpio_bit; Pin's GPIO port bit. uint8 gpio_bit; Pin's GPIO port bit.
uint8 timer_channel; Timer channel, or 0 if none. uint8 timer_channel; Timer channel, or 0 if none.
uint8 adc_channel; Pin ADC channel, or ADCx if none. uint8 adc_channel; Pin ADC channel, or ADCx if none.
*/ */
{&gpioa, &timer2, &adc1, 0, 1, 0}, /* PA0 */ {&gpioa, &timer2, &adc1, 0, 1, 0}, /* PA0 */
{&gpioa, &timer2, &adc1, 1, 2, 1}, /* PA1 */ {&gpioa, &timer2, &adc1, 1, 2, 1}, /* PA1 */
{&gpioa, &timer2, &adc1, 2, 3, 2}, /* PA2 */ {&gpioa, &timer2, &adc1, 2, 3, 2}, /* PA2 */
{&gpioa, &timer2, &adc1, 3, 4, 3}, /* PA3 */ {&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, NULL, &adc1, 5, 0, 5}, /* PA5 */
{&gpioa, &timer3, &adc1, 6, 1, 6}, /* PA6 */ {&gpioa, &timer3, &adc1, 6, 1, 6}, /* PA6 */
{&gpioa, &timer3, &adc1, 7, 2, 7}, /* PA7 */ {&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, 9, 2, ADCx}, /* PA9 */
{&gpioa, &timer1, NULL, 10, 3, ADCx}, /* PA10 */ {&gpioa, &timer1, NULL, 10, 3, ADCx}, /* PA10 */
{&gpioa, NULL, NULL, 11, 0, ADCx}, /* PA11 */ {&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, 13, 0, ADCx}, /* PA13 */
{&gpioa, NULL, NULL, 14, 0, ADCx}, /* PA14 */ {&gpioa, NULL, NULL, 14, 0, ADCx}, /* PA14 */
{&gpioa, NULL, NULL, 15, 0, ADCx}, /* PA15 */ {&gpioa, NULL, NULL, 15, 0, ADCx}, /* PA15 */
{&gpiob, &timer3, &adc1, 0, 3, 8}, /* PB0 */ {&gpiob, &timer3, &adc1, 0, 3, 8}, /* PB0 */
{&gpiob, &timer3, &adc1, 1, 4, 9}, /* PB1 */ {&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, 3, 0, ADCx}, /* PB3 */
{&gpiob, NULL, NULL, 4, 0, ADCx}, /* PB4 */ {&gpiob, NULL, NULL, 4, 0, ADCx}, /* PB4 */
{&gpiob, NULL, NULL, 5, 0, ADCx}, /* PB5 */ {&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, 3, 0, 13}, /* PC3 */
{&gpioc, NULL, &adc1, 4, 0, 14}, /* PC4 */ {&gpioc, NULL, &adc1, 4, 0, 14}, /* PC4 */
{&gpioc, NULL, &adc1, 5, 0, 15}, /* PC5 */ {&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, 7, 2, ADCx}, /* PC7 */
{&gpioc, &timer8, NULL, 8, 3, ADCx}, /* PC8 */ {&gpioc, &timer8, NULL, 8, 3, ADCx}, /* PC8 */
{&gpioc, &timer8, NULL, 9, 4, ADCx}, /* PC9 */ {&gpioc, &timer8, NULL, 9, 4, ADCx}, /* PC9 */
{&gpioc, NULL, NULL, 10, 0, ADCx}, /* PC10 UART4_TX/SDIO_D2 */ {&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, 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, 13, 0, ADCx}, /* PC13 TAMPER-RTC */
{&gpioc, NULL, NULL, 14, 0, ADCx}, /* PC14 OSC32_IN */ {&gpioc, NULL, NULL, 14, 0, ADCx}, /* PC14 OSC32_IN */
{&gpioc, NULL, NULL, 15, 0, ADCx}, /* PC15 OSC32_OUT */ {&gpioc, NULL, NULL, 15, 0, ADCx}, /* PC15 OSC32_OUT */

View File

@ -1,5 +1,5 @@
/* /*
* Linker script for Generic STM32F103RB boards. * Linker script for Generic STM32F103RB boards.
*/ */
MEMORY MEMORY
{ {

View File

@ -1,5 +1,5 @@
/* /*
* Linker script for Generic STM32F103RC boards. * Linker script for Generic STM32F103RC boards.
*/ */
MEMORY MEMORY
{ {

View File

@ -1,5 +1,5 @@
/* /*
* Linker script for Generic STM32F103RE boards. * Linker script for Generic STM32F103RE boards.
*/ */
MEMORY MEMORY
{ {

View File

@ -72,8 +72,8 @@ namespace wirish {
#if F_CPU == 72000000 #if F_CPU == 72000000
rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5); rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
#elif F_CPU == 48000000 #elif F_CPU == 48000000
rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1); rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1);
#endif #endif
} }
__weak void board_setup_gpio(void) { __weak void board_setup_gpio(void) {
@ -81,16 +81,16 @@ namespace wirish {
} }
__weak void board_setup_usb(void) { __weak void board_setup_usb(void) {
#ifdef SERIAL_USB #ifdef SERIAL_USB
#ifdef GENERIC_BOOTLOADER #ifdef GENERIC_BOOTLOADER
//Reset the USB interface on generic boards - developed by Victor PV //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_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); 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 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); 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 Serial.begin();// Roger Clark. Changed SerialUSB to Serial for Arduino sketch compatibility
#endif #endif

View File

@ -282,7 +282,7 @@ monitor_speed = 115200
# #
# MEEB_3DP (STM32F103RCT6 with 512K) # MEEB_3DP (STM32F103RCT6 with 512K)
# #
[env:STM32F103RC_cc_meeb_3dp] [env:STM32F103RC_meeb]
platform = ${common_stm32f1.platform} platform = ${common_stm32f1.platform}
extends = common_stm32f1 extends = common_stm32f1
board = MEEB_3DP board = MEEB_3DP