Here’s how to modify the “RLP_Extensions_Example” project so it can be modify and build in Visual Studio.
1 - Move the Native folder in the RLP_example folder and the RPL.h file in the Native Folder (just for simplicity)
2 - Add the makebat batch file containing the only line “make all” in the Native folder so you can see the output of the make command in Visual Studio
3 - In Visual Studio add the RLPext_example.c file to the project “as a link” (so the file stay in the Native folder)
4 - Delete the RLPext_example.elf file in the Resources folder and add the RLPext_example.elf file of the Output folder as a new resource
5 - In the project’s property, add the following lines in the pre build command
cd $(ProjectDir)\Native
makebat
Now when the RPL C file is modified, the elf file will be rebuilt; if the file contains errors they will be visible in the Output window in Visual Studio.
Maybe somebody familiar with Visual Studio project template can create a RPL project template to simplify the whole.
[quote]This is a great idea! Maybe we should make a new NETMF template for RLP in visual studio!
[/quote]
Almost done!
Will post it later today. There still is some room for improvement regarding the makefile.
Just copy the zip over to the appropriate folder for user templates:
C:\Users\yourusername\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#\Micro Framework
The template should then appear in VS2010. After creating a new solution, it is necessary to check the project dependencies. The makefile project must be built first. It could also be necessary to change the pre-build action according to your solutions path.
I used the RLP extensions example to create the sample project, so you’ll have a good and working starting point. Don’t forget to uncomment the RLP.Unlock in the managed code.
For building the native part, YAGARTO needs to be installed and “make” must be in the PATH variable of the system.
EDIT: forgot to mention that you can of course use VS to edit the C source and enjoy IntelliSense.
@ Architect: I’ll post it on the wiki when those minor issues are sorted out. Everyone can feel free to contribute to this.
@ Pierre:
It looks like my currently installed GHI SDK is outdated, will fix this for the next template version.
I’ll also have a look at the build commands make vs. make all. Maybe there’s something with the gcc version I’m using together with YAGARTO.
Just downloaded your template and will give it a try.
EDIT: Your template works out of the box. However, Intellisense is not active for the native code, that’s why I created an additional makefile project. I think we’re not far from something that can be used by everyone who want’s to make the first steps with RLP.
This is really neat! Thanks Daniel and Pierre for the templates.
I tried Daniel’s template but it gives me an error when trying to create a new project.
I installed Pierre’s RLP_USBizi.zip template, and successfully created and deployed his example application to my Panda II. Thanks again. This gives me a good head start on creating my own RLP code. My only small complaint is that the New Project dialog does not ask for a directory, and it ends up creating the project in this directory:
C:\Documents and Settings\Jim\Local Settings\Application Data\Temporary Projects
Daniel_M hos did you exported the solution template?
I want to make a template project for my EXM equivalent project.
I can only export C# projects but not C projects. Did you exported the project manual?
Yes, it was a manual export. I used the export wizard for the managed part, but the native part has to be done manually. I then created the vstemplate files for the native part and the complete solution folder.
Yes I suspected that. I have another approach for my RLP templates because i’m using uVision for native
side of development fez or other components I have created an template that incorporates the uVision project with gcc.
The uVision project can be compiled from command line, this means you can add files in Visual studio and compile the native code. The benefit is that you don’t have to alter the make file, uVision generates that for you. Cons are that you cant just export the template to another PC, if the paths don’t correspond the uVision project wont compile.