...
Connection between Arduino IDE and OpenCM 9.04
2018-04-10 21:47:27 peter_m

Hello,


I bought the OpenCM 9.04 board. I have already written some programs in the OpenCM IDE and everything worked fine.


But now I would like to switch to the Arduino IDE. I installed the Arduino IDE with the help of this manual, but the software cannot be transferred. I connected the board to Com5 and also selected Com5 in the Arduino IDE.



The following error occurs after comiling the first time:


stm321d ver 1.0.1

Unable to connect to bootloader

OpenCM Download Ver 1.0.4 2015.06.16

Fail to open port 1



After pressing the compile button several times the following error message appears:



Arduino: 1.8.5 (Windows 10), Board: "OpenCM9.04 Board, OpenCM Bootloader"


C:Program Files (x86)Arduinoarduino-builder -dump-prefs -logger=machine -hardware C:Program Files (x86)Arduinohardware -hardware ...AppDataLocalArduino15packages -tools C:Program Files (x86)Arduinotools-builder -tools C:Program Files (x86)Arduinohardwaretoolsavr -tools ...AppDataLocalArduino15packages -built-in-libraries C:Program Files (x86)Arduinolibraries -libraries ...DocumentsArduinolibraries -fqbn=OpenCM904:OpenCM904:OpenCM904:upload_method=UploadMethod -ide-version=10805 -build-path ...AppDataLocalTemparduino_build_445459 -warnings=all -build-cache ...AppDataLocalTemparduino_cache_487623 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.opencm_tools.path=...AppDataLocalArduino15packagesOpenCM904toolsopencm_tools.0.2 -prefs=runtime.tools.opencm_gcc.path=...AppDataLocalArduino15packagesOpenCM904toolsopencm_gcc5.4.0-2016q2 -verbose ...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0librariesOpenCM9.04examples1. Basicsb_Blink_LEDb_Blink_LED.ino

C:Program Files (x86)Arduinoarduino-builder -compile -logger=machine -hardware C:Program Files (x86)Arduinohardware -hardware ...AppDataLocalArduino15packages -tools C:Program Files (x86)Arduinotools-builder -tools C:Program Files (x86)Arduinohardwaretoolsavr -tools ...AppDataLocalArduino15packages -built-in-libraries C:Program Files (x86)Arduinolibraries -libraries ...DocumentsArduinolibraries -fqbn=OpenCM904:OpenCM904:OpenCM904:upload_method=UploadMethod -ide-version=10805 -build-path ...AppDataLocalTemparduino_build_445459 -warnings=all -build-cache ...AppDataLocalTemparduino_cache_487623 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.opencm_tools.path=...AppDataLocalArduino15packagesOpenCM904toolsopencm_tools.0.2 -prefs=runtime.tools.opencm_gcc.path=...AppDataLocalArduino15packagesOpenCM904toolsopencm_gcc5.4.0-2016q2 -verbose ...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0librariesOpenCM9.04examples1. Basicsb_Blink_LEDb_Blink_LED.ino

Using board 'OpenCM904' from platform in folder: ...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0

Using core 'arduino' from platform in folder: ...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0

Detecting libraries used...

"...AppDataLocalArduino15packagesOpenCM904toolsopencm_gcc5.4.0-2016q2/bin/arm-none-eabi-g++" -c -g -O2 -std=gnu++11 -Wno-write-strings -Wall  -ffunction-sections -fdata-sections  -fno-rtti -fno-exceptions -DARM_MATH_CM3 -DUSE_HAL_DRIVER -DBOARD_OpenCM904 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10805 -DARDUINO_OpenCM904 -DARDUINO_ARCH_OPENCM904     -mthumb  -DSTM32F103xB -D__OPENCM904__ "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/bsp/opencm" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/bsp/opencm/include" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/hw" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/hw/driver" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/hw/usb_cdc" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/lib/STM32F1xx_HAL_Driver/Inc/" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0coresarduino" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904" "...AppDataLocalTemparduino_build_445459sketchb_Blink_LED.ino.cpp" -o "nul"

Generating function prototypes...

"...AppDataLocalArduino15packagesOpenCM904toolsopencm_gcc5.4.0-2016q2/bin/arm-none-eabi-g++" -c -g -O2 -std=gnu++11 -Wno-write-strings -Wall  -ffunction-sections -fdata-sections  -fno-rtti -fno-exceptions -DARM_MATH_CM3 -DUSE_HAL_DRIVER -DBOARD_OpenCM904 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10805 -DARDUINO_OpenCM904 -DARDUINO_ARCH_OPENCM904     -mthumb  -DSTM32F103xB -D__OPENCM904__ "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/bsp/opencm" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/bsp/opencm/include" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/hw" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/hw/driver" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/hw/usb_cdc" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/lib/STM32F1xx_HAL_Driver/Inc/" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0coresarduino" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904" "...AppDataLocalTemparduino_build_445459sketchb_Blink_LED.ino.cpp" -o "...AppDataLocalTemparduino_build_445459preprocctags_target_for_gcc_minus_e.cpp"

"C:Program Files (x86)Arduinotools-builderctags5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "...AppDataLocalTemparduino_build_445459preprocctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"...AppDataLocalArduino15packagesOpenCM904toolsopencm_gcc5.4.0-2016q2/bin/arm-none-eabi-g++" -c -g -O2 -std=gnu++11 -Wno-write-strings  -MMD -ffunction-sections -fdata-sections  -fno-rtti -fno-exceptions -DARM_MATH_CM3 -DUSE_HAL_DRIVER -DBOARD_OpenCM904 -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10805 -DARDUINO_OpenCM904 -DARDUINO_ARCH_OPENCM904     -mthumb  -DSTM32F103xB -D__OPENCM904__ "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/bsp/opencm" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/bsp/opencm/include" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/hw" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/hw/driver" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/hw/usb_cdc" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/lib/STM32F1xx_HAL_Driver/Inc/" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0coresarduino" "-I...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904" "...AppDataLocalTemparduino_build_445459sketchb_Blink_LED.ino.cpp" -o "...AppDataLocalTemparduino_build_445459sketchb_Blink_LED.ino.cpp.o"

Compiling libraries...

Compiling core...

Using previously compiled file: ...AppDataLocalTemparduino_build_445459corebspopencmstartupstartup_stm32f103xb.S.o

Using previously compiled file: ...AppDataLocalTemparduino_build_445459corebspopencmbsp.c.o

Using previously compiled file: ...AppDataLocalTemparduino_build_445459corebspopencmstm32f1xx_hal_msp.c.o

Using previously compiled file: ...AppDataLocalTemparduino_build_445459corebspopencmstm32f1xx_it.c.o

Using previously compiled file: ...AppDataLocalTemparduino_build_445459corebspopencmsyscalls.c.o

Using previously compiled file: ...AppDataLocalTemparduino_build_445459corebspopencmsystem_stm32f1xx.c.o

Using previously compiled file: ...AppDataLocalTemparduino_build_445459coremain.cpp.o

Using previously compiled file: ...AppDataLocalTemparduino_build_445459corevariant.cpp.o

Using precompiled core

Linking everything together...

"...AppDataLocalArduino15packagesOpenCM904toolsopencm_gcc5.4.0-2016q2/bin/arm-none-eabi-g++" -Os -Wl,--gc-sections -mcpu=cortex-m3 "-T...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/bsp/opencm/ldscript/opencm_flash.ld" "-Wl,-Map,...AppDataLocalTemparduino_build_445459/b_Blink_LED.ino.map" "-L...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/ld" -o "...AppDataLocalTemparduino_build_445459/b_Blink_LED.ino.elf" "-L...AppDataLocalTemparduino_build_445459" --specs=nano.specs -u _printf_float -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-unresolved-symbols -Wl,--start-group "...AppDataLocalTemparduino_build_445459sketchb_Blink_LED.ino.cpp.o" "...AppDataLocalTemparduino_build_445459corebspopencmstartupstartup_stm32f103xb.S.o" "...AppDataLocalTemparduino_build_445459corebspopencmbsp.c.o" "...AppDataLocalTemparduino_build_445459corebspopencmstm32f1xx_hal_msp.c.o" "...AppDataLocalTemparduino_build_445459corebspopencmstm32f1xx_it.c.o" "...AppDataLocalTemparduino_build_445459corebspopencmsyscalls.c.o" "...AppDataLocalTemparduino_build_445459corebspopencmsystem_stm32f1xx.c.o" "...AppDataLocalTemparduino_build_445459coremain.cpp.o" "...AppDataLocalTemparduino_build_445459corevariant.cpp.o" "...AppDataLocalArduino15packagesOpenCM904hardwareOpenCM9041.1.0variantsOpenCM904/lib_f103.a" -Wl,--whole-archive "...AppDataLocalTemparduino_build_445459/..arduino_cache_487623corecore_OpenCM904_OpenCM904_OpenCM904_upload_method_UploadMethod_b1adafe2bafbb468394111dabae192a2.a" -Wl,--no-whole-archive -Wl,--end-group

"...AppDataLocalArduino15packagesOpenCM904toolsopencm_gcc5.4.0-2016q2/bin/arm-none-eabi-objcopy" -O binary  "...AppDataLocalTemparduino_build_445459/b_Blink_LED.ino.elf" "...AppDataLocalTemparduino_build_445459/b_Blink_LED.ino.bin"

Sketch uses 35060 bytes (30%) of program storage space. Maximum is 116736 bytes.

Global variables use 9124 bytes of dynamic memory.

...AppDataLocalArduino15packagesOpenCM904toolsopencm_tools.0.2/win/opencm9.04_ld.exe COM5 57600 ...AppDataLocalTemparduino_build_445459/b_Blink_LED.ino.bin 1 opencm 

An error occurred while uploading the sketch



//I replaced the path with three dots.


What can I do now?


Thanks for your help.

2018-04-10 21:47:27
peter_m
2018-04-10 22:41:48 Kurt

Sounds similar to some other recent threads, including: http://en.robotis.com/service/forum_view.php?bbs_no=2406740&slg=&page_type=&mode=&submode=


For example I had an older 904B (purchased early 2014), that would program fine with OpenCM but not Arduino IDE...  Turns out it had a really old bootloader on it, which is not compatible with the the Arduino IDE...     On the above thread, I mentioned how I was able to update mine, but could be risky...


Some of the steps I would do include:


a) Install R+ Manager.  See if it can connect to this board, and try to do a Firmware Recovery.  Go through the steps, where it tells you to plug in the board while holding the user button... See if it detects the bootloader... My newer ones did, my old one did not...  Hopefully this worked and you are able to build with Arduino... Would first try with simple program like blink


b) Maybe pickup a new 904c (or a) board... - They are pretty cheap.... I personally picked up a few extras.


c) Maybe a risky move - I found someone who developed a sketch that updated his bootloader to work with Maple build... I hacked up his program to use data I downloaded a binary dump of the bootloader of a newer board.  I then ran that sketch (in other thread), on the old board and then was able to use Arduino IDE on that board...  But again USE AT YOUR OWN RISK... If something goes wrong, you probably won't be able to use that board again, unless maybe you have a hardware programmer like the ST-LINK...


Good luck

2018-04-10 22:41:48
Kurt
2018-04-11 09:50:02 Will Son

Hello,


Please try downloading in Recovery Mode by holding down the User switch and press Reset button.

You should be able to see the solid green LED.


2018-04-11 09:50:02
Will Son
Reply
웹에디터 시작 웹 에디터 끝