Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: OpenCM9.04 IDE Problems

  1. #11
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,286
    Images
    27
    Rep Power
    275

    Re: OpenCM9.04 IDE Problems

    If there is a sketch running already, then the download process does require the OpenCM to do a watchdog reset into the bootloader (handled in the SerialUSB receive data callback), but I do not recall it causing any problems on the stock xubuntu 64-bit 12.04 or windows 7 systems. The OpenCM core/sketch and OpenCM bootloader do use different USB device definitions, so the device number may increment but the comm port should not unless there is a serious problem.

    If you use the forced-startup-to-bootloader-for-programming (external pull-up resistor on CM-900; user-button on CM-904?) trick, then there should be no reboot or re-enumeration involved after the bootloader is entered. The watchdog reset and external pin state are both supposed to cause the board to remain in the bootloader indefinitely until it successfully programs its FLASH or receives some other command to enter TOSS mode, initiate another reset (non-watchdog), or start the sketch.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  2. Re: OpenCM9.04 IDE Problems

    Quote Originally Posted by tician View Post
    If there is a sketch running already, then the download process does require the OpenCM to do a watchdog reset into the bootloader (handled in the SerialUSB receive data callback), but I do not recall it causing any problems on the stock xubuntu 64-bit 12.04 or windows 7 systems. The OpenCM core/sketch and OpenCM bootloader do use different USB device definitions, so the device number may increment but the comm port should not unless there is a serious problem.

    If you use the forced-startup-to-bootloader-for-programming (external pull-up resistor on CM-900; user-button on CM-904?) trick, then there should be no reboot or re-enumeration involved after the bootloader is entered. The watchdog reset and external pin state are both supposed to cause the board to remain in the bootloader indefinitely until it successfully programs its FLASH or receives some other command to enter TOSS mode, initiate another reset (non-watchdog), or start the sketch.
    On my Linux system, once I have a program loaded and running the USB iManufacturer field is "ROBOTIS CO.,LTD.", and when in bootloader mode is "CM-900". Also a program can be consistently loaded once in bootloader mode as long as one gives the system and sketch enough time to remount the USB device after the reset.

    However if I attempt to load a program via Windows, it appears to wipe out the program (i.e. LED no longer flashes) and Linux reports iManufacturer as "CM-900" for both program and bootloader mode.

  3. Re: OpenCM9.04 IDE Problems

    Quote Originally Posted by vehemens View Post
    However if I attempt to load a program via Windows, it appears to wipe out the program (i.e. LED no longer flashes) and Linux reports iManufacturer as "CM-900" for both program and bootloader mode.
    Tracked the Windows 7 problem down to the "Renesas Electronics USB 3.0 Host Controller" driver. Once updated (per manufacturers recommendation) both OpenCm and RoboPlus Manager would load and run programs.

  4. Re: OpenCM9.04 IDE Problems

    This is a rather old thread, but I hope it is still alive. I have the same problem when downloading any code to the OpenCM 9.04c board. I am using Ubuntu 14.04 32b. The device is correctly identified when I plug it in:
    [65736.448298] cdc_acm 5-1:1.0: ttyACM1: USB ACM device
    [65812.932306] usb 5-1: USB disconnect, device number 15
    [65818.224104] usb 5-1: new full-speed USB device number 16 using uhci_hcd
    [65818.390157] usb 5-1: New USB device found, idVendor=fff1, idProduct=ff48
    [65818.390167] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [65818.390175] usb 5-1: Product: ROBOTIS Virtual COM Port
    [65818.390181] usb 5-1: Manufacturer: CM-900
    [65818.393281] cdc_acm 5-1:1.0: This device cannot do calls on its own. It is not a modem.
    [65818.393333] cdc_acm 5-1:1.0: ttyACM0: USB ACM device
    I added my user to the dialout group so that I don't need to change permissions (I tried changing permissions anyways).
    Pressing the board button while connecting does not help.
    The only way to do something is to boot my PC on Windows 7, press the board button when connecting, restore the firmware of the board using RPlus (it also takes some attempts until it recognizes the board and I can reset the initial configuration) and then download code to it (also requires several attempts). However, I would really like to download code from Linux/Ubuntu.
    Any hint what could cause the problem? Maybe the configuration of the serial communication? The librxtxserial.so library?

    Thanks

  5. #15

    Re: OpenCM9.04 IDE Problems

    Note that switch from ttyACM1 to ttyACM0.
    The way that the OpenCM changes devices when it goes into bootloader mode may race with the re-assignment of TTY device numbers, and thus you may need to re-specify a different device name.
    If you want to work around that, try looking for specifics of the device, and writing udev rules that forces the name to something specific.

  6. Re: OpenCM9.04 IDE Problems

    Thanks for your hint. However I already rejected that possibility by creating a udev rule and checking the existing ttyACMX ports.

    I was playing around with the Python downloader by trician and found some interesting things:
    - initially, the Python script was always hanging when changing into bootloader mode
    - I outputted the response of the board and found the problem: even if the mode switch works, the response of the board to the 'AC' command is something like '-\nOK\r\n-', but with random characters missing, sometimes missing the O or the K.
    - I circumvented that problem and a similar problem appears when sending 'AC&LD' (it should return 'READY' but always returns 'RADY') and at the end of the download (it should return 'SUCCESS' but I receive always ' SCCESS').
    - I changed the expected return messages to these experimental values and everything works. Of course, I can only do this in tician's Python code, the opencm IDE expects the regular strings and therefore can't go on.

    I tried changing the port properties, including timeout and bps, but the received messages are still weird (missing characters).

    I will do some other experiments later. At least with this workaround I can download to the board using the Python script.

    Any ideas?

  7. #17
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,286
    Images
    27
    Rep Power
    275

    Re: OpenCM9.04 IDE Problems

    If the script succeeds in pushing the firmware to the OpenCM (checksum matches and sketch works as expected) despite always producing the same faulty responses, then it is possible that the bootloader of the OpenCM has been slightly corrupted. Not sure how you are checking the responses, but if the response strings in the bootloader had characters erroneously replaced with NULL then it might appear to be a missing character when printed out. I do not recall the STM32 having any dedicated, write-protected memory for storing a bootloader, so possible it has been modified by a sketch storing data in FLASH or by the bootloader with a malformed binary upload (attempted a write to wrong address and modified itself).

    The bootloader can be re-uploaded using the JTAG dongle sold in the Trossen Robotics shop for use with the Arbotix-Pro to push the bootloader file available in the OpenCM repository on github. Any other JTAG/SWD dongle should be able to upload the bootloader with OpenOCD, but I suspect only the STM dongle would actually work with the STM uploader program that is guaranteed to be able to upload the bootloader to the OpenCM.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  8. Re: OpenCM9.04 IDE Problems

    That is the first strange thing: the faulty responses are only consistent for 'ready'->'rady' and 'success'->'sccess'. The faulty 'OK' response is misses random characters, sometimes is complete, sometimes is 'K', sometimes '- OK'...
    Unfortunately I do not have a JTAG dongle. Is there any other way to restore the bootloader via USB? If STM32 doesn't have separate memories, couldn't I rewrite the bootloader through a sketch? Something like this: https://github.com/Gregwar/maple-bootloader-robotis (if I understand correctly what it does)?

  9. Re: OpenCM9.04 IDE Problems

    Or like this? http://support.robotis.com/en/produc...re_upgrade.htm

    Do I really need a special hardware? Am I mixing bootloader and firmware and they are completely different things? Can a compiled sketch be consider a firmware?

    Sorry for the many questions, and thank you for your help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Robotis OpenCM9.04 need help.
    By ErikVH in forum Robot Computers
    Replies: 6
    Last Post: 11-19-2014, 11:25 AM
  2. Question(s) OpenCM9.04 ROM Overflow
    By horchler in forum Robot Computers
    Replies: 0
    Last Post: 08-18-2014, 06:10 PM
  3. OpenCM9.04 USB Serial Tosser Help
    By baronaaron in forum Arbotix, Microcontrollers, Arduino
    Replies: 38
    Last Post: 03-23-2014, 08:34 PM
  4. Robotis OpenCM9.04 need help.
    By Hari in forum Robot Computers
    Replies: 38
    Last Post: 03-10-2014, 12:21 PM
  5. Robotis OpenCM9.04
    By TXBDan in forum Robot Computers
    Replies: 9
    Last Post: 01-28-2014, 10:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •