Running Deployment Scripts from CodeLite

General questions regarding the usage of CodeLite
Verax
CodeLite Enthusiast
Posts: 46
Joined: Sat Jan 19, 2013 10:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Running Deployment Scripts from CodeLite

Post by Verax »

I'm using Codelite for embedded development, and after building my project, I have to run some deployment scripts to erase the board's flash and upload a hex file to the target board.

I'd like to run a series of console programs (or preferably a batch file) to do this right before running or debugging a project. I don't want to use the Post-Build commands because the process takes too long (approximately 20 seconds) and I don't want to have to do this every time I build the project. Just when I'm ready to run it.

Observation 1
I noticed that if using the "..." button to set the program to a batch file, the path will contain "/" as opposed to "\". When running the program (Ctl-F5), a console window opens and shows an "unrecognized command" error. It happens so fast I can't see the exact error.

Observation2
If I replace the "/" with "\" the batch file runs, but opens up a separate console window. I'd prefer to have the output display in CodeLite's output pane.

Question 1
I'd like CodeLite to start the batch file and display the output in the "Output" window. Is this possible?

Question 2
Is it possible to run this deployment script right before starting the debugger (F5 method)?

CodeLite v5.0.6213 (Official Build)
Windows 8 64-bit
User avatar
Jarod42
CodeLite Expert
Posts: 240
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Running Deployment Scripts from CodeLite

Post by Jarod42 »

In project settings,
- you can set 'pause when execution ends'

- You can use external tool plugin to launch any script
Verax
CodeLite Enthusiast
Posts: 46
Joined: Sat Jan 19, 2013 10:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Running Deployment Scripts from CodeLite

Post by Verax »

Observation 1
I noticed that if using the "..." button to set the program to a batch file, the path will contain "/" as opposed to "\". When running the program (Ctl-F5), a console window opens and shows an "unrecognized command" error. It happens so fast I can't see the exact error.
Observation2
If I replace the "/" with "\" the batch file runs, but opens up a separate console window. I'd prefer to have the output display in CodeLite's output pane.
In project settings,
- you can set 'pause when execution ends'
Thanks. I can see the error is "'..' is not recognized as an internal or external command, operable program or batch file." My entry is for the "Program" textbox is "../../../Debug.bat". If I replace the "/" with "\" the batch file executes. A very minor problem, I admit.
Question 1
I'd like CodeLite to start the batch file and display the output in the "Output" window. Is this possible?
Question 2
Is it possible to run this deployment script right before starting the debugger (F5 method)?
You can use external tool plugin to launch any script
Using the External Tools plugin works great. Checking the "Capture process output" puts the output in the output pane, however...

Q: I can't see the output in the output pane until the program finishes executing. Is there some way to show the output while its executing?

Q: Is there some way to integrate this into the build process, so I can execute the external tool right after a build (so I don't have to wait for the build to finish to initiate the deployment)? Again post-build is not what I'm looking for. I'm looking for something equivalent to executing an external tool instead of the default "Run".
Post Reply