Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

error: libavr/flash.h: No such file or directory?

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
21 postsPage 2 of 21, 2
21 postsPage 2 of 21, 2

Post by buhochileno » Sun Jun 21, 2009 2:24 am

Post by buhochileno
Sun Jun 21, 2009 2:24 am

StuartL wrote:The libbioloid standard make file should give you a .bin and a .hex for your example.c. The .hex and .bin contain the same data, just in different formats. BGP files are tokenised instructions to the Robotis ROM file (their equivalent of .hex or .bin).


Ok, I going to try to figure out how to convert the "Bioloid_Ver115.hex" to a .bin file to be able to restore that file with the programmer to have the original CM-5 typical console and not to have to go to windows to do that...
Any chance to convert a .bgp to hex or bin to transfer the "humanoid" demo or other included demo files with the programmer?

The .hex file is just an Intel format .bin file. There are many utilities to convert between the two. BCP provided with the Robotis kit converts the .rom file (which is very crudely encrypted) into the binary as it sends it to the robot through the bootloader.


Robot Terminal converts the .hex file into binary as it sends it to the robot through the bootloader. We didn't bother with the conversion and instead just use the binary format directly.

Please explain me, the bootloader is then a program that reside in the atmel rom?..where can I find info about that bootloader program?, what is the diference with the "supervisor" and by the way, waht IS the "supervisor", where do you find info to use the supervisor command?..I supose then that the CM-5 console (the one that let you do: go 100 1000 and thing like that) is a program that is run by the cm-5 bootloader or the supervisor?, if it is so, how the CM-5 console allow you to have that console and "play" another programm changing to the "play" mode?, really confuse about all that..any good reading?

This means that if you download a converter from .hex (or ihex) to binary you can convert the .hex files into binary and vice versa. You may even notice one in the makefile which we use to do exactly that :D

Ok trying to understand the makefile file :-S
[quote]Other question: the libbioloid is able to use the zegbee modules in any way?[

Yes, I currently use the zigbee module as a direct replacement for the serial port. You get packet loss on the zigbee which you don't get on the serial port and you need to be aware of that. libbioloid will automatically transmit the console output on both the zigbee and serial port and will switch to receive from the zigbee instead of the serial port if there's no serial cable plugged in.
/quote]
That's great...

Thanks for your kind help...

Mauricio
StuartL wrote:The libbioloid standard make file should give you a .bin and a .hex for your example.c. The .hex and .bin contain the same data, just in different formats. BGP files are tokenised instructions to the Robotis ROM file (their equivalent of .hex or .bin).


Ok, I going to try to figure out how to convert the "Bioloid_Ver115.hex" to a .bin file to be able to restore that file with the programmer to have the original CM-5 typical console and not to have to go to windows to do that...
Any chance to convert a .bgp to hex or bin to transfer the "humanoid" demo or other included demo files with the programmer?

The .hex file is just an Intel format .bin file. There are many utilities to convert between the two. BCP provided with the Robotis kit converts the .rom file (which is very crudely encrypted) into the binary as it sends it to the robot through the bootloader.


Robot Terminal converts the .hex file into binary as it sends it to the robot through the bootloader. We didn't bother with the conversion and instead just use the binary format directly.

Please explain me, the bootloader is then a program that reside in the atmel rom?..where can I find info about that bootloader program?, what is the diference with the "supervisor" and by the way, waht IS the "supervisor", where do you find info to use the supervisor command?..I supose then that the CM-5 console (the one that let you do: go 100 1000 and thing like that) is a program that is run by the cm-5 bootloader or the supervisor?, if it is so, how the CM-5 console allow you to have that console and "play" another programm changing to the "play" mode?, really confuse about all that..any good reading?

This means that if you download a converter from .hex (or ihex) to binary you can convert the .hex files into binary and vice versa. You may even notice one in the makefile which we use to do exactly that :D

Ok trying to understand the makefile file :-S
[quote]Other question: the libbioloid is able to use the zegbee modules in any way?[

Yes, I currently use the zigbee module as a direct replacement for the serial port. You get packet loss on the zigbee which you don't get on the serial port and you need to be aware of that. libbioloid will automatically transmit the console output on both the zigbee and serial port and will switch to receive from the zigbee instead of the serial port if there's no serial cable plugged in.
/quote]
That's great...

