Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   RoboEmu & RoboGUI (http://www.chiefdelphi.com/forums/showthread.php?t=22168)

rbayer 15-12-2003 23:13

Re: RoboEmu & RoboGUI
 
Quote:

Originally Posted by Raven_Writer
Wouldn't Robo* have to have an emulator for the HEX file anyways though?

Nope. As of right now, the plan is to use gcc to compile the user's C code into a DLL (or .o for linux) which RoboEmu will load at runtime. The vast majority of the default code isn't needed for RoboEmu, and trying to sort it out of the hex file would be rather difficult and overly complex.

mtrawls 02-01-2004 14:59

Re: RoboEmu & RoboGUI
 
I don't want to seem impatient on ungrateful ... but might I inquire as to how the progress is going on RoboEmu? It's an invaluable piece of software, so if there is anything you need help on (coding, or more likely testing), I'd be willing to contribute. Seeing as the season is about to start, it would be nice to have this.

*crosses fingers that it is done already:)*

rbayer 02-01-2004 16:06

Re: RoboEmu & RoboGUI
 
Well.... ummmm... not so well. I've been REALLY busy lately and really haven't had any time to work on it. Also, just thinking about doing interrupts scares the living daylights out of me.

rwaliany 02-01-2004 17:33

Re: RoboEmu & RoboGUI
 
I'm not sure I understand why you would compile it then load it in RoboEDU. If, I was doing it in Linux, I would copy the new modified source code to the directory, send a make command, have the Makefile use a different file than main.c to load it's own void main, then compile, the ACTUAL RoboEDU GUI program would be in that source code. Then, when it's done compiling, I would run an exec command to reload the application on the fly with the new source code embedded into the RoboEDU GUI. From int main, I would send it sample runs. You can pass all the window parameters etc via command line, execl("filename", "para1", "para2", "para3", etc..., (char *)null); I do this for my online C server game, so I never have to kick players off during reboots. Also for windows, you could use freecommandlinetools.exe for the compiler, search google, but I'm not sure if you can reload applications on the fly while their running reload the executable.

Skabana159 02-01-2004 19:19

Re: RoboEmu & RoboGUI
 
I don't blame you, Rob, interrupts are scary in and of themselves, much less emulating them on an x86.

rbayer 03-01-2004 16:01

Re: RoboEmu & RoboGUI
 
Alright, I started working on it a bit last night and made a lot of progress. I still need to finish doctoring up the default code (#ifdefs like whoa), but everything's coming together quite nicely. Over the summer, in anticipation of a possible change of language, I spent several weeks putting all the PBASIC-specific stuff into a DLL. Thus, all that really needs to be done is finish up creating the new, C-specific DLL. The changes to the UI code should be truly minimal. Also, since the UI code hasn't really changed since version 1.07, a Linux port should follow shortly after the Windows version is done.

For those interested, here's the basic "zen" of RE2:

-The same familiar, clunky, bright green interface is back. Unless something is drastically different about the new controller, don't expect this to change any time soon. I hate writing UI-code, and right now functionality is much more important than visual appeal. Eventually, I'm going to sit down and learn Qt so I can unify the Windows and Linux source code, but that's a project for farther down the road.

-The default code from InnovationFirst is currently in the process of being doctored up with more #ifdefs than I care to count. Basically, if RoboEmu is the one compiling it, it will use RoboEmu's versions of GetData, PutData, EEPROM functions, etc. If it's the normal C18 compiler, it will compile as if it's the original file from InnovationFirst.

-A makefile (for now, only for VC++, gcc version coming soon) will be provided that will compile your custom code (from user_routines.c) along with some RoboEmu specific code into a DLL that exports various symbols, such as Process_Data_From_Master_uP(), etc

-The DLL will be loaded by RoboEmu at runtime and will be used to actually emulate your code.


Stuff for the future:
Interrupts(hopefully). I have some ideas, but their untested, and as of right now, they're fairly low-priority (no pun intended).


Anyways, I'm not even going to try to guess at a possible initial release date, but it should be sometime soon, hopefully before kickoff.

-Rob

jerry w 03-01-2004 16:33

Re: RoboEmu & RoboGUI
 
very glad to see that work is continuing on the emulator.
it was indispensible to team-79 last year.
i like the clunky green color.
i will do any beta testing or other tasks that i can do. (C is not my favorite language)
put me on the list of ones who want to help.

Jerry Waechter

rwaliany 03-01-2004 19:29

Re: RoboEmu & RoboGUI
 
Wait...what's the point of this. MPLAB comes with a pretty HEFTY debugger which you can simulate the PIC with.

To enable the debugger, compile your code. Then click Debugger -> Select Tool -> MPLAB SIM -> Then you will now be able to run your code under the MPLAB Simulator... Why recreate what is already there? If you're going to make RoboEDU for the PIC, why not use MPLAB SIM. That should make it a lot easier.

To view variables, etc... go to view disassembly, hardware stack, program memory, EEPROM, watch, special function registers, etc...stop and run as you want, pause the program, whatever you want.

It's really nice, I was using it for our autonomous blimp project using another PIC. I just tested it and it works with our current robot controller.

Thanks,
Ryan Waliany

Vladimir 14-01-2004 01:51

Re: RoboEmu & RoboGUI
 
Quote:

Originally Posted by rwaliany
Wait...what's the point of this. MPLAB comes with a pretty HEFTY debugger which you can simulate the PIC with.
.....

Correct me if I am missing something, but the MPLAB sim does not simulate radio communication with our code, so RoboEMU allows us to simulate the program running as it would in a "real" environment, attached to controls and motors, so we can test inputs/output. It's also graphical and easy.

Rob: Your RoboEMU was invaluable to me last year. I doubt my team would like me taking the $1200 RC/OI home to work on programming, RoboEMU let me develop a lot of things and come in next day with a magic disk and make everyone happy :D I am fluent in C and am willing to help develop/test the new version in any way I can, just let me know.

-Sean

rwaliany 14-01-2004 01:58

Re: RoboEmu & RoboGUI
 
It should, you can "inject" all variables and set them. I think you can just set the radio control variables, I'm not sure. I stopped using Windows to program when I got the IFI Loader for Linux working. It takes some getting use to. The variables you want to set/access just have to be global.


All times are GMT -5. The time now is 19:53.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi