Bricx - Sorosy Debugger question
Posted: 03 Jun 2011, 22:33
Hi guys,
It is my first time here, since i just recently bought the NXT2 system and build my first robot.
It is based on a Race Car http://www.nxtprograms.com/NXT2/race_car/steps.html with the following modifications:
- Only 2 motors are used to rotate the wheels. The third motor has been removed and is being used to rotate the (well known deal extreme's) wireless camera.
- In order to have more power to rotate the wheels (now i have one motor rotating both rear wheels) the order of chain wheels have been reversed.
It also gives the ability to more precisely control the robot, since the car will drive slowly in such configuration.
The idea is to use a brick and its CPU as sort of robot controller, while using laptop for some kind of real time image processing (getting a video from wireless camera) and sending the commands (or sort of a model) back to the robot using Blue-tooth. This is the framework. Some fusion with other sensors is also a possibly on a later stage.
Anyway...
After some checking on the net (RobotC vs NBC-NXC vs NXT OS-ARM7 Native) i decided to start from the most "default" system
and went with NBC/NXC and Enhanced 1.28 firmware. Thanks to John Hansen.
I have recently installed both BricX IDE and Sorosy Debugger.
BricX version is 3.3.8.8, while Debugger is 1.0 Beta 3
I am running them on Apple MacBook Pro with Windows 7 (boot camp) using compatibility mode for Windows XP SP2 and "run as administrator".
I am using Enhanced 1.28 firmware.
First i installed the phantom driver (and NXT-G package), then BricX and finally the debugger.
For some reason i just could not start working with the debugger.
The IDE works fine, it communicates with the robot, compiles simple NXC/NBC sources i took from the example's .pdf and runs them on target.
Then, while trying to "Compile and Debug" this same NBC code, it just doesn't compile.
For example, the following NBC code compiles and runs perfectly.
thread main
OnFwd(OUT_B,100)
OnFwd(OUT_C,100)
wait 4000
OnRev(OUT_BC,100)
wait 4000
Off(OUT_BC)
exit
endt
Then, when trying to "compile and debug" while transferring to debugger the notepad opens and following errors appear
# Error: Duplicate variable declaration (__constVal1)
File "D:\Ctac\Lego MindStorm 2\Documentation\NBC (ASM)\tutorial-0.02\1-simple.dbg" ; line 140
# __constVal1 sbyte 1
#----------------------------------------------------------
# Error: Duplicate variable declaration (__constVal0)
File "D:\Ctac\Lego MindStorm 2\Documentation\NBC (ASM)\tutorial-0.02\1-simple.dbg" ; line 142
# __constVal0 sbyte
#----------------------------------------------------------
2 errors during compilation
Again, this same code was perfectly compiled and ran just before that while using "compile", "download and run".
Then, i thought it might be some sort of constant declaration/definition problem, so i just left with the wait.
thread main
//OnFwd(OUT_B,100)
//OnFwd(OUT_C,100)
//wait 4000
//OnRev(OUT_BC,100)
wait 4000
//Off(OUT_BC)
exit
endt
This code could be compiled using "Compile and Debug" and i finally got into debugger with the source window showing the code, but
i couldn't set any breakpoint or do anything. When i right clicked the mouse i could see the "enable/add breakpoint" etc, but whatever i choose
i couldn't see any breakpoint being added or set. Of course i connected to the brick before that. Basically i just saw my source code in a source window of a debugger but could do nothing with it. Every option was either gray, or simply did nothing. Only Source->thread/routing showed me the only thread i have.
Same, when i tried to add a hardcoded breakpoint using #pragma debugbreak the code would compile under "compile", but wouldn't compile
under "compile and debug".
Is anyone here had something similar running under Windows 7 or using this particular Bricx version with the debugger ?
Is there are some configuration or ini files to look at ?
I wish it has been more information on a debugger site regarding the problems people encounter.
P.S. I hope i came to the right place to ask all sort of technical questions.
Thanks,
CTAC
It is my first time here, since i just recently bought the NXT2 system and build my first robot.
It is based on a Race Car http://www.nxtprograms.com/NXT2/race_car/steps.html with the following modifications:
- Only 2 motors are used to rotate the wheels. The third motor has been removed and is being used to rotate the (well known deal extreme's) wireless camera.
- In order to have more power to rotate the wheels (now i have one motor rotating both rear wheels) the order of chain wheels have been reversed.
It also gives the ability to more precisely control the robot, since the car will drive slowly in such configuration.
The idea is to use a brick and its CPU as sort of robot controller, while using laptop for some kind of real time image processing (getting a video from wireless camera) and sending the commands (or sort of a model) back to the robot using Blue-tooth. This is the framework. Some fusion with other sensors is also a possibly on a later stage.
Anyway...
After some checking on the net (RobotC vs NBC-NXC vs NXT OS-ARM7 Native) i decided to start from the most "default" system
and went with NBC/NXC and Enhanced 1.28 firmware. Thanks to John Hansen.
I have recently installed both BricX IDE and Sorosy Debugger.
BricX version is 3.3.8.8, while Debugger is 1.0 Beta 3
I am running them on Apple MacBook Pro with Windows 7 (boot camp) using compatibility mode for Windows XP SP2 and "run as administrator".
I am using Enhanced 1.28 firmware.
First i installed the phantom driver (and NXT-G package), then BricX and finally the debugger.
For some reason i just could not start working with the debugger.
The IDE works fine, it communicates with the robot, compiles simple NXC/NBC sources i took from the example's .pdf and runs them on target.
Then, while trying to "Compile and Debug" this same NBC code, it just doesn't compile.
For example, the following NBC code compiles and runs perfectly.
thread main
OnFwd(OUT_B,100)
OnFwd(OUT_C,100)
wait 4000
OnRev(OUT_BC,100)
wait 4000
Off(OUT_BC)
exit
endt
Then, when trying to "compile and debug" while transferring to debugger the notepad opens and following errors appear
# Error: Duplicate variable declaration (__constVal1)
File "D:\Ctac\Lego MindStorm 2\Documentation\NBC (ASM)\tutorial-0.02\1-simple.dbg" ; line 140
# __constVal1 sbyte 1
#----------------------------------------------------------
# Error: Duplicate variable declaration (__constVal0)
File "D:\Ctac\Lego MindStorm 2\Documentation\NBC (ASM)\tutorial-0.02\1-simple.dbg" ; line 142
# __constVal0 sbyte
#----------------------------------------------------------
2 errors during compilation
Again, this same code was perfectly compiled and ran just before that while using "compile", "download and run".
Then, i thought it might be some sort of constant declaration/definition problem, so i just left with the wait.
thread main
//OnFwd(OUT_B,100)
//OnFwd(OUT_C,100)
//wait 4000
//OnRev(OUT_BC,100)
wait 4000
//Off(OUT_BC)
exit
endt
This code could be compiled using "Compile and Debug" and i finally got into debugger with the source window showing the code, but
i couldn't set any breakpoint or do anything. When i right clicked the mouse i could see the "enable/add breakpoint" etc, but whatever i choose
i couldn't see any breakpoint being added or set. Of course i connected to the brick before that. Basically i just saw my source code in a source window of a debugger but could do nothing with it. Every option was either gray, or simply did nothing. Only Source->thread/routing showed me the only thread i have.
Same, when i tried to add a hardcoded breakpoint using #pragma debugbreak the code would compile under "compile", but wouldn't compile
under "compile and debug".
Is anyone here had something similar running under Windows 7 or using this particular Bricx version with the debugger ?
Is there are some configuration or ini files to look at ?
I wish it has been more information on a debugger site regarding the problems people encounter.
P.S. I hope i came to the right place to ask all sort of technical questions.
Thanks,
CTAC