Thanks for your kind help...

Mauricio
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by StuartL » Sun Jun 21, 2009 7:51 am

Post by StuartL
Sun Jun 21, 2009 7:51 am

buhochileno wrote:Any chance to convert a .bgp to hex or bin to transfer the "humanoid" demo or other included demo files with the programmer?


No, not really. You could probably do it by hacking around but it's beyond anything we've done. You would need to hack the Bioloid firmware (e.g. v115) and the BCP into a combined ROM file at the correct offsets (which I have no idea of) and then use the programmer to get them into the application ROM. For all this hackery you may as well use the BCP.

Please explain me, the bootloader is then a program that reside in the atmel rom?..where can I find info about that bootloader program?, what is the diference with the "supervisor" and by the way, waht IS the "supervisor", where do you find info to use the supervisor command?..


Ok, inside the ATmega128 (the microcontroller the CM-5 is based on) you have two 'sections' of the ROM. The way Robotis configure the chip is to use the top section as a non-reprogrammable bootloader. This is the bit which talks over the serial port (or zigbee) and allows you to program the remainder of the flash (the application section) using Robot Terminal or Matt's programmer. The BCP also uses this same bootloader to put the Bioloid firmware into the application section (at the start) and the BCP instructions (a highly tokenised instruction set) into the application section (near the end). The motions are also stored near the end.

I supose then that the CM-5 console (the one that let you do: go 100 1000 and thing like that) is a program that is run by the cm-5 bootloader or the supervisor?, if it is so, how the CM-5 console allow you to have that console and "play" another programm changing to the "play" mode?, really confuse about all that..any good reading?


Forgetting libbioloid and Matt's programmer this is what normally happens when the CM-5 starts up:

- The chip self-initialises and starts the bootloader.
- The bootloader initialises the serial port and waits for 60ms for any '#' characters to arrive. If any do arrive it switches into 'bootloader' mode and allows you to erase and program the flash/eeprom.
- If the bootloader doesn't detect any input it jumps to the start of flash which is where the application software is placed.
- The default application software is the Bioloid firmware, the BCP 'master application' which is contained in the .ROM file.
- The Robotis application initialises the serial ports, zigbee and LEDs/buttons and it's THIS firmware which does the battery charging, button interaction and reads the BCP instructions placed higher up the flash by the BCP.

When you use libbioloid you replace the contents of the flash with your program. You have to develop your own LEDs, button interaction, charging algorithm (see other threads, I do not think it safe to use the charging circuit on the CM-5) and motion methods. In our cases we don't have any precoded motion sequences and all of the motion is dynamically calculated. This means we don't have any equivalent for the Robotis BCP/Motion Editor.
buhochileno wrote:Any chance to convert a .bgp to hex or bin to transfer the "humanoid" demo or other included demo files with the programmer?


No, not really. You could probably do it by hacking around but it's beyond anything we've done. You would need to hack the Bioloid firmware (e.g. v115) and the BCP into a combined ROM file at the correct offsets (which I have no idea of) and then use the programmer to get them into the application ROM. For all this hackery you may as well use the BCP.

Please explain me, the bootloader is then a program that reside in the atmel rom?..where can I find info about that bootloader program?, what is the diference with the "supervisor" and by the way, waht IS the "supervisor", where do you find info to use the supervisor command?..


Ok, inside the ATmega128 (the microcontroller the CM-5 is based on) you have two 'sections' of the ROM. The way Robotis configure the chip is to use the top section as a non-reprogrammable bootloader. This is the bit which talks over the serial port (or zigbee) and allows you to program the remainder of the flash (the application section) using Robot Terminal or Matt's programmer. The BCP also uses this same bootloader to put the Bioloid firmware into the application section (at the start) and the BCP instructions (a highly tokenised instruction set) into the application section (near the end). The motions are also stored near the end.

I supose then that the CM-5 console (the one that let you do: go 100 1000 and thing like that) is a program that is run by the cm-5 bootloader or the supervisor?, if it is so, how the CM-5 console allow you to have that console and "play" another programm changing to the "play" mode?, really confuse about all that..any good reading?


