diff --git a/STM32F4/boards.txt b/STM32F4/boards.txt index 939a3a4..6347581 100644 --- a/STM32F4/boards.txt +++ b/STM32F4/boards.txt @@ -79,7 +79,7 @@ netduino2plus.upload.dfuse_addr=0x8000000 netduino2plus.build.mcu=cortex-m4 netduino2plus.build.f_cpu=168000000L netduino2plus.build.core=maple -netduino2plus.build.extra_flags=-DMCU_STM32F406VG -mthumb -DSTM32_HIGH_DENSITY -DSTM32F2 -DSTM32F4 -DBOARD_discovery_f4 -DSTM32F407xx +netduino2plus.build.extra_flags=-DMCU_STM32F406VG -mthumb -DSTM32_HIGH_DENSITY -DSTM32F2 -DSTM32F4 -DBOARD_discovery_f4 -DARDUINO_STM32F4_NETDUINO2PLUS netduino2plus.build.ldscript=ld/jtag.ld netduino2plus.build.variant=discovery_f407 netduino2plus.build.variant_system_lib=lib_f407.a diff --git a/STM32F4/cores/maple/boards.cpp b/STM32F4/cores/maple/boards.cpp index ea46f2a..a856571 100644 --- a/STM32F4/cores/maple/boards.cpp +++ b/STM32F4/cores/maple/boards.cpp @@ -158,7 +158,6 @@ static void timerDefaultConfig(timer_dev *dev) { regs->PSC = 1; regs->SR = 0; regs->DIER = 0; - regs->EGR = TIMER_EGR_UG; switch (dev->type) { case TIMER_ADVANCED: @@ -176,5 +175,6 @@ static void timerDefaultConfig(timer_dev *dev) { break; } + regs->EGR = TIMER_EGR_UG; timer_resume(dev); } diff --git a/STM32F4/cores/maple/usb_serial.cpp b/STM32F4/cores/maple/usb_serial.cpp index d606855..cc726c2 100644 --- a/STM32F4/cores/maple/usb_serial.cpp +++ b/STM32F4/cores/maple/usb_serial.cpp @@ -149,7 +149,7 @@ void USBSerial::enableBlockingTx(void) { } void USBSerial::disableBlockingTx(void) { - usbEnableBlockingTx(); + usbDisableBlockingTx(); } USBSerial SerialUSB; diff --git a/tools/linux/stlink_upload b/tools/linux/stlink_upload index 24e528d..f0dd789 100755 --- a/tools/linux/stlink_upload +++ b/tools/linux/stlink_upload @@ -1,4 +1,8 @@ #!/bin/bash +$(dirname $0)/stlink/st-flash write "$4" 0x8000000 +exit 0 + +## Remove the lines 2 and 3 (above) if you want this script to wait until the Serial device has been enumerated and loaded before the script exits # Check for leaf device. function leaf_status()