![]() |
RoboEmu & RoboGUI
Would anyone like to see these two programs re-wrote to work with the new PIC-C language?
If so, I'd be glad to re-write them. Please post your thoughts, opinions, etc.... |
If you could please try and keep the cross platform (or at least dual-platform) nature of these applications it'd be much appreciated, I'll run code on linux for you if you don't have an installation free to test upon. Might end up helping fix a few things too, assuming it's open-source? (if you're using rob's code as a base open-source is not optional.)
|
Quote:
Both will be off of Rob's code, I'm just going to make the necessary changes for the language. This way, people that are used to how it was will still be able to use it....unless I end up having to re-do everything (dreads that). Thanks for help, I'll keep in touch with you as soon as I get more info on the language. |
I'd be more than glad to try to help as well if you need it.
|
YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! YES!! ...............
I was going to post this myself, but you beat me 2 it. I wish there were some way i could help. |
Mike & Rick: You both can help with cross-platform stuff, and I'm sure I'll IM you both about the code ;)
Thanks for all the help, and I'm glad many people really do like these programs. [Sorry if I sound like Rob, I'm just really suprised honestly that these tools have helped out a lot of people] /ponders what Rob would post if he read this thread |
Quote:
As of right now, I am planning on updating at least RoboEmu (RoboGUI is a mess right now, and I don't think it's anywhere near as popular). As for cross-platform compatibility, that's definately in the plans. A few problems: a) RoboEmu will basically need to be gutted and re-written from the ground up. b) I'm not on a team and have no controller to test things with. c) I haven't seen a formal spec for the language yet. (Please don't say implement all of C. That's about the same as writing a C compiler, which is a HUGE project and one that I doubt anyone here has the time to take on). So, that said, here's what I need from you guys: 1. can somebody find me the language spec? 2. are you all willing to test code for me? 3. please be patient. I love working on RoboEmu, but this a gigantic change. Luckily, version 2.0, which I almost finished this summer, should be easier to adapt to the new controller and will be much easier to keep cross-platform compatible. 4. even though RoboEmu is GPL, so you are technically free to do whatever you want with it, I think it would be benneficial to coordinate everything through me so that somebody doesn't end up duplicating work I've already done. Remember, competition doesn't start until January. I will definately try to have something done significantly before that. -Rob |
Quote:
2. I would be more than willing to test it Thanks Rob for the great work. |
Yea, I haven't found out about the code either, I hope that something comes with the new edubot controller that will give us just the basics if anything.
I'll definitly help beta test as well |
Quote:
Hope this helps, some. I'm not sure what, if anything, I'll be able to do concerning the actual development of the software, though. Sorry. |
Quote:
Why try to interpret the C code as it runs? As you say, implementing all of the language constructs would be a lot of work. It would be much more efficient to just compile the user's RC code into a native library on the host's workstation and then link it in at runtime... I would think that would simplify the porting of your application quite a bit. Most likely IFI will provide some sort of library for the RC that will have some standard functions for reading inputs, writing outputs, setting PWMs, etc., so all you'd have to do is provide the same interface for the user's code to work with. Besides, it'll be much harder to interpret programs written for the new processor and maintain real-time speed than it was with the pokey BASIC Stamp. |
Quote:
And rob, don't worry about testing. I think people are quite eager to test. The full details im guessing will be out around the 10th. |
Quote:
|
Sweet... if IFI releases said library... we'll have to see a bit before anything can really happen.
I need to learn to be more patient. |
Quote:
If I get enough info., I might be able to re-write my FIRST Editor to use the PIC-C language. |
Quote:
IMHO it would probably be better to write an interpreter for .asm files that have already been compiled. Let me just say no matter how it is done, this will be no easy feat. |
Eh, an ASM intepreter doesn't seem all that bad... only 26 instructions to implement and you've got the entire capabilities of the mc pretty much dealt with.
|
Quote:
|
If you realy want to simulate the pic you should take a look at gpsim from the gnupic project.
http://www.dattalo.com/gnupic/gpsim.html It should make Rob's job a lot easier. |
oh yea i forgot all about gpsim.
|
Quote:
This sort of thing is done all the time in the embedded software world. It is essentially the equivalent of porting code from one processor/board to another, which is one of the advantages of using a higher-level language like C. |
I am no expert on the subject, so correct me if i am wron but it is my understanding that it would be quite hard to make PIC asm run on an x86 protected mode architecture while running windows/linux at the same time. The x86 architecture is soo entirely different from PICs. How would that work? It just seems alot easier t ome to emulate a pic just like rob did with the Basic Stamp. I can uinderstand maybie porting from for examply HC11 to PIC but to x86? Maybie im misunderstandin or missing something here but thats my $.02 Besides when you already have something like gpsim to work off of why bother?
[edit] Wait scratch all of that.... I see what you are saying now. Compile the C code to run on x86. I for some reason thought that you meant try to convert PIC asm to x86 asm. I see now. (feels liek idiot) {/edit}:eek: |
Quote:
|
Quote:
or maybie you just replied bofore i added the "edit" |
Quote:
|
I thought MPLAB allowed for limited simulation of codes. I guess I really should reinstall it.
|
As a quick fix, I have definately already considered doing the compile for x86 thing. It would make life SO easy. However, this would imply that people would have a C compiler on hand and that they would be able to re-compile every time they want to test new code. Personally, this sounds tedious to me. On the other hand, it's probably the easiest solution.
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
gcc.exe 86k cygwin1.dll 948k libc.a (stripped) 416k libm.a (stripped) 113k Depending on how much else would be needed for a functional gcc environment, that's about 1.5M, which isn't too bad... |
|
Sounds great; let me know when its ready.
|
Quote:
For the record, RoboEmu was a fantastic tool for our team last year. We were a budget constrained first year team, so without RoboEmu we would have had only one way to run programs. THANK YOU ROB! |
Re: RoboEmu & RoboGUI
that would make me VERY HAPPY!!!!!
The other programmer on my team decided to take the Edu controller home until he knows C -- which could take a while, since he seems to program entirely by trial and error. :rolleyes: So, I have no way to get used to the new chip except writing a bunch of test programs, giving them to him, and hoping he runs them and gives me back the results. Talk about tedious. Even if the new RoboEmu can't simulate the EduBot, it will still be very useful. Thank you so much!!!!! :D ~Aaron P.S. Another nice C++ compiler is MinGW. I don't know if it fits your needs, but I got it with Dev C++ and I like it a lot! |
Re: RoboEmu & RoboGUI
Yes, minGW is quite nice. It works very well with Dev C++, which i would also recomend to anyone who wants a C/C++ compiler. Its free, open-source, colorcoded, and looks good. Plus it has power to boot.
P.S.Doesn't it also come with GCC for C compiling? |
Re: RoboEmu & RoboGUI
Quote:
Almost (I THINK) every (C/++) compiler out there has syntax highlighting (color corded). |
Re: RoboEmu & RoboGUI
Quote:
|
Re: RoboEmu & RoboGUI
Quote:
|
Re: RoboEmu & RoboGUI
Ok, I think I am lost. If you are talking about recompiling the emu for each program, I think that would be a little overkill. (If that's the case, please use Dev-C++)
How hard would it be to creat an emulator for the HEX files that are downloaded to the RC? |
Re: RoboEmu & RoboGUI
Quote:
As for the emulation for HEX files, it might be difficult. You'd need the file specs I think. Anywho, the specs for .hex files aren't out, I don't think. If anyone can prove me wrong, please...because I'd love to see the specs for the format. |
Re: RoboEmu & RoboGUI
Quote:
http://www.microchip.com/download/ap...cxx/91026a.pdf It's for the C16 but it should still apply to the C18. Also try searching google for "INHX32" or "INHX8M." |
Re: RoboEmu & RoboGUI
Quote:
Wouldn't Robo* have to have an emulator for the HEX file anyways though? |
Re: RoboEmu & RoboGUI
Hmm... a emulator for the new PIC controller... now that would be awesome.
|
Re: RoboEmu & RoboGUI
Quote:
|
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:)* |
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.
|
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.
|
Re: RoboEmu & RoboGUI
I don't blame you, Rob, interrupts are scary in and of themselves, much less emulating them on an x86.
|
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 |
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 |
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 |
Re: RoboEmu & RoboGUI
Quote:
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 |
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