Topic : Custom build steps before and/or after main build

Forum : ARM

Original Post
Post Information Post
September 1, 2008 - 8:23am
Guest

It is a common requirement to have certain actions that must be performed before the main project build starts, and after the main project build completes; eg,

* before a build, import stuff from external tools;
* before a build, update a build number;

* after a build, perform post-processing required for the specific "delivery" processs.

How can this be done with RIDE?

Replies
Post Information Post
+1
0
-1
January 15, 2016 - 10:40pm
Don Marquardt

I have a similar requirement. The project and code I am working on is used for 6 different variations of hardware. The only difference is a #define which is currently in one of the header files. I would like to be able to externally start the build process with something like

ride7 -p "project name" -D "HARDWARE_DEFINITION 0x07" -HEX "hexfilename"

This would result in the project "project name" being built with the "HARDWARE_DEFINITION" value being passed to the (GCC) compiler as a -D flag and the hex file being output to "hexfilename".

How can I do this?

+1
0
-1
January 19, 2016 - 4:00pm
Etienne Cassin

Hello,

Concerning the first post, Ride7 provides pre-build and post build tools. A post build number example using jscript. plugin is also provided.

Only Enterprise have access to the plugin options.

About your specific question, you can use the Ride7 compiler configuration (Define,..) or you can make different application in the same project (file *.rapp).
In any cases you should play with the compiler and the define

Best Regards,

+1
0
-1
January 19, 2016 - 5:48pm
Don Marquardt

Thanks for the reply. That makes sense. I can create a different *.rapp file for each variation of hardware with the appropriate #define. This will also put the hex output in a unique file.

One more question. How can I invoke the complete  build process externally? I would like to have a bat file that has commands like

Ride7 -p HardwareVersion1.rapp

and when the bat file is run it would run the complete build process for each of the *.rapp files.

Thanks

Don

+1
0
-1
February 1, 2016 - 4:32pm
Etienne Cassin

Dear Don,

You should open your project and launch the build from a jscript *.js file (this file can be launch by your batch *.bat file).

Please have a look of the jscript examples provided by ride (one should do the same as your request):
C:\Raisonance\Ride\Scripts\Sample scripts

Best regards,

+1
0
-1
March 4, 2016 - 8:57pm
Don Marquardt

I cannot run a js file. I get the message "Your license does not allow you to use this feature. Contact Raisonance for more details".

Also your comment above says "open your project", I don't want to open my project and launch a build from the js file. I would like to launch the build from a bat or js file. So the bat file would contain something like

Ride7 -project=BridgeFB10.rprj -command=build

This would launch ride7 using the project file and execute the build command on that project.

+1
0
-1
March 4, 2016 - 10:45pm
Don Marquardt

If I use the 'Ride7 -p "full path to .js filename"' I get my build to work as I asked above. I still cannot run scripts from within my Ride7 instance.

+1
0
-1
March 7, 2016 - 2:04pm
Etienne Cassin

Dear Don,

Scripts in Ride7 are allowed only with Enterprise license. I checked in our database and I found that you activated your license with an Rlink-Pro. This Rlink PRO license (doesn't exit anymore) allows unlimitation in debug but is still a Lite license that means all enterprise options like script are not provided.

The RkitE-ARM with dongle is doing the same as the Rlink-PRO + enterprise options. Please contact me directly at if you need a quotation for an upgrade.

Have a look of our commercial web site (as you have already the pro rlink the price will be cheaper, just the cost of the dongle) http://raisonance.com/RKitE-ARM-Upgrade__product__arm.html.

Regarding your other request you can use three different technics to build with command line:

1. by a jscript (have a look of the examples provided at C:\raisonance\Ride\Scripts\Sample Scripts and the documentation about automation and plugins in Ride7 documentation -> Ride7 for ARM ->Working with Ride7 IDE -> Automation in Ride7/Ride7 plugins).

2. by a Makefile (In ride7 right click on the application then "generate Makefile")

3. by copying in Ride7 the "Build Log" from a "build" (not a "make") and paste it in a batch file.

The first option need an installed Ride7 enterprise version. The second and third option doesn't need necessary Ride7 but you must regenerate the script manually (Makefile or bat) when modifying the project. jscript option allow also to test the debug (control of almost Ride command).

I hope it helps.