Author Topic: Ok! lets try to setup a SDCC project  (Read 3354 times)

Offline mastermatic

  • Multiple posting newcomer
  • *
  • Posts: 12
Ok! lets try to setup a SDCC project
« on: September 01, 2008, 01:35:11 am »
After readding a previous thread ( that became very tense at the end), I decided to make a try and put here the result.
I tested it with my Atmel T89C51CC01 source.

 
 
1 - Create an empty project,
        File -> new -> project -> create an empty project
 
2 - Give it a name:        MyApp
     Folder to create in:  C:\SDCC-MM\MyApp    (C:\SDCC-MM is my working dir for SDCC work)
     Resulting filename:   C:\SDCC-MM\MyApp\MyApp.cbp (correct the path : MyApp subdir name duplicates)
     next >
 
3 -  Compiler:  SDCC Compiler
      uncheck -> Create debug configuration
      check ->  Create release configuration : MyApp
      Output dir :                C:\SDCC-MM\MyApp\ 
      Objects output dir:      C:\SDCC-MM\MyApp\objs\
      Finish 
 
4 -     Ignore script warnings
 
5 -   Go to :     Project -> Add files
       Add your files: at least    MyApp.c ( and maybe other *.c *.h files)
 
6 -   Go to:      Project -> Properties ->Settings tab:         
                Leave everything as is:    (Title: MyApp   and    Platforms: All )
 
7 -   And      Project -> Properties ->Build targets tab:
                Type: Native
                Output Filename:  C:\SDCC-MM\MyApp\MyApp.HEX 
                Uncheck both the auto generate prefix and extension
                Check the build target files
                Build options buttom:
                        Compiler settings : Check the flags you want
                        Searching directories: Compiler ->add :  C:\SDCC  ( this is my default SDCC dir)
                        Searching directories: Linker     ->add :  C:\SDCC
                        OK
 
8 -     Build your App    ( hopefully you have no sintax or other errors).
 
9 -     Enjoy the sweet smell of your    "MyApp.HEX"    file.
 

Obs:

If you go to   Project->Build options   menu, You will find that you have the same dialog as described in 7) but empty. You may ignore it or enter the same settings you did before. But if you check a  flag confliting with the previous ones, you have to search both dialogs.
 
You may ignore (I think)  the main menu:  Settings->Compiler and debugger -> Global compiler settings.
So in total, we have 3 dialogs to enter compiler settings. We can ignore by now the last two.
 
Best regards
José Barbosa