Forgetting libbioloid and Matt's programmer this is what normally happens when the CM-5 starts up:

- The chip self-initialises and starts the bootloader.
- The bootloader initialises the serial port and waits for 60ms for any '#' characters to arrive. If any do arrive it switches into 'bootloader' mode and allows you to erase and program the flash/eeprom.
- If the bootloader doesn't detect any input it jumps to the start of flash which is where the application software is placed.
- The default application software is the Bioloid firmware, the BCP 'master application' which is contained in the .ROM file.
- The Robotis application initialises the serial ports, zigbee and LEDs/buttons and it's THIS firmware which does the battery charging, button interaction and reads the BCP instructions placed higher up the flash by the BCP.

When you use libbioloid you replace the contents of the flash with your program. You have to develop your own LEDs, button interaction, charging algorithm (see other threads, I do not think it safe to use the charging circuit on the CM-5) and motion methods. In our cases we don't have any precoded motion sequences and all of the motion is dynamically calculated. This means we don't have any equivalent for the Robotis BCP/Motion Editor.
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by buhochileno » Mon Jun 22, 2009 4:19 pm

Post by buhochileno
Mon Jun 22, 2009 4:19 pm

StuartL wrote:
buhochileno wrote:Any chance to convert a .bgp to hex or bin to transfer the "humanoid" demo or other included demo files with the programmer?


No, not really. You could probably do it by hacking around but it's beyond anything we've done. You would need to hack the Bioloid firmware (e.g. v115) and the BCP into a combined ROM file at the correct offsets (which I have no idea of) and then use the programmer to get them into the application ROM. For all this hackery you may as well use the BCP.

Please explain me, the bootloader is then a program that reside in the atmel rom?..where can I find info about that bootloader program?, what is the diference with the "supervisor" and by the way, waht IS the "supervisor", where do you find info to use the supervisor command?..


Ok, inside the ATmega128 (the microcontroller the CM-5 is based on) you have two 'sections' of the ROM. The way Robotis configure the chip is to use the top section as a non-reprogrammable bootloader. This is the bit which talks over the serial port (or zigbee) and allows you to program the remainder of the flash (the application section) using Robot Terminal or Matt's programmer. The BCP also uses this same bootloader to put the Bioloid firmware into the application section (at the start) and the BCP instructions (a highly tokenised instruction set) into the application section (near the end). The motions are also stored near the end.

I supose then that the CM-5 console (the one that let you do: go 100 1000 and thing like that) is a program that is run by the cm-5 bootloader or the supervisor?, if it is so, how the CM-5 console allow you to have that console and "play" another programm changing to the "play" mode?, really confuse about all that..any good reading?


Forgetting libbioloid and Matt's programmer this is what normally happens when the CM-5 starts up:

- The chip self-initialises and starts the bootloader.
- The bootloader initialises the serial port and waits for 60ms for any '#' characters to arrive. If any do arrive it switches into 'bootloader' mode and allows you to erase and program the flash/eeprom.
- If the bootloader doesn't detect any input it jumps to the start of flash which is where the application software is placed.
- The default application software is the Bioloid firmware, the BCP 'master application' which is contained in the .ROM file.
- The Robotis application initialises the serial ports, zigbee and LEDs/buttons and it's THIS firmware which does the battery charging, button interaction and reads the BCP instructions placed higher up the flash by the BCP.

When you use libbioloid you replace the contents of the flash with your program. You have to develop your own LEDs, button interaction, charging algorithm (see other threads, I do not think it safe to use the charging circuit on the CM-5) and motion methods. In our cases we don't have any precoded motion sequences and all of the motion is dynamically calculated. This means we don't have any equivalent for the Robotis BCP/Motion Editor.


