Using CodeLite for ARM LPC2103

General questions regarding the usage of CodeLite
bogt
CodeLite Curious
Posts: 9
Joined: Mon Sep 20, 2010 12:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Using CodeLite for ARM LPC2103

Post by bogt »

Hi,
I know can sound stupid, but after I've spent some readings about CodeLite and because I'm a Beginer to this, I'm still at the Point Zero in "How to begin Using this IDE". I've try to set all what I can (know), but at "Build" I receive this...
"
----------Build Started--------
MESSAGE: Entering directory `C:\New Folder\LPC2103\'
C:\Windows\system32\cmd.exe /c "make"
----------Building project:[ LCD - Debug ]----------
make: *** No targets specified and no makefile found. Stop.
----------Build Ended----------
0 errors, 0 warnings
"
What is wrong?
I think I miss something (or a lot) in settings. Can I find more "settings informations" or a "user manual" for download?
Oh, I use Vista and CodeLite V2.7.0.4375 Install with MinGW-4.4.1 and wxWidgets-2.8.10
Thanks
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using CodeLite for ARM LPC2103

Post by eranif »

the fact that this is your build command:
bogt wrote:C:\Windows\system32\cmd.exe /c "make"
indicates that your project is set as a custom build project, is it true? did you modify anything in the project settings?
Post here the project file (the one that ends with .project)

Eran
Make sure you have read the HOW TO POST thread
bogt
CodeLite Curious
Posts: 9
Joined: Mon Sep 20, 2010 12:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using CodeLite for ARM LPC2103

Post by bogt »

Hello,
Yes, It is on custom build, but I had same message on not custom build.
I've try to do somethink, but like a begginer I end up in clouds.
The file with .project is LCD.project.
"

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<CodeLite_Project Name="LCD" InternalType="Console">
  <Plugins>
    <Plugin Name="qmake">
 <![CDATA[00010001N0005Debug0007LPC21030008make all0000]]>
    </Plugin>   </Plugins>   <Description/>  <Dependencies/>   <VirtualDirectory
 Name="src">
    <File Name="main.cpp"/>
    <File Name="lcd.h"/>
    <File Name="lcd.cpp"/>
    <File Name="LPC2103.h"/>
    <File Name="delay.h"/>
  </VirtualDirectory>
  <Settings Type="Executable">
    <Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" 
Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
  <Compiler Options="-g" Required="yes" PreCompiledHeader="">
        <IncludePath Value="."/>      </Compiler>       <Linker Options="" Required="yes"/>
      <ResourceCompiler Options="" Required="no"/>
      <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" 
Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
     <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="C:\MinGW-4.4.1\bin\gdb.exe">
        <PostConnectCommands/>     <StartupCommands/>       </Debugger>       <PreBuild/>       <PostBuild/>       <CustomBuild Enabled="yes">
  <Target Name="configure --enable-debug">./configure --enable-debug</Target>
        <Target Name="Configure">./configure</Target>
    <RebuildCommand/>
        <CleanCommand>make clean</CleanCommand>
        <BuildCommand>make</BuildCommand>
    <PreprocessFileCommand/>
        <SingleFileCommand>make $(CurrentFile).o</SingleFileCommand>
  <MakefileGenerationCommand>./configure</MakefileGenerationCommand>
        <ThirdPartyToolName>None</ThirdPartyToolName>
     <WorkingDirectory>$(WorkspacePath)</WorkingDirectory>
      </CustomBuild>       <AdditionalRules>        <CustomPostBuild/>       <CustomPreBuild/>      </AdditionalRules>    </Configuration>
    <Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" 
Type="" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
      
<Compiler Options="" Required="yes" PreCompiledHeader="">
        <IncludePath Value="."/>
      </Compiler>
      <Linker Options="-O2" Required="yes"/>
    
  <ResourceCompiler Options="" Required="no"/>
      <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" 
Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
     
 <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
        <PostConnectCommands/>
        <StartupCommands/>
   
   </Debugger> 
      <PreBuild/>
      <PostBuild/>
      <CustomBuild Enabled="no">
        <RebuildCommand/>
        <CleanCommand/>
        
<BuildCommand/>
        <PreprocessFileCommand/>
        <SingleFileCommand/>
        <MakefileGenerationCommand/>
       
 <ThirdPartyToolName>None</ThirdPartyToolName>
        <WorkingDirectory/>
      </CustomBuild>
      <AdditionalRules>
     
   <CustomPostBuild/>
        <CustomPreBuild/>
      </AdditionalRules>
    </Configuration>
    <GlobalSettings>
      <Compiler Options="">
     
   <IncludePath Value="."/>
      </Compiler>
      <Linker Options="">
        <LibraryPath Value="."/>
      </Linker>
      <ResourceCompiler Options=""/>
   
 </GlobalSettings>
  </Settings>
</CodeLite_Project>
"
Do I find a settings book somewere?
How to know what and were to set something?
Regards
bogt
CodeLite Curious
Posts: 9
Joined: Mon Sep 20, 2010 12:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using CodeLite for ARM LPC2103

Post by bogt »

Hello,
Then...What I do (set) wrong?
I will Start over, but in what configuration?

Thanks, :oops:
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using CodeLite for ARM LPC2103

Post by eranif »

Do you have a makefile? if you don't have a makefile / configure script, then dont use the custom build.

I suggest that you start from scratch, create yourself a simple executable project (and see that it compiles).

To create it:
close the current workspace (workspace -> close)
workspace -> new project
select 'simple executable (g++)' - fill in the missing details and click OK.
Click F7.

If this project compiles (and it should compile), copy your files to the newly created project directory and then add them to the project, by right clicking on the 'src' virtual directory and select 'add an existing file'

Compile it again and see how it goes.

Eran
Make sure you have read the HOW TO POST thread
bogt
CodeLite Curious
Posts: 9
Joined: Mon Sep 20, 2010 12:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using CodeLite for ARM LPC2103

Post by bogt »

Hi Eran.
Thanks for your support.
I did a new "simple file" and the Bulid end up with this:
"
----------Build Started--------
C:\Windows\system32\cmd.exe /c ""C:/MinGW-4.4.1/bin/mingw32-make.exe" -j 2 -f "Test_wsp.mk""
----------Building project:[ Test - Debug ]----------
cygwin warning:
MS-DOS style path detected: /cygdrive/c/Program Files/CodeLite/C:\MinGW-4.4.1\bin\mingw32-make.exe
Preferred POSIX equivalent is: /cygdrive/c/Program Files/CodeLite/C:/MinGW-4.4.1/bin/mingw32-make.exe
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.h ... -pathnames
/usr/bin/sh: C:\MinGW-4.4.1\bin\mingw32-make.exe: command not found
mingw32-make.exe: *** [All] Error 127

----------Build Ended----------
0 errors, 0 warnings
"
This mean it's all OK? If yes, Error 127 is?

Regards,
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using CodeLite for ARM LPC2103

Post by eranif »

You have cygwin installed in your system path. Make sure that:
1) You start codelite from CMD.EXE / Shortcut and not from cygwin bash shell
2) From within codelite, set the environment variable

Code: Select all

SHELL=CMD.EXE
3) Make sure that MinGW path comes before cygwin path

Eran
Make sure you have read the HOW TO POST thread
bogt
CodeLite Curious
Posts: 9
Joined: Mon Sep 20, 2010 12:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using CodeLite for ARM LPC2103

Post by bogt »

Hi Eran,
Thanks,
I put code SHELL=CMD at the start of Enviro.
I modify the system path, MinGW before cygwin but still same error. Next step...I delete the cygwin system path and renamed (do not delete) the Cygwin folder.
Now looks like it is working:
"----------Build Started--------
C:\Windows\system32\cmd.exe /c ""C:/MinGW-4.4.1/bin/mingw32-make.exe" -j 2 -f "Test_wsp.mk""
----------Building project:[ Test - Debug ]----------
mingw32-make[1]: Entering directory `C:/New Folder/Test'
g++ -o ./Debug/Test ./Debug/main.o "-L."
mingw32-make[1]: Leaving directory `C:/New Folder/Test'
----------Build Ended----------
0 errors, 0 warnings
"
now I can start an ARM program?
Do I have to make new settings or this settings are SET?!

Thanks,
bogt
CodeLite Curious
Posts: 9
Joined: Mon Sep 20, 2010 12:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using CodeLite for ARM LPC2103

Post by bogt »

What is this error...
"
----------Build Started--------
C:\Windows\system32\cmd.exe /c ""C:/MinGW-4.4.1/bin/mingw32-make.exe" -j 2 -f "LPC2103_wsp.mk""
----------Building project:[ LCD - Debug ]----------
mingw32-make[1]: Entering directory `C:/New Folder/LPC2103'
g++ -o ./Debug/LCD ./Debug/ARM_lcd.o "-L."
c:/mingw-4.4.1/bin/../lib/gcc/mingw32/4.4.1/../../../libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [Debug/LCD] Error 1
mingw32-make[1]: Leaving directory `C:/New Folder/LPC2103'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
0 errors, 0 warnings"
"
And how to make the HEX file from a cpp file?

Thanks
bogt
CodeLite Curious
Posts: 9
Joined: Mon Sep 20, 2010 12:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using CodeLite for ARM LPC2103

Post by bogt »

Hi,
After all my best, I don't understand this message and why I don't have the EXE or Hex file:
"----------Build Started--------
C:\Windows\system32\cmd.exe /c ""C:/MinGW-4.4.1/bin/mingw32-make.exe" -j 1 -f "Bogdan_wsp.mk""
----------Building project:[ BT - Debug ]----------
/usr/bin/sh: ./C:\MinGW-4.4.1\bin\mingw32-make.exe: Invalid argument
mingw32-make.exe: *** [All] Error 126
----------Build Ended----------
0 errors, 0 warnings
"
And were I have to go for be able to end one HEX file for my LPC2103?
The "main.cpp" is working fine at Compile (no errors) and I have the HEX (from examples on CD) file what is working on my ARM board, but is made with Micro Vision (Keil). And because I'm try to learn I wish to input some modifications. Then, ending file have be a HEX file for LPC.

Regards,
:cry: :roll:
Post Reply