I'm trying to use the Dev-C++ 4.9.9.1 with the MSP430 processer. I get an error on compile "invalid option 'windows'. The program puts in a -mwindows option into the makefile which causes the error. How do I turn that off. I've looked at the compiler options and can't find anything that might remove it. Thanks for any help provided.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, you are compiling a project (I see the makefile), so you probably have options set in your project options. Did you mean to have all of the following set:
-ansi -g3 -nostdlib -mwindows
Note also that spaces in your path to your code are a very bad idea. Do not put your projects in paths like this:
C:\Documents and Settings\Alan Adkins\My Documents\Transneuronics\Software\gcc430
I see you basically ignored the second question I asked:
Also, are you compiling a project, and if so, what kind?
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't think I intended to have these options (-ansi -g3 -nostdlib -mwindows) set. In fact I want to turn off the -mwindows but can't figure out how.
I am compiling a project - Win32 Console. The three other options (gui, static lib and dll) all give other errors so console is the only viable choice.
As for the directories with spaces, I'll move my source.
Can you tell me what option controls the -mwindows?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I see no option for a Win32 Console. (Thats even a bit of a contradiction in terms). If I go to create a New:Project:Basic - the options for types of projects are:
Windows Application
Console Application
Static Library
SLL
Empty Project
I personally would suggest an "Empty Project", its what I use most of the time - as I set my own link and compile options.
I set the options for a project through
Project:Project Options:Parameters
by the way.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you right click on the project and select properties, the display shows win32 console.
I tried creating a new project and selected the "Empty Project". I then added the example file fet120_2dt01.c in the C:\mspgcc\examples\slac013 directory and tried to comple it. I get the same -mwindows error.
Below is the build log.
Compiler: MSP430
Building Makefile: "C:\Dev-Cpp\msp430\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\msp430\Makefile.win" all
msp430-gcc.exe -c ../../mspgcc/examples/slac013/fet120_wdt01.c -o ../../mspgcc/examples/slac013/fet120_wdt01.o -I"C:/mspgcc/msp430/include" -mmcu=msp430x1232 -g -nostdlib -mwindows
cc1: invalid option `windows'
make: *** [../../mspgcc/examples/slac013/fet120_wdt01.o] Error 1
Execution terminated
Any suggestions?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yep, for an experiment, do NOT use a project. Just create a New:Source File, put your code in, set whatever options you need in Tools:Compiler Options and see what happens.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did that and have the same issue. The -mwindows is still added.
I'm wondering if that can be turned off some how or if I need to tell it not to create a make file but to use a custom make file.
Thanks.
AA
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, Now I've created a project using the sample FET120_WDT01.c file in the mspgcc\examples\slac013 directory. I modified the makefile to only list that file as the only "PROGS" file, and I set the Makefile options in the Project Options to use a custom makefile. The first error I got was a "no input file" error.
So I included the full path in the make file and I can get it to compile (finally!).
Now when I try to debug, I get an error "Project is not compiled".
Any suggestions?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"So I included the full path in the make file and I can get it to compile (finally!)."
You later data suggests that, while you may not have gotten an error message, you ddi not in fact compile successfully.
Now, get a large piece of wood, a 2x4 or a baseball bat will do. Hit yourself over the head. Hard. It should hurt. Badly. Hospitalization is reasonable.
ALWAYS POST YOUR FULL LOG! ALWAYS. Even if your question is about politics. ALWAYS ALWAYS ALWAYS post your full log.
Please post the log for your single file experiment and for your new project.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks, your 2x4 hint really helped, except, I think it should be applied to the DEVC++ author instead for not verifying the code.
Attached is the build log. Last line says that it compiled successfully.
Also, from other msgs I tried the build and run button, and still get the msg that the project is not compiled.
"I think it should be applied to the DEVC++ author instead for not verifying the code."
roflmao. You are funny! :)
Now , you get to help me out here - here is your baseball bat (aluminum) for correction related activities - have you visually confirmed the presence of a compiled executable? Warning: It may be somewhere you don't expect, so a search may be in order.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a file that was created with the same name and no extension in the source directory. The time stamp is such that each time I rebuild it gets re-written.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm from the old old school and like to see the file extensions, so there is no extension. The file is a binary file.
Subsequent to the last message, I set the Executable ouput and the object file output directories (in the Project options/build options dialog) to a specific directory and rebuilt the program. Again the compile log said "Compilation successful" but there were no files created or modified in that directory, but the file with no extension was updated in the source directory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I moved it, I renamed it and get the same results when I try to debug (project not compiled). The file with no extension is in the new directory location.
I don't understand. To run a program, it has to be loaded into the microcontroller. In other programs I've used this was done through the debugger or there is a menu that allows programming of the processor.
DevC++ doesn't have a link to allow the flash to be erased and programmed.
The file the microcontroller (MSP430) is programmed with is usually a hex file with the object code in it or possibly with a binary file. In all the cross compilers I've delt with, I've never seen one were the "executable" code has an exe extention (except for programs that run on a PC which this isn't).
So my first question, is how would I load the file?
It doesn't make sense for me to rename it, but if you can tell me how to load it, then I'll try and rename it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
drwayne,
Do you by chance have a sample DEVC++ project for the MSP430 with simple source that you know compiles and runs that I can copy as a whole into a directory and test? (Project file, source, etc - everything DEV C++ needs so I just open the project and it's all there, nothing else to configure) That may help me in figuring out what I have wrong.
Thanks
AA
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"So my first question, is how would I load the file? "
That is where my question had the potential to be stupid. I did not know whether you had some other means for doing the load of your cross-compiled code, other than Dev (I have done some embedded work in which a loader program was used). And I had no idea about what support you had or needed on the embedded platform to run the code in question. So I was obviously hoping a moronic leading question would strike something useful....what a putz.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2005-01-19
Ok, I've only quicklu scanned through the messages above but here are a few pointers:
Dev-C++ can be made to work with any GNU compiler, however it is primarily designed to work with the Windows/x86 GNU compilers from MinGW and Cygwin. As a cross development environment it has some limitations.
Firstly, the built in debugger is not a cross-debugger, you cannot debug, download, or execute your cross-application from Dev-C++'s standard menus. If you have an external cross-debugger (such as Insight/GDB built for your target processor), and appropriate target debug agent code, then you can integrate it with Dev-C++ via its Tools menu customization.
The file the compiler outputs is a binary file. If you expect a HEX file, then you need a binary to HEX conversion tool to convert the binary to the HEX format expected by your device programmer or downloader. This can be automated by adding an "after-all" rule via the makefile customisation option. You may also be able to add commands here to perform the download automatically on a sucessful build.
If you set the project for Win32 Console, the -mwindows option should not occur, although I cannot confirm that, since I do not have Dev-C++ installed currently, (a combination of moving house, and hard drive death just prior to the move!).
This document may help: http://www.bloodshed.net/dev/SetDevCPPArm.pdf. It talks about setting Dev-C++ up with the ARM GNU cross-compiler. It is for an older version of Dev-C++ and assumes that you have the cross-compiler installed as part of a Cygwin installation, which may not be the case here, but it should be easy to adapt.
The only unresolved issue I have found with using Dev-C++ as a cross development tool, is that the toolchain program executable list does not allow you to specify an laternative ranlib.exe, which means that you cannot create static libraries without manually modifying the generated makefile.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to use the Dev-C++ 4.9.9.1 with the MSP430 processer. I get an error on compile "invalid option 'windows'. The program puts in a -mwindows option into the makefile which causes the error. How do I turn that off. I've looked at the compiler options and can't find anything that might remove it. Thanks for any help provided.
Post your full compile log please.
Also, are you compiling a project, and if so, what kind?
Wayne
Compiler: MSP430
Building Makefile: "C:\Documents and Settings\Alan Adkins\My Documents\Transneuronics\Software\gcc430\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\Alan Adkins\My Documents\Transneuronics\Software\gcc430\Makefile.win" all
msp430-gcc.exe -DDEBUG -c "../1232 Code/GenCode/GenCom.c" -o "../1232 Code/GenCode/GenCom.o" -I"C:/mspgcc/msp430/include" -O2 -mmcu=msp430x1232 -mmcu=msp430x1232 -g -ansi -g3 -nostdlib -mwindows
cc1: invalid option `windows'
make: *** ["../1232 Code/GenCode/GenCom.o"] Error 1
Execution terminated
OK, you are compiling a project (I see the makefile), so you probably have options set in your project options. Did you mean to have all of the following set:
-ansi -g3 -nostdlib -mwindows
Note also that spaces in your path to your code are a very bad idea. Do not put your projects in paths like this:
C:\Documents and Settings\Alan Adkins\My Documents\Transneuronics\Software\gcc430
I see you basically ignored the second question I asked:
Also, are you compiling a project, and if so, what kind?
Wayne
I don't think I intended to have these options (-ansi -g3 -nostdlib -mwindows) set. In fact I want to turn off the -mwindows but can't figure out how.
I am compiling a project - Win32 Console. The three other options (gui, static lib and dll) all give other errors so console is the only viable choice.
As for the directories with spaces, I'll move my source.
Can you tell me what option controls the -mwindows?
I see no option for a Win32 Console. (Thats even a bit of a contradiction in terms). If I go to create a New:Project:Basic - the options for types of projects are:
Windows Application
Console Application
Static Library
SLL
Empty Project
I personally would suggest an "Empty Project", its what I use most of the time - as I set my own link and compile options.
I set the options for a project through
Project:Project Options:Parameters
by the way.
Wayne
Wayne:
What's an SLL? Sometimes Linked Library?
See Ya
Butch
When you right click on the project and select properties, the display shows win32 console.
I tried creating a new project and selected the "Empty Project". I then added the example file fet120_2dt01.c in the C:\mspgcc\examples\slac013 directory and tried to comple it. I get the same -mwindows error.
Below is the build log.
Compiler: MSP430
Building Makefile: "C:\Dev-Cpp\msp430\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\msp430\Makefile.win" all
msp430-gcc.exe -c ../../mspgcc/examples/slac013/fet120_wdt01.c -o ../../mspgcc/examples/slac013/fet120_wdt01.o -I"C:/mspgcc/msp430/include" -mmcu=msp430x1232 -g -nostdlib -mwindows
cc1: invalid option `windows'
make: *** [../../mspgcc/examples/slac013/fet120_wdt01.o] Error 1
Execution terminated
Any suggestions?
Yep, for an experiment, do NOT use a project. Just create a New:Source File, put your code in, set whatever options you need in Tools:Compiler Options and see what happens.
Wayne
I did that and have the same issue. The -mwindows is still added.
I'm wondering if that can be turned off some how or if I need to tell it not to create a make file but to use a custom make file.
Thanks.
AA
"I did that and have the same issue."
Post your log please. Always post your log.
Wayne
Ok, Now I've created a project using the sample FET120_WDT01.c file in the mspgcc\examples\slac013 directory. I modified the makefile to only list that file as the only "PROGS" file, and I set the Makefile options in the Project Options to use a custom makefile. The first error I got was a "no input file" error.
So I included the full path in the make file and I can get it to compile (finally!).
Now when I try to debug, I get an error "Project is not compiled".
Any suggestions?
"So I included the full path in the make file and I can get it to compile (finally!)."
You later data suggests that, while you may not have gotten an error message, you ddi not in fact compile successfully.
Now, get a large piece of wood, a 2x4 or a baseball bat will do. Hit yourself over the head. Hard. It should hurt. Badly. Hospitalization is reasonable.
ALWAYS POST YOUR FULL LOG! ALWAYS. Even if your question is about politics. ALWAYS ALWAYS ALWAYS post your full log.
Please post the log for your single file experiment and for your new project.
Wayne
Thanks, your 2x4 hint really helped, except, I think it should be applied to the DEVC++ author instead for not verifying the code.
Attached is the build log. Last line says that it compiled successfully.
Also, from other msgs I tried the build and run button, and still get the msg that the project is not compiled.
Compiler: MSP430
Executing make...
make.exe -f "....\mspgcc\examples\slac013\Makefile" all
msp430-gcc -g -O2 -mmcu=msp430x1232 C:\mspgcc\examples\slac013\fet120_wdt01.c -o C:\mspgcc\examples\slac013\fet120_wdt01
Execution terminated
Compilation successful
"I think it should be applied to the DEVC++ author instead for not verifying the code."
roflmao. You are funny! :)
Now , you get to help me out here - here is your baseball bat (aluminum) for correction related activities - have you visually confirmed the presence of a compiled executable? Warning: It may be somewhere you don't expect, so a search may be in order.
Wayne
There is a file that was created with the same name and no extension in the source directory. The time stamp is such that each time I rebuild it gets re-written.
I'm from the old old school and like to see the file extensions, so there is no extension. The file is a binary file.
Subsequent to the last message, I set the Executable ouput and the object file output directories (in the Project options/build options dialog) to a specific directory and rebuilt the program. Again the compile log said "Compilation successful" but there were no files created or modified in that directory, but the file with no extension was updated in the source directory.
OK, have your tried renaming or running the file in question?
(This is going to hurt)
Wayne
So do you plug-in a different compiler to generate MSP430 code? Or does MSP430 run i386 code? I'm confused by this tread, any links to help me out?
I moved it, I renamed it and get the same results when I try to debug (project not compiled). The file with no extension is in the new directory location.
Compiler: MSP430
Executing make...
make.exe -f "Makefile" all
msp430-gcc -g -O2 -mmcu=msp430x1232 C:\Dev-Cpp\msp430\fet120wdt01.c -o C:\Dev-Cpp\msp430\fet120wdt01
Execution terminated
Compilation successful
I didn't ask about debugging it, I was asking a much simpler (and possibly more stupid) question. You have a file
foo
Can you run foo directly (or for that matter, rename it to foo.exe and see what happens)
Wayne
I don't understand. To run a program, it has to be loaded into the microcontroller. In other programs I've used this was done through the debugger or there is a menu that allows programming of the processor.
DevC++ doesn't have a link to allow the flash to be erased and programmed.
The file the microcontroller (MSP430) is programmed with is usually a hex file with the object code in it or possibly with a binary file. In all the cross compilers I've delt with, I've never seen one were the "executable" code has an exe extention (except for programs that run on a PC which this isn't).
So my first question, is how would I load the file?
It doesn't make sense for me to rename it, but if you can tell me how to load it, then I'll try and rename it.
drwayne,
Do you by chance have a sample DEVC++ project for the MSP430 with simple source that you know compiles and runs that I can copy as a whole into a directory and test? (Project file, source, etc - everything DEV C++ needs so I just open the project and it's all there, nothing else to configure) That may help me in figuring out what I have wrong.
Thanks
AA
"So my first question, is how would I load the file? "
That is where my question had the potential to be stupid. I did not know whether you had some other means for doing the load of your cross-compiled code, other than Dev (I have done some embedded work in which a loader program was used). And I had no idea about what support you had or needed on the embedded platform to run the code in question. So I was obviously hoping a moronic leading question would strike something useful....what a putz.
Wayne
Ok, I've only quicklu scanned through the messages above but here are a few pointers:
Dev-C++ can be made to work with any GNU compiler, however it is primarily designed to work with the Windows/x86 GNU compilers from MinGW and Cygwin. As a cross development environment it has some limitations.
Firstly, the built in debugger is not a cross-debugger, you cannot debug, download, or execute your cross-application from Dev-C++'s standard menus. If you have an external cross-debugger (such as Insight/GDB built for your target processor), and appropriate target debug agent code, then you can integrate it with Dev-C++ via its Tools menu customization.
The file the compiler outputs is a binary file. If you expect a HEX file, then you need a binary to HEX conversion tool to convert the binary to the HEX format expected by your device programmer or downloader. This can be automated by adding an "after-all" rule via the makefile customisation option. You may also be able to add commands here to perform the download automatically on a sucessful build.
If you set the project for Win32 Console, the -mwindows option should not occur, although I cannot confirm that, since I do not have Dev-C++ installed currently, (a combination of moving house, and hard drive death just prior to the move!).
This document may help: http://www.bloodshed.net/dev/SetDevCPPArm.pdf. It talks about setting Dev-C++ up with the ARM GNU cross-compiler. It is for an older version of Dev-C++ and assumes that you have the cross-compiler installed as part of a Cygwin installation, which may not be the case here, but it should be easy to adapt.
The only unresolved issue I have found with using Dev-C++ as a cross development tool, is that the toolchain program executable list does not allow you to specify an laternative ranlib.exe, which means that you cannot create static libraries without manually modifying the generated makefile.
Clifford