News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Using the "Command Line Macro"

Started by chinshu, July 10, 2008, 08:32:45 PM

Previous topic - Next topic

chinshu

Hello,

I am currently having trouble in making Code:Blocks use the information I have put in for the command line macro for compiling source code for the MSP430.  The tool chain I am using is the latest version of MSPGCC.

The heart of the problem lies in that no matter what I put into the command line macro box, be it the correct method for calling the compiler or complete trash, Code:Blacks seems to ignore it.  The "command" drop down box is set as "compile single file to object file" and no source extension is specified - it is blank.

Upon executing the build command, the following output occurs in the build log:
Quote-------------- Build: Release in Test ---------------

msp430-gcc.exe     -IC:\mspgcc  -c test1.c -o obj\Release\test1.o
msp430-gcc.exe -LC:\mspgcc\lib  -o bin\Release\Test.exe obj\Release\test1.o   
Output size is 2.85 KB
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings

My goal is to get Code:Blocks to issue something such as the following to the compiler: "msp430-gcc -Os -mmcu=msp430x1121 -o test1.elf test1.c".  Is there an option that I have to use for Code:Blocks to be able to carry out such a function?

I appreciate any help.

mariocup

Hi chinsu,

do the following steps:
1. Set the build options -Os (optimization) and -mmcu=msp430x1121 in the project properties.
2. Select the "Build targets" tab of the Project Properties and enable the following options:
Type: Console application
Output filename: test.elf
Checkbox enabled: Auto-generate filename prefix
Checkbox disabled: Auto-generate filename extension

Since I am using the MSP430 also in a different project, perhaps I will make some wizards as soon as I have some time.

Bye,

Mario

chinshu

Thank you for the quick reply Mario.  It works perfectly. :)