Skip to content
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. STM32?
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

STM32?

Scheduled Pinned Locked Moved General Discussion
82 Posts 19 Posters 34.4k Views 19 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O ooznerol

    Hi all, Can somebody help me please?

    I add also some STM32 blue pill and try to run mysensors on them.
    I use the devlopment branch. Compilation is OK and I successfully flash it on my board with STLink.
    But I don't see any message/log. I am not sure that the software is runnning.
    How can I debug that?

    thansk

    F Offline
    F Offline
    freynder
    wrote on last edited by freynder
    #54

    @ooznerol : it's been a while but I've had some issues with this as well. Here are some pointers that may help you:

    If I remember correctly, it depends on the upload method which may set particular build flags. In my platformio configuration for example, I'm setting the following build flags:
    build_flags = -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER when using the stlink upload method. CONFIG_MAPLE_MINI_NO_DISABLE_DEBUG was necessary to preserve the SWD pins and SERIAL_USB creates a virtual UART for serial output to the USB port. If Serial_USB is not set then the hardware serial is being used. Which one? According to https://github.com/rogerclarkmelbourne/STM32duino-bootloader/issues/8 it depends on the fact that you are using a bootloader or not, so serial1 (PA9/PA10) or serial2 (PA2/PA3).

    Also, if you experience issues with the USB connection, check the pullup resistor on D+ as indicated in http://wiki.stm32duino.com/index.php?title=Blue_Pill .

    I'm not sure what IDE/upload method/board library you are using. In any case, watching the output during upload to find out the build flags may be useful. If that does not help, then pls send me the details of your setup and I will try to test it myself.

    1 Reply Last reply
    2
    • O Offline
      O Offline
      ooznerol
      wrote on last edited by ooznerol
      #55

      Hi @freynder , and thanks for your help.

      I use Arduino IDE with stm32duino library to compile and upload . I haven't change the bootloader.
      This setup works without problem on my bluepill ( I had run several example without porblem, specialy to found which uart pin are used by stm32duino).

      I had a STLink connected to my blue pin (JTAG Clk/Data and SWO (and GND of course)).

      I have enable debug option : #define MY_DEBUG and #define MY_DEBUG_VERBOSE_RF24

      Here is the output of my compilation/upload :

      C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ooznerol\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ooznerol\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ooznerol\Documents\Arduino\libraries -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=STLinkMethod,cpu_speed=speed_72mhz,opt=osstd -ide-version=10803 -build-path C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727 -warnings=none -build-cache C:\Users\ooznerol\AppData\Local\Temp\arduino_cache_402979 -prefs=build.warn_data_percentage=75 -verbose C:\Users\ooznerol\Documents\Arduino\STM32Duino_MysensorsLightSensor\STM32Duino_MysensorsLightSensor.ino
      C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ooznerol\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ooznerol\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ooznerol\Documents\Arduino\libraries -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=STLinkMethod,cpu_speed=speed_72mhz,opt=osstd -ide-version=10803 -build-path C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727 -warnings=none -build-cache C:\Users\ooznerol\AppData\Local\Temp\arduino_cache_402979 -prefs=build.warn_data_percentage=75 -verbose C:\Users\ooznerol\Documents\Arduino\STM32Duino_MysensorsLightSensor\STM32Duino_MysensorsLightSensor.ino
      Using board 'genericSTM32F103C' from platform in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1
      Using core 'maple' from platform in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1
      WARNING: Spurious .ci folder in 'MySensors' library
      WARNING: Spurious .mystools folder in 'MySensors' library
      WARNING: Spurious .mystools folder in 'MySensors' library
      Detecting libraries used...
      "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
      "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
      "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
      "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
      Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM\EEPROM.cpp
      Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM\flash_stm32.c
      Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src\SPI.cpp
      Generating function prototypes...
      "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\preproc\ctags_target_for_gcc_minus_e.cpp"
      "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\preproc\ctags_target_for_gcc_minus_e.cpp"
      Compiling sketch...
      "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11 -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp.o"
      Compiling libraries...
      Compiling library "MySensors-development"
      Compiling library "EEPROM"
      Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\flash_stm32.c.o
      Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\EEPROM.cpp.o
      Compiling library "SPI"
      Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\SPI\SPI.cpp.o
      Compiling core...
      Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start.S.o
      Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start_c.c.o
      Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\syscalls.c.o
      Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\board.cpp.o
      Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards.cpp.o
      Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards_setup.cpp.o
      Using precompiled core
      Linking everything together...
      "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -Os -Wl,--gc-sections  -mcpu=cortex-m3 "-TC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c/ld/jtag_c8.ld" "-Wl,-Map,C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.map" "-LC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c/ld" -o "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.elf" "-LC:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\flash_stm32.c.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\EEPROM.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\SPI\SPI.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start.S.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start_c.c.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\syscalls.c.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\board.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards_setup.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/..\arduino_cache_402979\core\core_Arduino_STM32_STM32F1_genericSTM32F103C_device_variant_STM32F103C8,upload_method_STLinkMethod,cpu_speed_speed_72mhz,opt_osstd_dd5e5f7edaf4f0539408738d9cfc05e4.a" -Wl,--end-group
      "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary  "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.elf" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.bin"
      Multiple libraries were found for "MySensors.h"
       Used: C:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development
       Not used: C:\Users\ooznerol\Documents\Arduino\libraries\Mysensors-rfm69_update2
      Using library MySensors-development at version 2.2.0-beta in folder: C:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development 
      Using library EEPROM in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM (legacy)
      Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI 
      Sketch uses 46576 bytes (71%) of program storage space. Maximum is 65536 bytes.
      Global variables use 4432 bytes (21%) of dynamic memory, leaving 16048 bytes for local variables. Maximum is 20480 bytes.
      C:\Program Files (x86)\Arduino\hardware\Arduino_STM32/tools/win/stlink_upload.bat COM8 {upload.altID} {upload.usbID} C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.bin 
      STM32 ST-LINK CLI v2.1.0
      STM32 ST-LINK Command Line Interface
      
      ST-LINK SN : 49FF6E065178505040351687
      ST-LINK Firmware version : V2J28S0
      Connected via SWD.
      SWD Frequency = 1800K.
      Connection mode : Normal.
      Device ID:0x446 
      Device flash Size : 512 Kbytes
      Device family :STM32F302xE/F303xE/F398xx
      
      Loading file...
      Flash Programming:
        File : C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\STM32Duino_MysensorsLightSensor.ino.bin
        Address : 0x08000000
      Flash memory programming...
      ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± 0%
       0%ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%
      Flash memory programmed in 2s and 995ms.
      Programming Complete.
      
      MCU Reset.
      
      Application started.
      
      

      thanks for your help

      F 2 Replies Last reply
      0
      • O ooznerol

        Hi @freynder , and thanks for your help.

        I use Arduino IDE with stm32duino library to compile and upload . I haven't change the bootloader.
        This setup works without problem on my bluepill ( I had run several example without porblem, specialy to found which uart pin are used by stm32duino).

        I had a STLink connected to my blue pin (JTAG Clk/Data and SWO (and GND of course)).

        I have enable debug option : #define MY_DEBUG and #define MY_DEBUG_VERBOSE_RF24

        Here is the output of my compilation/upload :

        C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ooznerol\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ooznerol\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ooznerol\Documents\Arduino\libraries -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=STLinkMethod,cpu_speed=speed_72mhz,opt=osstd -ide-version=10803 -build-path C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727 -warnings=none -build-cache C:\Users\ooznerol\AppData\Local\Temp\arduino_cache_402979 -prefs=build.warn_data_percentage=75 -verbose C:\Users\ooznerol\Documents\Arduino\STM32Duino_MysensorsLightSensor\STM32Duino_MysensorsLightSensor.ino
        C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ooznerol\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ooznerol\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ooznerol\Documents\Arduino\libraries -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=STLinkMethod,cpu_speed=speed_72mhz,opt=osstd -ide-version=10803 -build-path C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727 -warnings=none -build-cache C:\Users\ooznerol\AppData\Local\Temp\arduino_cache_402979 -prefs=build.warn_data_percentage=75 -verbose C:\Users\ooznerol\Documents\Arduino\STM32Duino_MysensorsLightSensor\STM32Duino_MysensorsLightSensor.ino
        Using board 'genericSTM32F103C' from platform in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1
        Using core 'maple' from platform in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1
        WARNING: Spurious .ci folder in 'MySensors' library
        WARNING: Spurious .mystools folder in 'MySensors' library
        WARNING: Spurious .mystools folder in 'MySensors' library
        Detecting libraries used...
        "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
        "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
        "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
        "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
        Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM\EEPROM.cpp
        Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM\flash_stm32.c
        Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src\SPI.cpp
        Generating function prototypes...
        "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\preproc\ctags_target_for_gcc_minus_e.cpp"
        "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\preproc\ctags_target_for_gcc_minus_e.cpp"
        Compiling sketch...
        "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11 -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp.o"
        Compiling libraries...
        Compiling library "MySensors-development"
        Compiling library "EEPROM"
        Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\flash_stm32.c.o
        Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\EEPROM.cpp.o
        Compiling library "SPI"
        Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\SPI\SPI.cpp.o
        Compiling core...
        Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start.S.o
        Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start_c.c.o
        Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\syscalls.c.o
        Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\board.cpp.o
        Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards.cpp.o
        Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards_setup.cpp.o
        Using precompiled core
        Linking everything together...
        "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -Os -Wl,--gc-sections  -mcpu=cortex-m3 "-TC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c/ld/jtag_c8.ld" "-Wl,-Map,C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.map" "-LC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c/ld" -o "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.elf" "-LC:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\flash_stm32.c.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\EEPROM.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\SPI\SPI.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start.S.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start_c.c.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\syscalls.c.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\board.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards_setup.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/..\arduino_cache_402979\core\core_Arduino_STM32_STM32F1_genericSTM32F103C_device_variant_STM32F103C8,upload_method_STLinkMethod,cpu_speed_speed_72mhz,opt_osstd_dd5e5f7edaf4f0539408738d9cfc05e4.a" -Wl,--end-group
        "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary  "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.elf" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.bin"
        Multiple libraries were found for "MySensors.h"
         Used: C:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development
         Not used: C:\Users\ooznerol\Documents\Arduino\libraries\Mysensors-rfm69_update2
        Using library MySensors-development at version 2.2.0-beta in folder: C:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development 
        Using library EEPROM in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM (legacy)
        Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI 
        Sketch uses 46576 bytes (71%) of program storage space. Maximum is 65536 bytes.
        Global variables use 4432 bytes (21%) of dynamic memory, leaving 16048 bytes for local variables. Maximum is 20480 bytes.
        C:\Program Files (x86)\Arduino\hardware\Arduino_STM32/tools/win/stlink_upload.bat COM8 {upload.altID} {upload.usbID} C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.bin 
        STM32 ST-LINK CLI v2.1.0
        STM32 ST-LINK Command Line Interface
        
        ST-LINK SN : 49FF6E065178505040351687
        ST-LINK Firmware version : V2J28S0
        Connected via SWD.
        SWD Frequency = 1800K.
        Connection mode : Normal.
        Device ID:0x446 
        Device flash Size : 512 Kbytes
        Device family :STM32F302xE/F303xE/F398xx
        
        Loading file...
        Flash Programming:
          File : C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\STM32Duino_MysensorsLightSensor.ino.bin
          Address : 0x08000000
        Flash memory programming...
        ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± 0%
         0%ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%
        Flash memory programmed in 2s and 995ms.
        Programming Complete.
        
        MCU Reset.
        
        Application started.
        
        

        thanks for your help

        F Offline
        F Offline
        freynder
        wrote on last edited by freynder
        #56

        Hi @ooznerol ,

        Your output shows build tag SERIAL_USB so I would assume Serial outputs to USB.

        Did you connect the board using USB and try to read output from there? is USB recognized as a serial device? Is the pullup resistor on D+ correct (http://wiki.stm32duino.com/index.php?title=Blue_Pill)?

        1 Reply Last reply
        0
        • O ooznerol

          Hi @freynder , and thanks for your help.

          I use Arduino IDE with stm32duino library to compile and upload . I haven't change the bootloader.
          This setup works without problem on my bluepill ( I had run several example without porblem, specialy to found which uart pin are used by stm32duino).

          I had a STLink connected to my blue pin (JTAG Clk/Data and SWO (and GND of course)).

          I have enable debug option : #define MY_DEBUG and #define MY_DEBUG_VERBOSE_RF24

          Here is the output of my compilation/upload :

          C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ooznerol\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ooznerol\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ooznerol\Documents\Arduino\libraries -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=STLinkMethod,cpu_speed=speed_72mhz,opt=osstd -ide-version=10803 -build-path C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727 -warnings=none -build-cache C:\Users\ooznerol\AppData\Local\Temp\arduino_cache_402979 -prefs=build.warn_data_percentage=75 -verbose C:\Users\ooznerol\Documents\Arduino\STM32Duino_MysensorsLightSensor\STM32Duino_MysensorsLightSensor.ino
          C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ooznerol\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ooznerol\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ooznerol\Documents\Arduino\libraries -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=STLinkMethod,cpu_speed=speed_72mhz,opt=osstd -ide-version=10803 -build-path C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727 -warnings=none -build-cache C:\Users\ooznerol\AppData\Local\Temp\arduino_cache_402979 -prefs=build.warn_data_percentage=75 -verbose C:\Users\ooznerol\Documents\Arduino\STM32Duino_MysensorsLightSensor\STM32Duino_MysensorsLightSensor.ino
          Using board 'genericSTM32F103C' from platform in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1
          Using core 'maple' from platform in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1
          WARNING: Spurious .ci folder in 'MySensors' library
          WARNING: Spurious .mystools folder in 'MySensors' library
          WARNING: Spurious .mystools folder in 'MySensors' library
          Detecting libraries used...
          "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
          "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
          "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
          "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "nul"
          Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM\EEPROM.cpp
          Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM\flash_stm32.c
          Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src\SPI.cpp
          Generating function prototypes...
          "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\preproc\ctags_target_for_gcc_minus_e.cpp"
          "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\preproc\ctags_target_for_gcc_minus_e.cpp"
          Compiling sketch...
          "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11 -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10803 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103C8  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp" -o "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp.o"
          Compiling libraries...
          Compiling library "MySensors-development"
          Compiling library "EEPROM"
          Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\flash_stm32.c.o
          Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\EEPROM.cpp.o
          Compiling library "SPI"
          Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\SPI\SPI.cpp.o
          Compiling core...
          Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start.S.o
          Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start_c.c.o
          Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\syscalls.c.o
          Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\board.cpp.o
          Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards.cpp.o
          Using previously compiled file: C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards_setup.cpp.o
          Using precompiled core
          Linking everything together...
          "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -Os -Wl,--gc-sections  -mcpu=cortex-m3 "-TC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c/ld/jtag_c8.ld" "-Wl,-Map,C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.map" "-LC:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c/ld" -o "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.elf" "-LC:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\sketch\STM32Duino_MysensorsLightSensor.ino.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\flash_stm32.c.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\EEPROM\EEPROM.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\libraries\SPI\SPI.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start.S.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\start_c.c.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\syscalls.c.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\board.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\core\wirish\boards_setup.cpp.o" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/..\arduino_cache_402979\core\core_Arduino_STM32_STM32F1_genericSTM32F103C_device_variant_STM32F103C8,upload_method_STLinkMethod,cpu_speed_speed_72mhz,opt_osstd_dd5e5f7edaf4f0539408738d9cfc05e4.a" -Wl,--end-group
          "C:\Users\ooznerol\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary  "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.elf" "C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.bin"
          Multiple libraries were found for "MySensors.h"
           Used: C:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development
           Not used: C:\Users\ooznerol\Documents\Arduino\libraries\Mysensors-rfm69_update2
          Using library MySensors-development at version 2.2.0-beta in folder: C:\Users\ooznerol\Documents\Arduino\libraries\MySensors-development 
          Using library EEPROM in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\EEPROM (legacy)
          Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI 
          Sketch uses 46576 bytes (71%) of program storage space. Maximum is 65536 bytes.
          Global variables use 4432 bytes (21%) of dynamic memory, leaving 16048 bytes for local variables. Maximum is 20480 bytes.
          C:\Program Files (x86)\Arduino\hardware\Arduino_STM32/tools/win/stlink_upload.bat COM8 {upload.altID} {upload.usbID} C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727/STM32Duino_MysensorsLightSensor.ino.bin 
          STM32 ST-LINK CLI v2.1.0
          STM32 ST-LINK Command Line Interface
          
          ST-LINK SN : 49FF6E065178505040351687
          ST-LINK Firmware version : V2J28S0
          Connected via SWD.
          SWD Frequency = 1800K.
          Connection mode : Normal.
          Device ID:0x446 
          Device flash Size : 512 Kbytes
          Device family :STM32F302xE/F303xE/F398xx
          
          Loading file...
          Flash Programming:
            File : C:\Users\ooznerol\AppData\Local\Temp\arduino_build_618727\STM32Duino_MysensorsLightSensor.ino.bin
            Address : 0x08000000
          Flash memory programming...
          ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± 0%
           0%ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%
          Flash memory programmed in 2s and 995ms.
          Programming Complete.
          
          MCU Reset.
          
          Application started.
          
          

          thanks for your help

          F Offline
          F Offline
          freynder
          wrote on last edited by
          #57

          @ooznerol : when you say the examples ran without a problem, do you mean you had serial output from the examples but not from mysensors specifically?

          1 Reply Last reply
          0
          • O Offline
            O Offline
            ooznerol
            wrote on last edited by ooznerol
            #58

            HI @freynder ,

            I just realize that when you speak about SERIAL_USB you really speak about.....Serial through USB connector :grinning: .
            I believe you speak about Virtual Com Port through USB in ST-LINK.

            So I had change R10 on my blue pill and install maple driver.
            Now I have a Maple Serial COM mounted when I connect my blue pill with the USB connector :grinning: .

            And......................TADA.................It is working. I had output on my terminal.

            Thanks again:+1:

            F 1 Reply Last reply
            1
            • O Offline
              O Offline
              ooznerol
              wrote on last edited by
              #59

              Hi it's me again...............
              I have no problem with sensors sketch using RFM69.
              But I have a strange problem with the serial gateway ino.
              If I select the NRF24 radio (#define MY_RADIO_NRF24), I have some debug info on my terminal.
              But If I select RFM69 (#define MY_RADIO_RFM69), I have nothing.

              Is it normal?

              Thanks

              1 Reply Last reply
              0
              • gohanG Offline
                gohanG Offline
                gohan
                Mod
                wrote on last edited by
                #60

                do you have #define MY_DEBUG enabled?

                O 1 Reply Last reply
                0
                • gohanG gohan

                  do you have #define MY_DEBUG enabled?

                  O Offline
                  O Offline
                  ooznerol
                  wrote on last edited by
                  #61

                  @gohan Yes of course

                  I only modified the radio

                  1 Reply Last reply
                  0
                  • gohanG Offline
                    gohanG Offline
                    gohan
                    Mod
                    wrote on last edited by
                    #62

                    I have no idea then... I never used serial GW

                    1 Reply Last reply
                    0
                    • O ooznerol

                      HI @freynder ,

                      I just realize that when you speak about SERIAL_USB you really speak about.....Serial through USB connector :grinning: .
                      I believe you speak about Virtual Com Port through USB in ST-LINK.

                      So I had change R10 on my blue pill and install maple driver.
                      Now I have a Maple Serial COM mounted when I connect my blue pill with the USB connector :grinning: .

                      And......................TADA.................It is working. I had output on my terminal.

                      Thanks again:+1:

                      F Offline
                      F Offline
                      freynder
                      wrote on last edited by
                      #63

                      Hi @ooznerol,

                      Glad serial output is working now. Unfortunately I have no experience with serial gateway either, sorry.

                      O 1 Reply Last reply
                      0
                      • F freynder

                        Hi @ooznerol,

                        Glad serial output is working now. Unfortunately I have no experience with serial gateway either, sorry.

                        O Offline
                        O Offline
                        ooznerol
                        wrote on last edited by
                        #64

                        @freynder

                        Too bad...... Do you have any idea how we can debug this?

                        F 1 Reply Last reply
                        0
                        • O ooznerol

                          @freynder

                          Too bad...... Do you have any idea how we can debug this?

                          F Offline
                          F Offline
                          freynder
                          wrote on last edited by freynder
                          #65

                          @ooznerol

                          In general: isolating the problem and then tracing through the code. I understand you already isolated the problem to the combination of serial gateway and RFM69. First make sure this actually the case by uploading a sketch again you knew was working before with RFM69 (to eliminate any hardware / wiring issues that may have happened between your tests). If you can confirm that, you can start by looking at the code and find what is specific for the combination of these specific directives.

                          O 1 Reply Last reply
                          1
                          • F freynder

                            @ooznerol

                            In general: isolating the problem and then tracing through the code. I understand you already isolated the problem to the combination of serial gateway and RFM69. First make sure this actually the case by uploading a sketch again you knew was working before with RFM69 (to eliminate any hardware / wiring issues that may have happened between your tests). If you can confirm that, you can start by looking at the code and find what is specific for the combination of these specific directives.

                            O Offline
                            O Offline
                            ooznerol
                            wrote on last edited by
                            #66

                            @freynder

                            Instead facing through the code , I think about compile with a debugger (like IAR ou Keil for example). Do you think it is possible?

                            F 1 Reply Last reply
                            0
                            • O ooznerol

                              @freynder

                              Instead facing through the code , I think about compile with a debugger (like IAR ou Keil for example). Do you think it is possible?

                              F Offline
                              F Offline
                              freynder
                              wrote on last edited by
                              #67

                              @ooznerol No experience with those I'm afraid. From my notes I see I did experiment with using GDB in combination with a Black Magic Probe (BMP) to debug the blue pill. You can probably convert your SWD adapter to a BMP device:
                              https://madnessinthedarkness.transsys.com/blog:2017:0122_black_magic_probe_bmp_on_st-link_v2_clones
                              https://github.com/blacksphere/blackmagic/wiki

                              O 1 Reply Last reply
                              0
                              • F freynder

                                @ooznerol No experience with those I'm afraid. From my notes I see I did experiment with using GDB in combination with a Black Magic Probe (BMP) to debug the blue pill. You can probably convert your SWD adapter to a BMP device:
                                https://madnessinthedarkness.transsys.com/blog:2017:0122_black_magic_probe_bmp_on_st-link_v2_clones
                                https://github.com/blacksphere/blackmagic/wiki

                                O Offline
                                O Offline
                                ooznerol
                                wrote on last edited by ooznerol
                                #68

                                Hi all, it's me again.

                                So finally Gateway is working fine. The problem was that the driver (specially on windows) seems little bit unstable (I must open the serial just after strating and close it after I finish my test).

                                So now I am playing with consumption.

                                I take the low power implementation from freynder and reach 860uA. This implemenation used STOP mode. If I change this to STANDBY mode I reach 4.1uA. But in this case when I wake up, the CPU react as it has been reseted and relaunch all mysensors init and presenation etc etc . So the trick will be to check the wake up reason, and in case of wake up from standby not relaunch mysensors init. Do you think it is possible inside mysensors architecture?

                                Thanks

                                F 1 Reply Last reply
                                0
                                • O ooznerol

                                  Hi all, it's me again.

                                  So finally Gateway is working fine. The problem was that the driver (specially on windows) seems little bit unstable (I must open the serial just after strating and close it after I finish my test).

                                  So now I am playing with consumption.

                                  I take the low power implementation from freynder and reach 860uA. This implemenation used STOP mode. If I change this to STANDBY mode I reach 4.1uA. But in this case when I wake up, the CPU react as it has been reseted and relaunch all mysensors init and presenation etc etc . So the trick will be to check the wake up reason, and in case of wake up from standby not relaunch mysensors init. Do you think it is possible inside mysensors architecture?

                                  Thanks

                                  F Offline
                                  F Offline
                                  freynder
                                  wrote on last edited by
                                  #69

                                  @ooznerol I suppose you intend to run on battery? I desoldered the power led and voltage regulator on mine to reach 100uA (if readings were correct) using STOP mode. It ran on 2 AAA batteries for several months.

                                  I'm unsure about using the STANDBY mode. Since RAM and registers contents are lost and pins are high impedance, full reinitialization seems necessary. Do you want to prevent the presentation communication specifically from happening? You can control that from your sketch directly in the presentation function I suppose...

                                  O 1 Reply Last reply
                                  1
                                  • F freynder

                                    @ooznerol I suppose you intend to run on battery? I desoldered the power led and voltage regulator on mine to reach 100uA (if readings were correct) using STOP mode. It ran on 2 AAA batteries for several months.

                                    I'm unsure about using the STANDBY mode. Since RAM and registers contents are lost and pins are high impedance, full reinitialization seems necessary. Do you want to prevent the presentation communication specifically from happening? You can control that from your sketch directly in the presentation function I suppose...

                                    O Offline
                                    O Offline
                                    ooznerol
                                    wrote on last edited by
                                    #70

                                    @freynder Yes I have of course remove unless hardware. ( i can't reach 3.3uA with it). In STOP mode, we are suppose to reach around 20-30uA (from datasheet). I will try yo investigate

                                    I can of course handle reset cause into presentation, but I don't know if other init are done inside mysensors architecture.
                                    For STANDBY mode , we can save usefull data for mysensors into backup register. I had done something similar in the past but not in stm32duino environnement.

                                    Nca78N 1 Reply Last reply
                                    0
                                    • O ooznerol

                                      @freynder Yes I have of course remove unless hardware. ( i can't reach 3.3uA with it). In STOP mode, we are suppose to reach around 20-30uA (from datasheet). I will try yo investigate

                                      I can of course handle reset cause into presentation, but I don't know if other init are done inside mysensors architecture.
                                      For STANDBY mode , we can save usefull data for mysensors into backup register. I had done something similar in the past but not in stm32duino environnement.

                                      Nca78N Offline
                                      Nca78N Offline
                                      Nca78
                                      Hardware Contributor
                                      wrote on last edited by Nca78
                                      #71

                                      @ooznerol said in STM32?:

                                      I can of course handle reset cause into presentation, but I don't know if other init are done inside mysensors architecture.
                                      For STANDBY mode , we can save usefull data for mysensors into backup register. I had done something similar in the past but not in stm32duino environnement.

                                      Yes, before the presentation MySensors will initialize radio, check radio link/parent etc
                                      There's no easy way to avoid it at the moment, but I think it should be a feature request, as we have the same situation with chips like NRF51/NRF52 which are also ARM based, if you want really low power consumption you need to go through a reset and MySensors initialization phase makes the wake up slow and power hungry.

                                      1 Reply Last reply
                                      0
                                      • nagelcN Offline
                                        nagelcN Offline
                                        nagelc
                                        wrote on last edited by
                                        #72

                                        Just got a blue-pill, RFM69 node working. It was a bit of a learning curve moving from Atmega.

                                        • Cheap J-Link: Never got it working. Cheap ST-Link: Worked
                                        • Arduino (and VisualMicro) uploaded blink sketch with ST-Link: no problems
                                        • Uploaded the USB bootloader using the ST-Link: no problems
                                        • Took a while to figure out I didn't have the dfu driver loaded (Windows 10), but after that no problems using the usb
                                        • MySensors security personalizer: no problems.
                                        • Mock MySensors node: no problems. Talked to my gateway. Uses RFM69 encryption.

                                        Seems like this is the Nano of the future, but without needing to level shift for 3.3V. I'm looking forward to making some real blue pill nodes and gateways.

                                        1 Reply Last reply
                                        4
                                        • B Offline
                                          B Offline
                                          Brasletti
                                          wrote on last edited by
                                          #73

                                          Does anybody get the Serial Gateway with RS485 working? I can't get debug messages on serial console.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          10

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular