robotis-pandora / ROBOTIS-OpenCM

Open-source robot controller platform
www.robotsource.org
23 stars 34 forks source link

Uploader tool? #1

Open Gregwar opened 10 years ago

Gregwar commented 10 years ago

Hi,

It look like you've embedded your uploading code directly in your java mod of processing (cf https://github.com/robotis-pandora/ROBOTIS-OpenCM/blob/master/OpenCM_ide/processing-head/app/src/processing/app/Editor.java#L2612 and so)

I think having an external tool to do this, written in python for instance (like the arduino's avrdude) would be better, because it would allow some users programming the board without using the IDE.

BTW, why don't you use the maple bootloader, since your library is based on Maple? This way, provided dfu-util would be enough to program the board.

Gregwar commented 10 years ago

(I will likely try to put the maple bootloader on my CM900)

Gregwar commented 10 years ago

After some really minor changes, i've successfully ported the leaflabs USB bootloader (https://github.com/leaflabs/maple-bootloader) on my CM900, and it's working.

robotis-pandora commented 10 years ago

Hi Thank you for a great offer. Yes OpenCM and CM-900 is based on the leaflabs. but we dont want to use external tools like ufu-util or stm32loader. In korea, People do not tend to use python. Anyway, i will consider your suggestion. Thank you.

Gregwar commented 10 years ago

Hello, I've made a fork of the maple-bootloader for robotis: https://github.com/Gregwar/maple-bootloader-robotis

The CM900 bootloader is working, and I'm waiting to have my own OpenCM9.04 to make it work on it. I just changed the usb disconnect and led pin, and added some delays on USB disconnect.

(Actually, I'm doing that because we like writing bare C++ and using Makefiles instead of processing-like environments ;-))

robotis-pandora commented 10 years ago

Wow. Does it work with ROBOTIS IDE?? I think it dont work with our S/W. only Maple IDE is possible.

Gregwar commented 10 years ago

No, it doesn't work. But it could if this IDE used dfu-util instead of custom java code

fuzzyTew commented 7 years ago

Would this uploader work to allow using https://github.com/sudar/Arduino-Makefile with OpenCM boards? I have code written in C++11 I would like to use, and the IDE supports only C++98.

Gregwar commented 7 years ago

@fuzzyTew I wrote a python script to load binary code using ROBOTIS bootloader, you can find it there: https://github.com/Rhoban/Maple/blob/master/LibMaple/support/scripts/robotis-loader.py

The usage is simple:

./robotis-loader.py [SerialPort] [.bin File]
fuzzyTew commented 7 years ago

@Gregwar thanks so much !

Do you know if there is a more recent toolchain available somewhere than the one included with the Robotis IDE?

fuzzyTew commented 7 years ago

To answer my own question for future googlers, the package gcc-arm-none-eabi is available for most linux distributions which seems to replace the toolchain included with the Robotis IDE; however, I haven't tried uploading to a live board yet. Keeping my board packaged until I have something that might work in case I need to return it.

Gregwar commented 7 years ago

You can do:

sudo apt-get install libstdc++-arm-none-eabi-newlib gcc-arm-none-eabi libnewlib-arm-none-eabi binutils-arm-none-eabi

Then:

git clone https://github.com/Rhoban/Maple.git

Copy the skeleton:

cd Maple
cp -R skeleton myProject
cd myProject/

Edit the Makefile and replace:

BOARD ?= maple_mini
(...)
BOOTLOADER ?= maple

With:

BOARD ?= opencm904
(...)
BOOTLOADER ?= robotis

Then:

make
make install

You may also want to change the BOOTLOADER_PORT depending on your setup

fuzzyTew commented 7 years ago

thank you so much! is this library api documented anywhere? I'm trying to get the 'hello world' sample to function, but I can't seem to get anything on the usb serial port. what baud should I be using? is there a preferred serial monitor tool?

Gregwar commented 7 years ago

http://docs.leaflabs.com/static.leaflabs.com/pub/leaflabs/maple-docs/0.0.12/index-2.html

Yes I implemented a terminal to monitor and change variable You can give a try to the Metabot Firmware, the one from the V1 branch uses an opencm904 board: https://github.com/Rhoban/Metabot/tree/v1/firmware/src

You can define parameters:

https://github.com/Rhoban/Metabot/blob/v1/firmware/src/motion.cpp#L57

And commands:

https://github.com/Rhoban/Metabot/blob/v1/firmware/src/motion.cpp#L81