Ok, so the CM-5 console provided by robotis is just a "program" run it by the bootloader and is able to understend things like "mode play + start = run the tokenized instructions at xxx address..." or "powerOn + D_Button = charge the battery and make the LED blink...", witch by the way give me a question: So, when I use the libbioloid and I have some program at the CM-5 like example.bin and I connect the charger, the batteries are not going to charge?, how do you do that? (external charger removing batteries?)
So, if the bioloid_ver115.hex is just another programm it can be converted to a .bin and transfered to the cm-5 using the programmer right? (still trying to understend how the makefile file can do the transformation...

So, the "supervisor" is just other program that is run it by the bootloader right?, where can I find info about the commands/parameters of the supervisor?

Thanks.

Mauricio
StuartL wrote:
buhochileno wrote:Any chance to convert a .bgp to hex or bin to transfer the "humanoid" demo or other included demo files with the programmer?


No, not really. You could probably do it by hacking around but it's beyond anything we've done. You would need to hack the Bioloid firmware (e.g. v115) and the BCP into a combined ROM file at the correct offsets (which I have no idea of) and then use the programmer to get them into the application ROM. For all this hackery you may as well use the BCP.

Please explain me, the bootloader is then a program that reside in the atmel rom?..where can I find info about that bootloader program?, what is the diference with the "supervisor" and by the way, waht IS the "supervisor", where do you find info to use the supervisor command?..


Ok, inside the ATmega128 (the microcontroller the CM-5 is based on) you have two 'sections' of the ROM. The way Robotis configure the chip is to use the top section as a non-reprogrammable bootloader. This is the bit which talks over the serial port (or zigbee) and allows you to program the remainder of the flash (the application section) using Robot Terminal or Matt's programmer. The BCP also uses this same bootloader to put the Bioloid firmware into the application section (at the start) and the BCP instructions (a highly tokenised instruction set) into the application section (near the end). The motions are also stored near the end.

I supose then that the CM-5 console (the one that let you do: go 100 1000 and thing like that) is a program that is run by the cm-5 bootloader or the supervisor?, if it is so, how the CM-5 console allow you to have that console and "play" another programm changing to the "play" mode?, really confuse about all that..any good reading?


Forgetting libbioloid and Matt's programmer this is what normally happens when the CM-5 starts up:

- The chip self-initialises and starts the bootloader.
- The bootloader initialises the serial port and waits for 60ms for any '#' characters to arrive. If any do arrive it switches into 'bootloader' mode and allows you to erase and program the flash/eeprom.
- If the bootloader doesn't detect any input it jumps to the start of flash which is where the application software is placed.
- The default application software is the Bioloid firmware, the BCP 'master application' which is contained in the .ROM file.
- The Robotis application initialises the serial ports, zigbee and LEDs/buttons and it's THIS firmware which does the battery charging, button interaction and reads the BCP instructions placed higher up the flash by the BCP.

When you use libbioloid you replace the contents of the flash with your program. You have to develop your own LEDs, button interaction, charging algorithm (see other threads, I do not think it safe to use the charging circuit on the CM-5) and motion methods. In our cases we don't have any precoded motion sequences and all of the motion is dynamically calculated. This means we don't have any equivalent for the Robotis BCP/Motion Editor.


Ok, so the CM-5 console provided by robotis is just a "program" run it by the bootloader and is able to understend things like "mode play + start = run the tokenized instructions at xxx address..." or "powerOn + D_Button = charge the battery and make the LED blink...", witch by the way give me a question: So, when I use the libbioloid and I have some program at the CM-5 like example.bin and I connect the charger, the batteries are not going to charge?, how do you do that? (external charger removing batteries?)
So, if the bioloid_ver115.hex is just another programm it can be converted to a .bin and transfered to the cm-5 using the programmer right? (still trying to understend how the makefile file can do the transformation...

So, the "supervisor" is just other program that is run it by the bootloader right?, where can I find info about the commands/parameters of the supervisor?

Thanks.

Mauricio
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by RandomMatt » Mon Jun 22, 2009 4:50 pm

Post by RandomMatt
Mon Jun 22, 2009 4:50 pm

buhochileno wrote:So, when I use the libbioloid and I have some program at the CM-5 like example.bin and I connect the charger, the batteries are not going to charge?, how do you do that? (external charger removing batteries?)
Mauricio


read this: http://robosavvy.com/forum/viewtopic.php?p=20167


buhochileno wrote:So, if the bioloid_ver115.hex is just another programm it can be converted to a .bin and transfered to the cm-5 using the programmer right? (still trying to understend how the makefile file can do the transformation...


avr-objcopy -I ihex -O binary bob.hex bob.bin

also... look in common.mk for the magic in the makefile.


buhochileno wrote:So, the "supervisor" is just other program that is run it by the bootloader right?, where can I find info about the commands/parameters of the supervisor?


It gives you help when it runs :wink: - just press 'h' to get it back again.
the most useful commands are 'g', 'm' and 'w'.
buhochileno wrote:So, when I use the libbioloid and I have some program at the CM-5 like example.bin and I connect the charger, the batteries are not going to charge?, how do you do that? (external charger removing batteries?)
Mauricio


read this: http://robosavvy.com/forum/viewtopic.php?p=20167


buhochileno wrote:So, if the bioloid_ver115.hex is just another programm it can be converted to a .bin and transfered to the cm-5 using the programmer right? (still trying to understend how the makefile file can do the transformation...


avr-objcopy -I ihex -O binary bob.hex bob.bin

also... look in common.mk for the magic in the makefile.


buhochileno wrote:So, the "supervisor" is just other program that is run it by the bootloader right?, where can I find info about the commands/parameters of the supervisor?


It gives you help when it runs :wink: - just press 'h' to get it back again.
the most useful commands are 'g', 'm' and 'w'.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by buhochileno » Tue Jun 23, 2009 2:22 pm

Post by buhochileno
Tue Jun 23, 2009 2:22 pm

buhochileno wrote:So, if the bioloid_ver115.hex is just another programm it can be converted to a .bin and transfered to the cm-5 using the programmer right? (still trying to understend how the makefile file can do the transformation...

avr-objcopy -I ihex -O binary bob.hex bob.bin

also... look in common.mk for the magic in the makefile.


Ok, thanks it work perfect.. :-)

buhochileno wrote:So, the "supervisor" is just other program that is run it by the bootloader right?, where can I find info about the commands/parameters of the supervisor?

It gives you help when it runs :wink: - just press 'h' to get it back again.
the most useful commands are 'g', 'm' and 'w'.


Yeap, but I really newbee in that, any example about proper use of 'w' and so?

Mauricio
buhochileno wrote:So, if the bioloid_ver115.hex is just another programm it can be converted to a .bin and transfered to the cm-5 using the programmer right? (still trying to understend how the makefile file can do the transformation...

avr-objcopy -I ihex -O binary bob.hex bob.bin

also... look in common.mk for the magic in the makefile.


Ok, thanks it work perfect.. :-)

buhochileno wrote:So, the "supervisor" is just other program that is run it by the bootloader right?, where can I find info about the commands/parameters of the supervisor?

It gives you help when it runs :wink: - just press 'h' to get it back again.
the most useful commands are 'g', 'm' and 'w'.


Yeap, but I really newbee in that, any example about proper use of 'w' and so?

Mauricio
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by RandomMatt » Tue Jun 23, 2009 8:57 pm

Post by RandomMatt
Tue Jun 23, 2009 8:57 pm

buhochileno wrote:Yeap, but I really newbee in that, any example about proper use of 'w' and so?


no... just experiment - you cannot ever break anything (*).

For example - the AX12 pdf says that memory location 25 is for the LED.

so try the 'w' command to write a value of 0 to location 25 of servo 1.
and then try writing a value of 1 to location 25 of servo 1.

if you use the 'm' command inbetween the above - you should be able to see what going on.

The moral is... just try things out, the worst that can happen is very minor (**).

--

* apart form the motor - if you ask the servo to go past its end stop.
** in the most extreme case - say a baud rate change - you'll have to use the bridge command to talk to AX12 bootloader to reset it... but even that is easy.
buhochileno wrote:Yeap, but I really newbee in that, any example about proper use of 'w' and so?


no... just experiment - you cannot ever break anything (*).

For example - the AX12 pdf says that memory location 25 is for the LED.

so try the 'w' command to write a value of 0 to location 25 of servo 1.
and then try writing a value of 1 to location 25 of servo 1.

if you use the 'm' command inbetween the above - you should be able to see what going on.

The moral is... just try things out, the worst that can happen is very minor (**).

--

* apart form the motor - if you ask the servo to go past its end stop.
** in the most extreme case - say a baud rate change - you'll have to use the bridge command to talk to AX12 bootloader to reset it... but even that is easy.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Previous
21 postsPage 2 of 21, 2
21 postsPage 2 of 21, 2