Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: The CM-900 code, and how to work around itT

  1. #11

    Re: The CM-900 code, and how to work around itT

    Jikes is a Java compiler that IBM built in the '90s and abandoned in 2005.
    The "make.sh" script in processing-core calls jikes to build, after calling a perl script to preprocess stuff.
    There's no useful build documentation in the root or first sub-level of directories in this repository.

    Also, yes: It seems that a lot of the bad code that gets me down is inherited from Maple.
    Then Robotis has made changes on top of it, commenting things out and adding [ROBOTIS] tags, instead of using source control for diffing.
    I really wish I had the time to do what you're doing -- but as you're already doing it, I'll just sit back and look forward to you finishing :-)

  2. #12
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,289
    Images
    27
    Rep Power
    276

    Re: The CM-900 code, and how to work around itT

    Strange. I do not appear to have jikes installed yet I can build the entire IDE easily (cd /precessing-head/build/ && ant clean && ant). I'm not sure there is actually any need for processing-core, as everything I know of is contained in and built in processing-head. I actually moved the processing-core folder well outside the CM9 repo folders and it still compiled without any difficulties to produce an IDE that just uploaded another example sketch to the CM-900 v1.01 board.

    Got the python script successfully working, but it does not want to work happily with 1.5 yet. Probably because it is a python script. Fortunately, the tmp files are accessible and the .bin file can be uploaded manually with the script.

    Not a software engineer or even a particularly good programmer, so it will probably be a long ass wait. The bootloader is another chaotic collection of code that really annoys me, but never really have to look at it during normal use.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  3. #13
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,289
    Images
    27
    Rep Power
    276

    Re: The CM-900 code, and how to work around itT

    Actually, it appears that processing-core is entirely duplicated within 'processing-head/core' and seems to serve no useful purpose other than as a reference to build another GUI upon (or it was a symbolic link that got copied as a duplicate?). A diff -r of 'processing-core' and 'processing-head/core' results in only the 'bin' folder and 'core.jar' because they were created by running ant in /processing-head/build'.

    Deleted 'processing-core' and 'processing-head/core/make.sh' and everything continues to work fine.
    Last edited by tician; 11-02-2013 at 08:30 PM.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  4. #14
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,289
    Images
    27
    Rep Power
    276

    Re: The CM-900 code, and how to work around itT

    Have the Arduino 1.5 IDE correctly uploading with the python script, but the binary is going to crap somewhere as it crashes immediately after 'AT&GO' is issued. No USB enumeration, no flashing LED, nothing. Suspect it has to do with the newer version of arm-none-eabi as I get a few undefined reference warnings in 'lib/thumb2/libc.a'.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  5. #15

    Re: The CM-900 code, and how to work around itT

    Undefined references should be errors, not warnings :-)

    Look forward to your continued spelunking!

  6. #16
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,289
    Images
    27
    Rep Power
    276

    Re: The CM-900 code, and how to work around itT

    Using the arm-none-eabi toolchain from the CM9 IDE did not fix things, and there are no code difference between the cores, so most likely compiler and/or linker options (and possibly pulling in files from the core not actually used by the CM9 IDE). Know the reference errors are treated as warnings because of some of the linker options. Going to try adding -pedantic to the CM9 IDE and hope it prints something useful.

    Working on an overdue backup now that I've got my backup box running again (OS drive is old and GRUB partition appears to have been corrupted), so other stuff until that is finished.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

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

    Re: The CM-900 code, and how to work around itT

    Getting the CM9-IDE to print out warnings (as any sane programmer would require) involves commenting out the line ~633 ("if (s.indexOf("warning") != -1) return;") in the message() method in 'processing-head/app/src/processing/app/debug/ArmCompiler.java'.

    Still not gotten the Arduino-1.5.4 to compile correctly. Pretty sure it is related to the startup assembly code in "startup_stmf10x_md.s". The undefined reference error about _sbrk not being in libc.a is frustrating since the _sbrk() function is independently implemented within "syscalls.c" and I just have not been able to get the toolchain to find it correctly. Really wish I had a better understanding of makefiles and the gcc toolchain.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  8. #18

    Re: The CM-900 code, and how to work around itT

    _sbrk is used by malloc(). Malloc is the evil when in embedded systems. Take out the parts from libc that need it, instead :-)

    If you are building on Linux, you can use "strace -f" to get a list of everything a process is doing (every system call it makes.) This is, shall we say, "very verbose," so pipe it to a file. Then you can search for the bits and pieces you want (calls to clone() to create a new process, search for the string "gcc", etc.) If you do this to the ROBOTIS_CM9 IDE, you may be able to figure out which options it's passing, and then clone those.

  9. #19
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,289
    Images
    27
    Rep Power
    276

    Re: The CM-900 code, and how to work around itT

    Think I solved the _sbrk problem, but there are plenty of others that I still have not tracked down. The most annoying right now is somehow related to the constructor/destructor of the Dynamixel object.

    On another front:
    Have the newest version of the STM32F10x_StdPeriph_Driver and CMSIS from STMicro set up in a similar manner to the sam3/system folder and the makefiles appear to have been modified consistently, but getting a wall of text with errors mostly "expected ')' before ..." and "expected specifier-qualifier-list before...", with several "function declaration isn't a prototype" and "struct has no members" warnings.

    The rage hurts and many other more important things I should be doing.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  10. #20
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,289
    Images
    27
    Rep Power
    276

    Re: The CM-900 code, and how to work around itT

    Finally got a version of the CM9 core running correctly on Arduino-1.5.4. Will hopefully push it and the uploader script to github sometime later today. It is nowhere near as nice as I was wanting, but at least it is a start. Will probably continue working on the CMSIS+STM32_StdPeriphLib rewrite, but that will be a very longterm and annoying project.

    The upload script is currently intended only for the CM-900 bootloader (catering to the lowest common denominator and all that). I have rewritten the relevant parts to work far more nicely with the CM-904 (extra commands should permit one to easily tell it is in bootloader mode already), I just need to test it with hardware.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Will RX-64 servo work below 12V
    By Toymaker in forum DYNAMIXEL & Robot Actuators
    Replies: 0
    Last Post: 03-09-2010, 12:29 PM
  2. Question(s) Will this controller work?
    By markaardvark in forum DYNAMIXEL & Robot Actuators
    Replies: 13
    Last Post: 05-11-2009, 05:36 PM
  3. Question(s) Would a four leg crawler work????
    By Bug57 in forum Mechanics / Construction
    Replies: 6
    Last Post: 10-29-2008, 01:48 AM
  4. new b! i need help please!! cant get it to work
    By openmindedjjj in forum Robotics General Discussion
    Replies: 11
    Last Post: 06-28-2008, 09:35 AM
  5. BrainBot Work
    By JonHylands in forum Humanoids, Walkers & Crawlers
    Replies: 16
    Last Post: 11-14-2007, 11:05 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
  •