Page 2 of 7 FirstFirst 123456 ... LastLast
Results 11 to 20 of 64

Thread: Bioloid Premium CM530 Help

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

    Re: Bioloid Premium CM530 Help

    The dynamixel_address_tables.h is a giant unified header file I created to make using different dynamixel devices easier (CM-730 shows up as a dynamixel device under the DARwIn-OP framework). You can delete the CM-730 stuff if you want, but it should not hurt anything.

    Have you tried compiling the HaViMo2 example program as-is? It should compile using the makefile if you correctly set up the arm-none-eabi toolchain (I missed the libexec folder in /usr/arm-none-eabi/ and adding that to the PATH). If you are using an IDE, then there will be options somewhere to add external folders and library files to correctly locate the cm530 files and get the STM32 library compiled and statically linked. I've never used Xcode, so not really sure how to help there. All else fails, copy-paste the error output here.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  2. #12

    Re: Bioloid Premium CM530 Help

    Quote Originally Posted by tician View Post
    Have you tried compiling the HaViMo2 example program as-is? It should compile using the makefile if you correctly set up the arm-none-eabi toolchain (I missed the libexec folder in /usr/arm-none-eabi/ and adding that to the PATH).
    I'm debating using Xcode over Eclipse, it's just easier to use, but at the same time, Eclipse manages to overlook the errors in the MAKEFILE and compile it as normal. I'll try building it as-is tomorrow, I've got other stuff to do right now, but I'll get back to you about it.

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

    Re: Bioloid Premium CM530 Help

    When I said as-is, I somehow omitted "with console tools."

    [email protected]:/foo/bar/path/to/HaViMo2$ make clean && make


    The bare minimum for a blink program would be main.c:
    Code:
    #include "cm530.h" 
     
    int main(void) 
    { 
    // Must include this line in all programs using "cm530.h/.c" 
        SysInit(); 
    
        while(1)
        {
            // Reset the LEDs 
            SetLED(TXD, 0); 
            SetLED(RXD, 0); 
            SetLED(AUX, 0); 
     
            SetLED(MANAGE, 0); 
            SetLED(PROGRAM, 0); 
            SetLED(PLAY, 0); 
    
            mDelay(1000);
    
            SetLED(TXD, 1); 
            SetLED(RXD, 1); 
            SetLED(AUX, 1); 
     
            SetLED(MANAGE, 1); 
            SetLED(PROGRAM, 1); 
            SetLED(PLAY, 1); 
    
            mDelay(1000);
        } 
     
        return 0; 
    }
    Also somehow forgot to ever add "SIZE = $(TCHAIN_PREFIX)size" to fix the makefile (must have failed to copy it from its progenitor avr-gcc makefile). That is fixed on the repo, but should not really cause any significant problems if the arm-none-eabi-gcc toolchain is correct (there are multiple arm-gcc toolchains, and we want "none" version to compile code for embedded systems without an operating system).

    The dxl_hal_open()/pcu_hal_open()/zgb_hal_open() functions show how to use the different USART options, but the STM32 datasheet and user manual are where you would need to look for IC specifications (STM32F103RE-LQFP64). Fortunately, STM (like Atmel) is usually pretty good at providing documentation on their site without requiring users to register or accept a Non-Disclosure Agreement.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  4. #14

    Re: Bioloid Premium CM530 Help

    Beautiful, I've actually made a fork of your original repo, the link is here: https://github.com/Ech0riginal/cm530.git
    I forked it a few days ago, so it probably doesn't have your revisions, but I'll update my repo with yours.
    And thank you for the source code! So far I had managed to make a simple file that initiates the ARMv7.
    Code:
    stm32f10x_crc.c
      ...
    void CRC_ResetDR(void) {
      /* Reset CRC generator */
      CRC->CR = CR_RESET_Set;
    }
    "I've never seen -> used in C, actually only in Python." - Ah! I lied, foreign programming language is foreign! Accessing members of a struct.
    This slice of code is giving me a semantic error. I'll try to track it down.
    Fixed the semantic error, you've got to include the stdint.h file if you want to redefine int and long.
    Also, there seems to be a file, 'stm32f10x.h' missing. I've checked all folders, can't find it. I think most of the makefile errors are because I don't have WinARM installed, there is a version of it for Mac, so I'll be installing that, and give it a try.

    Fixed the 8 semantic errors in stm32f10x_crc.c by adding #include "stm32f10x_map.h".
    Last edited by Ech0riginal; 02-18-2013 at 10:17 AM.

  5. #15
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,283
    Images
    27
    Rep Power
    275

    Re: Bioloid Premium CM530 Help

    Quote Originally Posted by Ech0riginal View Post
    Also, there seems to be a file, 'stm32f10x.h' missing. I've checked all folders, can't find it. I think most of the makefile errors are because I don't have WinARM installed, there is a version of it for Mac, so I'll be installing that, and give it a try.
    The reason I've never known to fix that is because misc.h/c have never been included by any files actually built in the makefile, nor were they specified to be built in the makefile. Same goes for "stm32f10x_crc.c/h", "stm32f10x_dac.c/h", "stm32f10x_dbgmcu.c/h", "stm32f10x_fsmc.c/h", and "stm32f10x_sdio.c/h". They have all been removed from the repo and should never again be causing compilation problems. They were not defined in STM32_COMMON.ld, so never accessible (hardware might exist on the STM32 in the CM-530, but not sure how to modify the .ld file to get that functionality - if it were even needed for most situations).
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  6. #16

    Re: Bioloid Premium CM530 Help

    Adding to my ever increasing list of questions, what is a .ld file? I've already Google'd it and came up with either a Language Driver, or something to do with the STM ARMv7 processor on the robot.
    - Nevermind, linker scripts
    Also, by removing those headers a d whatnot, the only error I now get is:
    make: arm-none-eabi-gcc: No such file or directory
    make: *** [gccversion] Error 1
    My experience with preprocessors and compilers is zero to none, I haven't needed to understand them til now, but I'm going to investigate that error, I'm pretty sure it's going back to not having a Mac port of WinARM installed on my machine.
    Last edited by Ech0riginal; 02-19-2013 at 08:02 AM.

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

    Re: Bioloid Premium CM530 Help

    On linux, the embedded ARM compiler is called arm-none-eabi-gcc. The avr compiler is avr-gcc. The x86_64 compiler for linux systems is x86_64-linux-gnu-gcc. See where it is going? Basically, the makefile assumes that you are using arm-none-eabi-gcc toolchain, and if you don't have that, then you need to change the TCHAIN_PREFIX variable to whatever you need. I think on our windows WinARM install, the prefix was just 'arm-'.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  8. #18

    Post Re: Bioloid Premium CM530 Help

    Ah, alright, I'm seriously debating on installing Eclipse on my Windows VM, as well as WinARM, just to be more compatible. - Scratch that. The VM is acting funky, so not going to even attempt it.
    And I do have gcc-arm already installed but, I finally got it to build with /Almost/ no errors! But, when I build it with GCC-ARM, I get this error:

    sh-3.2#make; echo $PATH

    -------- begin --------
    arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.3 20121207 (release) [ARM/embedded-4_7-branch revision 194305]
    Copyright (C) 2012 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Wall -pedantic -g -Os -fno-common -I. -Istm32f10x_lib/inc -IAPP/inc -c -o APP/src/main.o APP/src/main.c
    Lots............. Of............. Output.............
    arm-none-eabi-ar cr stm32f10x_lib/libstm32.a stm32f10x_lib/src/stm32f10x_adc.o stm32f10x_lib/src/stm32f10x_bkp.o stm32f10x_lib/src/stm32f10x_exti.o stm32f10x_lib/src/stm32f10x_flash.o stm32f10x_lib/src/stm32f10x_gpio.o stm32f10x_lib/src/stm32f10x_lib.o stm32f10x_lib/src/stm32f10x_nvic.o stm32f10x_lib/src/stm32f10x_pwr.o stm32f10x_lib/src/stm32f10x_rcc.o stm32f10x_lib/src/stm32f10x_systick.o stm32f10x_lib/src/stm32f10x_tim.o stm32f10x_lib/src/stm32f10x_tim1.o stm32f10x_lib/src/stm32f10x_usart.o stm32f10x_lib/src/cortexm3_macro.o stm32f10x_lib/src/stm32f10x_can.o stm32f10x_lib/src/stm32f10x_dma.o stm32f10x_lib/src/stm32f10x_i2c.o stm32f10x_lib/src/stm32f10x_iwdg.o stm32f10x_lib/src/stm32f10x_rtc.o stm32f10x_lib/src/stm32f10x_spi.o stm32f10x_lib/src/stm32f10x_wwdg.o stm32f10x_lib/src/stm32f10x_vector.o
    make: arm-none-eabi-ar: Permission denied
    make: *** [stm32f10x_lib/libstm32.a] Error 1
    /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/gcc-arm-none-eabi/bin/
    sh-3.2#
    Last edited by Ech0riginal; 02-20-2013 at 08:20 AM. Reason: Added ErrOut

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

    Re: Bioloid Premium CM530 Help

    The WinARM compiler has not been updated in some time, but should still work fine. I do not think xcode supports the bare-metal arm toolchain by default (only compiling for iOS programs on ARM, which is different from non-OS/embedded programs on ARM), so macports "arm-none-eabi-gcc" might be helpful. Not entirely sure about that (don't use mac and never used xcode or macports).
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  10. #20

    Re: Bioloid Premium CM530 Help

    So I was browsing through our conversation, and I just had an "Ah-ha!" moment, the stm32f10x_lib, is what's provided by STMicroelectronics for their STM32F10 ARM-Coretx-M3, but the one we were provided in Robotis' docs was modified by them. So, can't we just get the original libraries from STM, and then just add header files specifically for the Bioloid's Dynamixel motors, LEDs, etc. I know that you already have that down, but I'm having to document it in a paper for the next year's students and I don't want them to not have good docs like we do, and I'm a more hands-on kind of person so that's how I learn the best. As for C, I'm completely new to it, I started to read a book on it a few years ago but gave up and went to Java, now I realize I should have stuck with C. Adding to that challenge, we basically have to grasp how an ARM Microcontroller works, how to *safely* make it turn on, check & set up it's registers, etc with the .ld files, which I never thought I'd have to do in high school. So right now I'm going to get the STM32F10x library from STM's site, and most likely just try to read through it to understand the core concepts.
    I'll let you know if we can achieve compilation of the std library
    Thank you for all your help thus far.
    Also, I know this is probably a silly question, and I've Google'd it as well and gotten answers ranging from less than informative to saying their one and the same. Anyway, I that an ARM device is used in a computers core, but what is the difference between an ARM Microcontroller and an ARM Microprocessor? Or are they the same? I'm curious because one is a controller and the other a processor.. And off to google with that realization.. >_< - Scratch that, a controller is basically a processor that was taken to God of Computer Technology and supped up with some I/O Busses, a CPU, and some other nifty stuffs. O.0
    Last edited by Ech0riginal; 02-22-2013 at 07:55 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Premium Bioloid Kit with AX-S1
    By Hellfire in forum Robotics General Discussion
    Replies: 1
    Last Post: 02-27-2012, 10:12 PM
  2. Bioloid Premium Kit for Sale
    By Dizzer in forum Garage Sale
    Replies: 4
    Last Post: 02-09-2012, 08:19 PM
  3. WTB - Bioloid Premium
    By xnonox in forum Garage Sale
    Replies: 3
    Last Post: 12-27-2011, 11:22 PM
  4. Bioloid Premium for sale
    By RoboFlop in forum Garage Sale
    Replies: 0
    Last Post: 02-25-2011, 10:40 AM
  5. Bioloid Premium Kit
    By cdraptor in forum Robotics General Discussion
    Replies: 3
    Last Post: 08-05-2009, 11:26 PM

Tags for this Thread

Posting Permissions

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