C/C++ Build configuration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C/C++ Build configuration

5,966 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jush on Mon Jul 26 03:15:27 MST 2010
Hi,

I build a sample project for LPC13xx that the configuration is set as Debug [Active] or Release[Active] and it works fine.
Example:
Configuration: Debug[Active]
Makefile Generation: Check the two check box
Build Location: ${workspace_loc:/LPC13xx/Debug}

for Release:
Configuration: Release[Active]
Makefile Generation: Check the two check box
Build Location: ${workspace_loc:/LPC13xx/Release}

Question:
1. I make a folder for the output path of the build compilation like Test\Build\ Release same with the debug and pointing on this path the build directory and during compilation of the project it got an error. Do you have any idea if this could be possible to work? How?
2. In the folder were the workspace is stores I make another folder for the build output with 2 folder namely for release & debug and pointing also the build directory here  just trying if it works but unfortunately same error encountered.
3. Is it possible that I can use the Release and debug during compilation of the project at the same time? What i mean that both can set as ACTIVE.
Since during the creating a new project in SELECT CONFIGURATION wizard I select the Debug and Release but only one of them can set as ACTIVE. I make a Launch group in the  run configuration and select the two but unfortunately it didn't work also and maybe it's because of the build directory for the output path.

One more thing I really want to save into another folder for the Build output just separate on the folder were the workspace is being stored.
Example:
test\
     \build --------->for the object file and others
             \debug
             \release
     \LPC13xx ------>were the project stores
              \.metadata

Is this could be possible in LPCXpresso IDE? How? Since a lot of option i make and didn't work as what I wanted to happen.

Thanks.
0 Kudos
Reply
5 Replies

5,918 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jul 27 04:59:17 MST 2010
The Post Build step are just commands executed by a command line processor. Although you can only enter a single line, you can have multiple statements, seperated by ';'. The command(s) are run in the build directory (i.e. Debug or Release)

There are a number of Macros available to help. You can find more information on our support site at:
http://support.code-red-tech.com/CodeRedWiki/BuildMacros
0 Kudos
Reply

5,918 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jush on Tue Jul 27 01:00:34 MST 2010
I also try the Post Build steps but still didn't work, I forget to mention in my previous post. Maybe something wrong with path...:confused:, could you pls elaborate more about creating the path of Post build?

Error:
make --no-print-directory post-build
Performing post-build steps
cp /BUILD/Debug/
cp: missing destination file
Try `cp --help' for more information.
make[1]: [post-build] Error 1 (ignored)

  It compile successfully and i select the Generate Makefiles Automatically ---->Build directory: ${workspace_loc:/LPC13xx/Debug}
It says Finished Building target: filename.a
after this line, the error shown above follows.

I like to point out also that mybuild output folder is outside of the workspace location.
Like:
Test\mybuild\Debug ------>for the object file
Test\CodeRed\LPC13xx  ----> set as my workspace were .metadata and importlog save in short  in here the project files stores.

During compilation:
Test\CodeRed\LPC13xx\Debug  ----->the object files during compilation
--------------------------could you make a sample directory for the Post builds on this?-------------

Do you have any idea on how to make a Makefile?or any reference... thanks.
0 Kudos
Reply

5,918 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jul 27 00:11:36 MST 2010
"BuildError.jpg"
- in here you have switched off "Generate Makefiles Automatically". This implies that you are going to provide the Makefile yourself. As I mentioned in a previous email, you cannot change the standard build location - it is always uses the name of the Build Configuration.

"AllConfiguration.jpg"
- Selecting "All Configurations" is NOT setting the Build Configuration, instead it allows you to change settings that are common between Build Configurations. Again, as mentioned previously, you can only have one active build configuration.

"Debug&Release.jpg"
- No. See above

Again, as mentioned before, if you want the results of the build to be placed into a specific location, you can use a Post Build step to copy them there.

"RunConfigurations.jpg"
- We automatcially create a Debug configuration for both the Debug build and the Release build, thus allowing you to debug either.
0 Kudos
Reply

5,918 Views
lpcware
NXP Employee
NXP Employee

Content originally posted in LPCWare by jush on Mon Jul 26 19:27:50 MST 2010
I make an attachment for the compilation I made and specify the directories and point out some of my queries. Kindly see my attachment, and for the reply just specify image file name.


Thanks.

0 Kudos
Reply

5,918 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Jul 26 04:08:44 MST 2010
It would really help if you say what the error is - I can't see your screen from here.

1/2. The output directory is always based on the Build configuration name. So, if you have a build configuration called "Test", it will build into a directory called Test. However, you can always use a Post Build step to copy the results into another directory. For example, you could use
cp ${BuildArtifactFileName} /my/build/location

3. No. You can only have one Active build configuration.
0 Kudos
Reply