by i-Bot » Wed Dec 20, 2006 9:21 pm
by i-Bot
Wed Dec 20, 2006 9:21 pm
Good questions.
The file cboot.asm is a true bootlloader. It is used to load application software to the C3024. It is very rarely used ( once per year !) in normal Robobasic or Roboscript mode. The only time it is used is when there is a new release of application code (scode.asm), last version 2.5 in late 2005.
Robobasic and roboscript on the PC use a complex serial protocol to interface to the scode.asm application. Robobasic and Roboscript generate intermediate code for download (not the cboot download) to EEPROM in the C3024. The scode.asm application interprets this code to perform the robot functions. This includes an interrupt driven motion engine to perform the servo activity including the Gyros.
Take a look here for a description of the Intermediate code, serial protocol ,how this all works together. though these descriptions are in urgent need of update.
http://robosavvy.com/Builders/i-Bot/webfiles/
When we want to program directly in C or assembler, then we are actually changing the application, not just downloading intermediate code to EEPROM.
You are rightly concerned about the "doorstop" question, but as I said in my previous post, the risk appears small, since the bootloader is very difficult to change.
So how do you now program in C or assembler. Well the canvas is bare and you have over 60K of code space to be creative in !
I use AVR Studio and GCC exclusively for creating code and find it just fine. I do admit that my Robonova has a lobotomised processor, so I can use JTAG ICE for difficult interrupt routines. But that is not a necessity.
My starting point was to turn the existing scode.asm routines into reusable code which is callable from GCC. This means I can use the motion engine including gyro. This also meant that I could reuse Robobasic code by simple translation to C functions. I did describe this earlier in the forum.
I have posted a couple of files which should explain this, but I am away from home, so do not have many files with me.
http://robosavvy.com/Builders/i-Bot/upload.zip
Note: some ports may differ from standard due to my use of AD4.. AD7 as JTAG. Also I have problems here with the arrays in program memory, which I did not have at home.
Also; the above code is a direct cut of the Hitec/Miirobot code, so is their copyright. It is presented here for educational and research purposes only.
I hope this helps. I not, please ask more questions.
Good questions.
The file cboot.asm is a true bootlloader. It is used to load application software to the C3024. It is very rarely used ( once per year !) in normal Robobasic or Roboscript mode. The only time it is used is when there is a new release of application code (scode.asm), last version 2.5 in late 2005.
Robobasic and roboscript on the PC use a complex serial protocol to interface to the scode.asm application. Robobasic and Roboscript generate intermediate code for download (not the cboot download) to EEPROM in the C3024. The scode.asm application interprets this code to perform the robot functions. This includes an interrupt driven motion engine to perform the servo activity including the Gyros.
Take a look here for a description of the Intermediate code, serial protocol ,how this all works together. though these descriptions are in urgent need of update.
http://robosavvy.com/Builders/i-Bot/webfiles/
When we want to program directly in C or assembler, then we are actually changing the application, not just downloading intermediate code to EEPROM.
You are rightly concerned about the "doorstop" question, but as I said in my previous post, the risk appears small, since the bootloader is very difficult to change.
So how do you now program in C or assembler. Well the canvas is bare and you have over 60K of code space to be creative in !
I use AVR Studio and GCC exclusively for creating code and find it just fine. I do admit that my Robonova has a lobotomised processor, so I can use JTAG ICE for difficult interrupt routines. But that is not a necessity.
My starting point was to turn the existing scode.asm routines into reusable code which is callable from GCC. This means I can use the motion engine including gyro. This also meant that I could reuse Robobasic code by simple translation to C functions. I did describe this earlier in the forum.
I have posted a couple of files which should explain this, but I am away from home, so do not have many files with me.
http://robosavvy.com/Builders/i-Bot/upload.zip
Note: some ports may differ from standard due to my use of AD4.. AD7 as JTAG. Also I have problems here with the arrays in program memory, which I did not have at home.
Also; the above code is a direct cut of the Hitec/Miirobot code, so is their copyright. It is presented here for educational and research purposes only.
I hope this helps. I not, please ask more questions.
Last edited by i-Bot on Fri Sep 23, 2011 7:16 pm, edited 1 time in total.