Author Topic: how to config se2k8 to build c51 sourcecode  (Read 2162 times)

mcufan

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
how to config se2k8 to build c51 sourcecode
« on: July 09, 2008, 11:40:47 am »
I want to know how to config se2k8 to build c51 sourcecode

Graeme

  • Senior Community Member
  • Posts: 2246
  • Hero Points: 287
Re: how to config se2k8 to build c51 sourcecode
« Reply #1 on: July 09, 2008, 01:36:05 pm »
Assuming that you're referring to the Keil C compiler for 8051, to add the Keil compiler to your list of C compilers, click Tools -> tag files -> auto tag.  If the Keil compiler isn't already listed in the "compiler" drop down list for C++, click the browse button.  The C/C++ compiler properties dialog will appear.  Click the add button to add a new compiler configuration  - see the "compiler properties" topic in the help for more info.  In a C project, you then have to select the Keil compiler - from the project menu, click project properties and on the compile/link tab, select the Keil compiler.

Graeme

mcufan

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: how to config se2k8 to build c51 sourcecode
« Reply #2 on: July 09, 2008, 08:14:28 pm »
thanks your  reply。
How to  setup   compile  or build command line   in  project  propoeties

Graeme

  • Senior Community Member
  • Posts: 2246
  • Hero Points: 287
Re: how to config se2k8 to build c51 sourcecode
« Reply #3 on: July 10, 2008, 12:12:19 pm »
thanks your  reply。
How to  setup   compile  or build command line   in  project  propoeties

Assuming you created a "generic" project type...

If you don't have your own make file and dependency checking scheme, you can use slickedit's vsbuild utility to do dependency checking, but you probably don't need it with an 8051 project and it has some disadvantages, like no documentation, so I'd suggest not using it.

If the Keil compiler has a make utility, you can call it from slickedit or you can run a batch file that calls the appropriate Keil executables, or you can call the Keil compiler and linker directly from slickedit.

In project properties, on the build tab, ensure that the build system option is set to "build with a user maintained makefile or custom build command".

Click the "configurations" button and add whatever configurations you need - release, debug, in-house, sqa  - whatever.  For each configuration, you can specify different command lines and options specific to that type of build.  Select the configuration that you want to set the build and compile commands for in the drop down list at the top of the project properties dialog.  On the compile/link tab, select the Keil compiler.  On the Tools tab, click the advanced tab and add the environment variable settings that the Keil compiler/ linker need.

Also on the tools tab, click the "compile" item in the tool name list.  In the command line edit box, enter the command you need to call the Keil compiler (include the full path).  Click the right arrow at the right hand end of the command line edit box and select the "Filename %f" option.  This means the file that you ask the Keil compiler to compile is the current buffer.  Add whatever switches you need to the command line.

For the build command, you're probably best to call your own make utility or batch file.  Click the "build" item in the tool name list.  Enter whatever command you want to run in the command line edit box.  You can pass the names of all source files in your project to the build tool if you want  - click the right arrow at the right hand end of the command line edit box and select "Project files %{*.*}.  Change the *.* to something like *.c or whatever filespec you need.

You also need to set up a regular expression to parse the errors produced by the compiler.  In the main slickedit window, on the build menu, click "configure error parsing" and click the "help" button to find out what to do...

Graeme