Main Site Documentation

Building the whole RLP project directly in Visual Studio


#1

Maybe this can help somebody.

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.

Ask me the finished project if you need it.


#2

This is a great idea! Maybe we should make a new NETMF template for RLP in visual studio!


#3

+1


#4

[quote]This is a great idea! Maybe we should make a new NETMF template for RLP in visual studio!
[/quote]
Almost done! :slight_smile:
Will post it later today. There still is some room for improvement regarding the makefile.


#5

Nice!!! :o


#6

A first version of the template ist here:
http://www.mikeleit.de/TinyCLR/USBiziRLPProject.zip

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. :slight_smile:

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.


#7

Can you put it on wiki as well?


#8

Thanks for sharing. We will give it a try later


#9

Here’s my feedback about Daniel_M template :

I’m working with Visual Studio 2010 (french version) with Windows 7 x64 and a Panda II.

For some reason the GHIElectronics.NETMF.Native reference give an error condition, I had to delete it and re add it.

The make command didn’t work for me, I had to replace it with make all.

I add the project dependency but the copy command in the pre build works only when I “rebuild all”.

I try my own template version with something similar to my first project :

http://pages.videotron.com/lmusique/RLP_USBizi.zip

You can try my template using the same method explained by Daniel_M in his post.


#10

@ Gus: I look forward to your feedback!

@ 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.


#11

Just checking if there is an update.


#12

Not yet, Ive been busy with my day job. I hope Ill have some time during my holidays next week.
Regards
Daniel


#13

I’m definitely looking forward to this as well.


#14

:slight_smile: 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

Is there a way to change this?


#15

As I said (wrote) before, this is still in the works on my side. :wink:
These days are very busy…


#16

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?


#17

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.


#18

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.