Results 1 to 2 of 2

Thread: Open CM9.04 - Older Bootloaders?

  1. #1

    Open CM9.04 - Older Bootloaders?

    I have an older OpenCM9.04B board that I purchased back in March 2014. I never really used much, but when I started playing with it to maybe use it on the PhantomX using the Arduino IDE, the Arduino would fail to program this board. Likewise some of the different utilities I have tried such as R+Manager or RoboPlus, all fail to enter into the firmware recovery, saying that they can not find the bootloader... But Open_CM IDE programs the board just fine.

    Note: The Arduino IDE and the mentioned Utilities work fine on my newer boards (1 904C and 2 904A) boards.

    After discussions up on the Robotis Forum, I opened an issue: https://github.com/ROBOTIS-GIT/OpenC...ment-378094012

    I was curious, so wrote a quick and dirty sketch to dump the bootloader area of memory, to see if they were different:
    Code:
    #define DBGSerial SerialUSB
    #ifndef DEVICE_ID1 // Not defined on Open_CM IDE
    #define         DEVICE_ID1          (0x1FFFF7E8)
    #define         DEVICE_ID2          (0x1FFFF7EC)
    #define         DEVICE_ID3          (0x1FFFF7F0)
    #include <stdint.h>
    #endif
    uint8_t *bootloader_end = (uint8_t*)0x8002fff;
    uint8_t *addr = (uint8_t*)0x8000000;
    void setup() {
      pinMode(BOARD_LED_PIN, OUTPUT);
      pinMode(BOARD_BUTTON_PIN, INPUT_PULLDOWN);
      for (int i = 0; i < 10; i++) {
        digitalWrite(BOARD_LED_PIN, !digitalRead(BOARD_LED_PIN));
        delay(100);
      }
      //while (!DBGSerial && (millis() < 10000)) ; // wait up to 10 seconds for DBGSerial port
      //DBGSerial.begin(115200);
      delay(5000);  // Delay 5 seconds to allow user to start serial monitor;
      DBGSerial.print("Try to find end of Bootloader last char: ");
      uint8_t last_char = *bootloader_end;
      DBGSerial.print(last_char, HEX);
      DBGSerial.print(") size:");
    
      while (*bootloader_end == last_char) {
        bootloader_end--;
      }
      int bootloader_size = (int)(bootloader_end - addr) + 1;
      DBGSerial.println(bootloader_size, DEC);
      
    }
    
    void loop() {
      char ascii_data[17] = "                ";
      addr = (uint8_t*)0x8000000;
      DBGSerial.println("Press the User button on board");
      while (!digitalRead(BOARD_BUTTON_PIN)) ;
    
      DBGSerial.print("Start Memory dump SN:");
      DBGSerial.print(*(uint32_t*)DEVICE_ID1, HEX);
      DBGSerial.print(":");
      DBGSerial.print(*(uint32_t*)DEVICE_ID2, HEX);
      DBGSerial.print(":");
      DBGSerial.println(*(uint32_t*)DEVICE_ID3, HEX);
    
      
      while (addr <= bootloader_end) { // Maybe look at first 4K
        uint8_t b = *addr;
        if (b < 0x10) DBGSerial.print("0");
        DBGSerial.print(b, HEX);
        DBGSerial.print(" ");
        ascii_data[((uint32_t)addr & 0xf)] = ((b >= ' ') && (b <= '~'))? (char)b : '.';
        addr++;
        if (((uint32_t)addr & 0xf) == 0) {
          DBGSerial.print("- ");
          DBGSerial.println(ascii_data);
        }
      }
      DBGSerial.println("\n\n");
    
    }
    It also dumps the 96 bits of unique ID that each of these boards have, which currently is not used to generate a Serial number as part of the USB Descriptor, which is why all of them show up with same COM number on windows...

    The Issue up on github has the complete output:

    But the ones that work with the newer boards, has information like:
    Code:
    Try to find end of Bootloader last char: FF) size:12285
    Press the User button on board
    Start Memory dump SN:66DFF48:48518772:67095020
    00 50 00 20 69 1F 00 08 31 11 00 08 33 11 00 08 - .P. i...1...3...
    35 11 00 08 37 11 00 08 39 11 00 08 00 00 00 00 - 5...7...9.......
    00 00 00 00 00 00 00 00 00 00 00 00 3D 11 00 08 - ............=...
    3B 11 00 08 00 00 00 00 3F 11 00 08 41 11 00 08 - ;.......?...A...
    55 11 00 08 57 11 00 08 59 11 00 08 5B 11 00 08 - U...W...Y...[...
    5D 11 00 08 5F 11 00 08 61 11 00 08 63 11 00 08 - ]..._...a...c...
    65 11 00 08 67 11 00 08 69 11 00 08 00 00 00 00 - e...g...i.......
    ...
    04 01 02 03 04 06 07 08 09 02 04 06 08 0D 0A 53 - ...............S
    59 53 54 45 4D 20 4F 2E 4B 2E 20 28 4F 70 65 6E - YSTEM O.K. (Open
    43 4D 39 2E 30 34 20 42 6F 6F 74 20 6C 6F 61 64 - CM9.04 Boot load
    65 72 20 56 31 2E 30 33 29 00 0D 0A 43 6F 6D 6D - er V1.03)...Comm
    61 6E 64 20 3A 41 54 26 4C 44 2C 20 4C 28 6F 61 - and :AT&LD, L(oa
    64 29 2C 20 41 54 26 47 4F 2C 20 47 28 6F 29 2C - d), AT&GO, G(o),
    20 41 54 26 47 4D 2C 20 41 54 26 52 53 54 2C 20 -  AT&GM, AT&RST, 
    41 54 26 43 54 52 53 54 2C 20 41 54 26 4E 41 4D - AT&CTRST, AT&NAM
    45 2C 20 41 54 00 0D 0A 2D 00 41 54 26 4C 44 00 - E, AT...-.AT&LD.
    4C 00 0D 0A 20 52 6F 6C 6C 62 61 63 6B 20 46 61 - L... Rollback Fa
    69 6C 65 64 21 00 0D 0A 20 52 65 61 64 79 2E 2E - iled!... Ready..
    00 0D 0A 20 46 61 69 6C 65 64 21 00 0D 0A 20 4F - ... Failed!... O
    76 65 72 66 6C 6F 77 21 00 0D 0A 20 66 6C 61 73 - verflow!... flas
    68 20 77 72 69 74 69 6E 67 20 65 72 72 6F 72 21 - h writing error!
    00 53 75 63 63 65 73 73 2E 2E 00 46 61 69 6C 2E - .Success...Fail.
    2E 00 52 65 61 64 79 2E 2E 0A 00 53 75 63 63 65 - ..Ready....Succe
    73 73 2E 2E 0A 00 46 61 69 6C 2E 2E 0A 00 41 54 - ss....Fail....AT
    26 47 4F 00 47 00 41 54 26 47 4D 00 41 54 26 52 - &GO.G.AT&GM.AT&R
    53 54 00 41 54 26 43 54 52 53 54 00 0D 0A 45 45 - ST.AT&CTRST...EE
    50 52 4F 4D 20 43 6F 6E 74 72 6F 6C 20 74 61 62 - PROM Control tab
    6C 65 20 72 65 73 65 74 2E 00 41 54 26 4E 41 4D - le reset..AT&NAM
    45 00 43 4D 2D 39 30 34 0A 00 56 00 4E 6F 20 49 - E.CM-904..V.No I
    44 45 20 43 6F 6D 6D 61 6E 64 21 0D 0A 00 4F 4B - DE Command!...OK
    0A 00 44 65 74 65 63 74 20 50 69 6E 21 0D 0A 00 - ..Detect Pin!...
    01 1A 03 53 00 54 00 4D 00 33 00 32 00 31 00 30 - ...S.T.M.3.2.1.0
    00 00 00 00 00 00 00 00 00 00 00 00 13 12 00 08 - ................
    89 28 00 08 89 28 00 08 89 28 00 08 89 28 00 08 - .(...(...(...(..
    89 28 00 08 89 28 00 08 89 28 00 08 89 28 00 08 - .(...(...(...(..
    FD 12 00 08 89 28 00 08 89 28 00 08 89 28 00 08 - .....(...(...(..
    89 28 00 08 00 C2 01 00 00 00 08 00 41 2D 00 08 - .(..........A-..
    04 00 00 00 45 2D 00 08 12 00 00 00 57 2D 00 08 - ....E-......W-..
    32 00 00 00 01 00 00 20 1A 00 00 00 FE 2C 00 08 - 2...... .....,..
    43 00 00 00 EC 2C 00 08 12 00 00 00 99 16 00 08 - C....,..........
    B9 15 00 08 89 14 00 08 9D 14 00 08 A1 14 00 08 - ................
    05 15 00 08 2D 15 00 08 AD 15 00 08 A1 15 00 08 - ....-...........
    81 15 00 08 00 00 00 00 40 00 00 00 04 01 00 00 - [email protected]
    89 28 00 08 65 14 00 08 89 28 00 08 89 28 00 08 - .(..e....(...(..
    89 28 00 08 89 28 00 08 89 28 00 08 89 28 00 08 - .(...(...(...(..
    7D 14 00 08 FF FF FF FF FF FF FF FF 03
    As you see toward the bottom it shows that this is version 1.03 which the utilities show as well.

    However if you look at the older 904B
    Code:
    Try to find end of Bootloader last char: FF) size:10696
    Start Memory dump SN:671FF48:55526750:87243805
    00 50 00 20 A9 19 00 08 9D 0A 00 08 9F 0A 00 08 - .P. ............
    A1 0A 00 08 A3 0A 00 08 A5 0A 00 08 00 00 00 00 - ................
    00 00 00 00 00 00 00 00 00 00 00 00 A9 0A 00 08 - ................
    A7 0A 00 08 00 00 00 00 AB 0A 00 08 AD 0A 00 08 - ................
    C1 0A 00 08 C3 0A 00 08 C5 0A 00 08 C7 0A 00 08 - ................
    C9 0A 00 08 CB 0A 00 08 CD 0A 00 08 CF 0A 00 08 - ................
    D1 0A 00 08 D3 0A 00 08 D5 0A 00 08 00 00 00 00 - ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
    ...
    04 03 09 04 12 03 43 00 4D 00 2D 00 39 00 30 00 - ......C.M.-.9.0.
    30 00 20 00 20 00 00 00 32 03 52 00 4F 00 42 00 - 0. . ...2.R.O.B.
    4F 00 54 00 49 00 53 00 20 00 56 00 69 00 72 00 - O.T.I.S. .V.i.r.
    74 00 75 00 61 00 6C 00 20 00 43 00 4F 00 4D 00 - t.u.a.l. .C.O.M.
    20 00 50 00 6F 00 72 00 74 00 00 00 00 00 00 00 -  .P.o.r.t.......
    01 02 03 04 01 02 03 04 06 07 08 09 02 04 06 08 - ................
    41 54 26 4C 44 00 52 65 61 64 79 2E 2E 0A 00 53 - AT&LD.Ready....S
    75 63 63 65 73 73 2E 2E 0A 00 46 61 69 6C 2E 2E - uccess....Fail..
    0A 00 41 54 26 47 4F 00 41 54 26 52 53 54 00 41 - ..AT&GO.AT&RST.A
    54 26 54 4F 53 53 00 54 4F 53 53 20 4D 4F 44 45 - T&TOSS.TOSS MODE
    20 4F 4B 0D 0A 20 00 41 54 26 4E 41 4D 45 00 43 -  OK.. .AT&NAME.C
    4D 2D 39 2E 30 34 0A 00 4E 6F 20 49 44 45 20 43 - M-9.04..No IDE C
    6F 6D 6D 61 6E 64 21 0D 0A 00 4F 4B 0A 00 0D 0A - ommand!...OK....
    20 44 6F 77 6E 6C 6F 61 64 20 46 61 69 6C 65 64 -  Download Failed
    21 00 0D 0A 20 44 6F 77 6E 6C 6F 61 64 20 4F 76 - !... Download Ov
    65 72 66 6C 6F 77 21 00 0D 0A 20 66 6C 61 73 68 - erflow!... flash
    20 77 72 69 74 69 6E 67 20 65 72 72 6F 72 21 00 -  writing error!.
    01 00 00 00 1A 03 53 00 54 00 4D 00 33 00 32 00 - ......S.T.M.3.2.
    31 00 30 00 00 00 00 00 00 00 00 00 00 00 00 00 - 1.0.............
    AD 0B 00 08 C1 1C 00 08 C1 1C 00 08 C1 1C 00 08 - ................
    C1 1C 00 08 C1 1C 00 08 C1 1C 00 08 C1 1C 00 08 - ................
    C1 1C 00 08 B9 0C 00 08 C1 1C 00 08 C1 1C 00 08 - ................
    C1 1C 00 08 C1 1C 00 08 00 C2 01 00 00 00 08 00 - ................
    D0 27 00 08 04 00 00 00 D4 27 00 08 12 00 00 00 - .'.......'......
    E8 27 00 08 32 00 00 00 04 00 00 20 1A 00 00 00 - .'..2...... ....
    8C 27 00 08 43 00 00 00 78 27 00 08 12 00 00 00 - .'..C...x'......
    CD 0F 00 08 ED 0E 00 08 BD 0D 00 08 D1 0D 00 08 - ................
    D5 0D 00 08 35 0E 00 08 59 0E 00 08 E1 0E 00 08 - ....5...Y.......
    D5 0E 00 08 B5 0E 00 08 00 00 00 00 40 00 00 00 - [email protected]
    04 01 00 00 C1 1C 00 08 99 0D 00 08 C1 1C 00 08 - ................
    C1 1C 00 08 C1 1C 00 08 C1 1C 00 08 C1 1C 00 08 - ................
    C1 1C 00 08 B1 0D 00 08
    As you can see my guess at the size of the firmware plus the data is very much different.

    Last update I received on the github issue:
    @KurtE
    We digged a bit more and found that the earlier OpenCM9.04 before releasing ROBOTIS MINI(2014 1Q) was using bootloader for embedded only which means it does not support R+Manager, but OpenCM IDE.
    After releasing ROBOTIS MINI, OpenCM9.04 bootloader had been updated for R+Manager.
    So what you have now is seems to be the very early version of OpenCM9.04.
    To me, it sounds like an ancient legacy xD
    Thank you for helping us to find out the history of OpenCM9.04!
    So curious if anyone else has some of these ancient boards? Probably not worth trying to fix, when can replace for $20

    Anyway if anyone is interested, you might try running the above app and see what it returns.

  2. #2

    Re: Open CM9.04 - Older Bootloaders?

    I went ahead and modified the sketch, that I found, that someone earlier made to update the OpenCM bootloader to be one that was compatible with using Maple: https://github.com/Gregwar/maple-boo...ple_loader.ino

    I updated the binary data (hex data), to be the data that I dumped from a current 904A board and updated and built using open_cm IDE.

    The program ran and appears to have worked That is I can now upload using Arduino and the utilities like R+ Manager will now talk to the board and for example update firmware...
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Open CM9.04 - How to connect to AX (or MX) servos?
    By KurtEck in forum Arbotix, Microcontrollers, Arduino
    Replies: 11
    Last Post: 12-21-2017, 06:53 PM
  2. Question(s) Open CM IDE problem on Mac OS
    By jomo in forum Software and Programming
    Replies: 4
    Last Post: 05-17-2016, 01:40 AM
  3. Question(s) Open CM 9.04 A working like USB2Dynamixel
    By bewieliczko in forum Software and Programming
    Replies: 1
    Last Post: 02-22-2016, 12:27 PM
  4. OPEN CM9 COM PORT Issue
    By fabrice in forum Arbotix, Microcontrollers, Arduino
    Replies: 2
    Last Post: 06-02-2015, 02:19 AM
  5. OOpic now open source
    By jes1510 in forum Robot Computers
    Replies: 0
    Last Post: 12-08-2008, 04:38 PM

Posting Permissions

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