// Define which mode of transport is used
// Use SERIAL_CABLE for Rs-232 cable from USB2Dynamixel to CM-510
// Use ZIG_2_SERIAL for Zig-110 to Zig2Serial attached to USB2Dynamixel
// #define SERIAL_CABLE
#define ZIG_2_SERIAL
planius wrote:Did you change the code in serial.h as per my previous post? By default V0.5 is using ZIG_2_SERIAL, but you are using serial cable, so you need to change the #define and recompile.
adc_sensor_enable[ADC_CHANNELS] =
{0, 0, 1, 1, 1, 0}
printf("\nPassed serial init.\n");
// Initialization Routines
led_init(); // switches all 6 LEDs on
serial_init(57600); // serial port at 57600 baud
buzzer_init(); // enable buzzer melodies
button_init(); // enable push buttons on CM-510
delay_ms(200); // wait 0.2s
led_off(ALL_LED); // and switch them back off
------ Rebuild All started: Project: BioloidCControl, Configuration: Debug AVR ------
Build started.
Project "BioloidCControl.cproj" (ReBuild target(s)):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreRebuild" in file "C:\Program Files (x86)\Atmel\AVR Studio 5.1\Vs\Compiler.targets" from project "C:\Users\Public\Documents\Robotics\Bioloid\BioloidCControl\Release 0.5\BioloidCControl.cproj" (target "ReBuild" depends on it):
Task "RunCompilerTask"
C:\Program Files (x86)\Atmel\AVR Studio 5.1\make\make.exe clean all
rm -rf adc.o BioloidCControl.o button.o buzzer.o clock.o dxl_hal.o dynamixel.o led.o motion.o pose.o serial.o walk.o adc.d BioloidCControl.d button.d buzzer.d clock.d dxl_hal.d dynamixel.d led.d motion.d pose.d serial.d walk.d
rm -rf "BioloidCControl.hex" "BioloidCControl.lss" "BioloidCControl.eep" "BioloidCControl.map"
adc.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "adc.d" -MT"adc.d" -mmcu=atmega2561 -o"adc.o" ".././adc.c"
Finished building: .././adc.c
BioloidCControl.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "BioloidCControl.d" -MT"BioloidCControl.d" -mmcu=atmega2561 -o"BioloidCControl.o" ".././BioloidCControl.c"
Finished building: .././BioloidCControl.c
button.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "button.d" -MT"button.d" -mmcu=atmega2561 -o"button.o" ".././button.c"
Finished building: .././button.c
buzzer.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "buzzer.d" -MT"buzzer.d" -mmcu=atmega2561 -o"buzzer.o" ".././buzzer.c"
Finished building: .././buzzer.c
clock.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "clock.d" -MT"clock.d" -mmcu=atmega2561 -o"clock.o" ".././clock.c"
Finished building: .././clock.c
dxl_hal.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "dxl_hal.d" -MT"dxl_hal.d" -mmcu=atmega2561 -o"dxl_hal.o" ".././dxl_hal.c"
Finished building: .././dxl_hal.c
dynamixel.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "dynamixel.d" -MT"dynamixel.d" -mmcu=atmega2561 -o"dynamixel.o" ".././dynamixel.c"
Finished building: .././dynamixel.c
led.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "led.d" -MT"led.d" -mmcu=atmega2561 -o"led.o" ".././led.c"
Finished building: .././led.c
motion.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "motion.d" -MT"motion.d" -mmcu=atmega2561 -o"motion.o" ".././motion.c"
Finished building: .././motion.c
pose.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "pose.d" -MT"pose.d" -mmcu=atmega2561 -o"pose.o" ".././pose.c"
.././pose.c: In function 'moveToDefaultPose':
C:\Users\Public\Documents\Robotics\Bioloid\BioloidCControl\Release 0.5\pose.c(209,2): passing argument 2 of 'moveToGoalPose' discards qualifiers from pointer target type
C:\Users\Public\Documents\Robotics\Bioloid\BioloidCControl\Release 0.5\pose.c(160,5): expected 'uint16 *' but argument is of type 'const uint16 *'
Finished building: .././pose.c
serial.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "serial.d" -MT"serial.d" -mmcu=atmega2561 -o"serial.o" ".././serial.c"
Finished building: .././serial.c
walk.c
Invoking: AVR/GNU C Compiler
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "walk.d" -MT"walk.d" -mmcu=atmega2561 -o"walk.o" ".././walk.c"
Finished building: .././walk.c
Building target: BioloidCControl.elf
Invoking: AVR/GNU C Linker
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -o BioloidCControl.elf adc.o BioloidCControl.o button.o buzzer.o clock.o dxl_hal.o dynamixel.o led.o motion.o pose.o serial.o walk.o -Wl,-Map="BioloidCControl.map" -Wl,-lm -Wl,--defsym=__stack=0xfe00 -mmcu=atmega2561
Finished building target: BioloidCControl.elf
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "BioloidCControl.elf" "BioloidCControl.hex"
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "BioloidCControl.elf" "BioloidCControl.eep" || exit 0
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-objdump.exe" -h -S "BioloidCControl.elf" > "BioloidCControl.lss"
"C:\Program Files (x86)\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-size.exe" -C --mcu=atmega2561 "BioloidCControl.elf"
AVR Memory Usage
----------------
Device: atmega2561
Program: 68650 bytes (26.2% Full)
(.text + .data + .bootloader)
Data: 3425 bytes (41.8% Full)
(.data + .bss + .noinit)
Done executing task "RunCompilerTask".
Done building target "CoreRebuild" in project "BioloidCControl.cproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "ReBuild" in file "C:\Program Files (x86)\Atmel\AVR Studio 5.1\Vs\Avr.common.targets" from project "C:\Users\Public\Documents\Robotics\Bioloid\BioloidCControl\Release 0.5\BioloidCControl.cproj" (entry point):
Done building target "ReBuild" in project "BioloidCControl.cproj".
Done building project "BioloidCControl.cproj".
Build succeeded.
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
------ Rebuild All started: Project: BioloidCControl, Configuration: Debug AVR ------
Build started.
Project "BioloidCControl.cproj" (ReBuild target(s)):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreRebuild" in file "C:\Program Files\Atmel\AVR Studio 5.1\Vs\Compiler.targets" from project "C:\Users\BioloidVM\Desktop\BioloidCControlv05\BioloidCControl.cproj" (target "ReBuild" depends on it):
Task "RunCompilerTask"
C:\Program Files\Atmel\AVR Studio 5.1\make\make.exe clean all
rm -rf adc.o BioloidCControl.o button.o buzzer.o clock.o dxl_hal.o dynamixel.o led.o motion.o pose.o serial.o walk.o adc.d BioloidCControl.d button.d buzzer.d clock.d dxl_hal.d dynamixel.d led.d motion.d pose.d serial.d walk.d
rm -rf "BioloidCControl.hex" "BioloidCControl.lss" "BioloidCControl.eep" "BioloidCControl.map"
adc.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "adc.d" -MT"adc.d" -mmcu=atmega2561 -o"adc.o" ".././adc.c"
Finished building: .././adc.c
BioloidCControl.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "BioloidCControl.d" -MT"BioloidCControl.d" -mmcu=atmega2561 -o"BioloidCControl.o" ".././BioloidCControl.c"
Finished building: .././BioloidCControl.c
button.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "button.d" -MT"button.d" -mmcu=atmega2561 -o"button.o" ".././button.c"
Finished building: .././button.c
buzzer.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "buzzer.d" -MT"buzzer.d" -mmcu=atmega2561 -o"buzzer.o" ".././buzzer.c"
Finished building: .././buzzer.c
clock.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "clock.d" -MT"clock.d" -mmcu=atmega2561 -o"clock.o" ".././clock.c"
Finished building: .././clock.c
dxl_hal.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "dxl_hal.d" -MT"dxl_hal.d" -mmcu=atmega2561 -o"dxl_hal.o" ".././dxl_hal.c"
Finished building: .././dxl_hal.c
dynamixel.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "dynamixel.d" -MT"dynamixel.d" -mmcu=atmega2561 -o"dynamixel.o" ".././dynamixel.c"
Finished building: .././dynamixel.c
led.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "led.d" -MT"led.d" -mmcu=atmega2561 -o"led.o" ".././led.c"
Finished building: .././led.c
motion.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "motion.d" -MT"motion.d" -mmcu=atmega2561 -o"motion.o" ".././motion.c"
Finished building: .././motion.c
pose.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "pose.d" -MT"pose.d" -mmcu=atmega2561 -o"pose.o" ".././pose.c"
.././pose.c: In function 'moveToDefaultPose':
C:\Users\BioloidVM\Desktop\BioloidCControlv05\pose.c(209,2): passing argument 2 of 'moveToGoalPose' discards qualifiers from pointer target type
C:\Users\BioloidVM\Desktop\BioloidCControlv05\pose.c(160,5): expected 'uint16 *' but argument is of type 'const uint16 *'
Finished building: .././pose.c
serial.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "serial.d" -MT"serial.d" -mmcu=atmega2561 -o"serial.o" ".././serial.c"
Finished building: .././serial.c
walk.c
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -Wall -c -std=gnu99 -MD -MP -MF "walk.d" -MT"walk.d" -mmcu=atmega2561 -o"walk.o" ".././walk.c"
Finished building: .././walk.c
Building target: BioloidCControl.elf
Invoking: AVR/GNU C Linker
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -o BioloidCControl.elf adc.o BioloidCControl.o button.o buzzer.o clock.o dxl_hal.o dynamixel.o led.o motion.o pose.o serial.o walk.o -Wl,-Map="BioloidCControl.map" -Wl,-lm -Wl,--defsym=__stack=0xfe00 -mmcu=atmega2561
Finished building target: BioloidCControl.elf
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "BioloidCControl.elf" "BioloidCControl.hex"
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "BioloidCControl.elf" "BioloidCControl.eep" || exit 0
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-objdump.exe" -h -S "BioloidCControl.elf" > "BioloidCControl.lss"
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-size.exe" -C --mcu=atmega2561 "BioloidCControl.elf"
AVR Memory Usage
----------------
Device: atmega2561
Program: 68774 bytes (26.2% Full)
(.text + .data + .bootloader)
Data: 3393 bytes (41.4% Full)
(.data + .bss + .noinit)
Done executing task "RunCompilerTask".
Done building target "CoreRebuild" in project "BioloidCControl.cproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "ReBuild" in file "C:\Program Files\Atmel\AVR Studio 5.1\Vs\Avr.common.targets" from project "C:\Users\BioloidVM\Desktop\BioloidCControlv05\BioloidCControl.cproj" (entry point):
Done building target "ReBuild" in project "BioloidCControl.cproj".
Done building project "BioloidCControl.cproj".
Build succeeded.
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========