background image

C8051F530A-DK

6

Rev. 0.3

5.  Using the Keil Software 8051 Tools with the Silicon Laboratories IDE

To perform source-level debugging with the IDE, you must configure the Keil 8051 tools to generate an absolute
object file in the OMF-51 format with object extensions and debug records enabled. Build the OMF-51 absolute
object file by calling the Keil 8051 tools at the command line (e.g. batch file or make file) or by using the project
manager built into the IDE. The default configuration when using the Silicon Laboratories IDE project manager
enables object extension and debug record generation. Refer to Application Note "AN104: Integrating Keil 8051
Tools into the Silicon Labs IDE" in the “

SiLabs\MCU\Documentation\ApplicationNotes

” directory for additional

information on using the Keil 8051 tools with the Silicon Laboratories IDE. 
To build an absolute object file using the Silicon Laboratories IDE project manager, you must first create a project.
A project consists of a set of files, IDE configuration, debug views, and a target build configuration (list of files and
tool configurations used as input to the assembler, compiler, and linker when building an output object file).
The following sections illustrate the steps necessary to manually create a project with one or more source files,
build a program, and download it to the target in preparation for debugging. (The IDE will automatically create a
single-file project using the currently open and active source file if you select 

Build/Make Project

 before a project

is defined.) 

5.1.  Creating a New Project

1. Select 

Project

New Project

 to open a new project and reset all configuration settings to default.

2. Select 

File

New File

 to open an editor window. Create your source file(s) and save the file(s) with a 

recognized extension, such as .c, .h, or .asm, to enable color syntax highlighting.

3. Right-click on “New Project” in the 

Project Window

. Select 

Add files to project

. Select files in the file browser 

and click Open. Continue adding files until all project files have been added.

4. For each of the files in the 

Project

 

Window

 that you want assembled, compiled, and linked into the target build, 

right-click on the file name and select 

Add file to build

. Each file will be assembled or compiled as appropriate 

(based on file extension) and linked into the build of the absolute object file.

5. If a project contains a large number of files, the “Group” feature of the IDE can be used to organize. Right-click 

on “New Project” in the 

Project Window

. Select 

Add Groups to project

. Add pre-defined groups or add 

customized groups. Right-click on the group name and choose 

Add file to group

. Select files to be added. 

Continue adding files until all project files have been added.

5.2.  Building and Downloading the Program for Debugging

1. Once all source files have been added to the target build, build the project by clicking on the 

Build/Make 

Project 

button in the toolbar or selecting 

Project

Build/Make Project 

from the menu.

Note:

After the project has been built the first time, the 

Build/Make Project

 command will only build the files that have been

changed since the previous build. To rebuild all files and project dependencies, click on the 

Rebuild All

 button in the

toolbar or select 

Project

Rebuild All

 from the menu.

2. Before connecting to the target device, several connection options may need to be set. Open the 

Connection 

Options

 window by selecting 

Options

Connection Options . . .

 in the IDE menu. First, select the 

appropriate adapter in the “Serial Adapter” section. Next, the correct “Debug Interface” must be selected. 
C8051F52xA-53xA family devices use the Silicon Labs 2-wire (C2) debug interface. Once all the selections are 
made, click the OK button to close the window. 

3. Click the 

Connect

 button in the toolbar or select 

Debug

Connect

 from the menu to connect to the device. 

4. Download the project to the target by clicking the 

Download

 

Code

 button in the toolbar.

Note:

To enable automatic downloading if the program build is successful, select 

Enable automatic connect/download after

build

 in the 

Project

Target Build Configuration

 dialog. If errors occur during the build process, the IDE will not

attempt the download.

5. Save the project when finished with the debug session to preserve the current target build configuration, editor 

settings, and the location of all open debug views. To save the project, select 

Project

Save Project As . . .

 

from the menu. Create a new name for the project and click on 

Save

.

Summary of Contents for C8051F530A

Page 1: ...wing items C8051F530A Target Board C8051Fxxx Development Kit Quick Start Guide Silicon Laboratories IDE and Product Information CD ROM CD content includes Silicon Laboratories Integrated Development Environment IDE Keil 8051 Development Tools macro assembler linker evaluation C compiler Source code examples and register definition files Documentation C8051F52xA 53xA Development Kit User s Guide th...

Page 2: ...SB to UART Bridge Controller Device drivers for the CP2102 need to be installed before PC software such as HyperTerminal can communicate with the target board over the USB connection If the Install CP210x Drivers option was selected during installation this will launch a driver unpacker utility 1 Follow the steps to copy the driver files to the desired location The default directory is C SiLabs MC...

Page 3: ... IDE has native support for many 8051 compilers The full list of natively supported tools is as follows Keil IAR Raisonance Tasking Hi Tech SDCC The demo applications for the C8051F530A Target Board are written to work with the Keil and SDCC toolsets 3 4 Keil Evaluation Toolset 3 4 1 Keil Assembler and Linker The Keil demonstration toolset assembler and linker place no restrictions on code size 3 ...

Page 4: ... to the Configuration Wizard documentation Documentation and software is available on the kit CD and from the downloads webpage www silabs com mcudownloads 3 6 Keil µVision2 and µVision3 Silicon Laboratories Drivers As an alternative to the Silicon Laboratories IDE the µVision debug driver allows the Keil µVision2 and µVision3 IDEs to communicate with Silicon Laboratories on chip debug logic In sy...

Page 5: ...ect the other end of the USB cable to a USB Port on the PC 5 Connect the ac dc power adapter to power jack P5 on the target board Notes Use the Reset button in the IDE to reset the target when connected using a USB Debug Adapter Remove power from the target board and the USB Debug Adapter before connecting or disconnecting the ribbon cable from the target board Connecting or disconnecting the cabl...

Page 6: ... into the target build right click on the file name and select Add file to build Each file will be assembled or compiled as appropriate based on file extension and linked into the build of the absolute object file 5 If a project contains a large number of files the Group feature of the IDE can be used to organize Right click on New Project in the Project Window Select Add Groups to project Add pre...

Page 7: ...allation The register and bit names are identical to those used in the C8051F52x 52xA 53x 53xA data sheet The register definition files are also installed in the default search path used by the Keil Software 8051 tools Therefore when using the Keil 8051 tools included with the development kit A51 C51 it is not necessary to copy a register definition file to each project s file directory 6 2 Blinki...

Page 8: ...meter for P1 2_A J6 J8 Connects R32 potentiometer to U2 and 5 V J13 Connects power to U2 J11 J12 Connects external crystal to U2 pins P0 7_A and P1 0_A J3 Connects analog channel 1 to U2 P1 6_A J4 Connects analog channel 2 to U2 P1 7_A J5 Connects VREFIN to U2 P0 0_A TB2 Analog input connector HDR4 Connector block for serial port connection Green LED and push button U3 Silicon Laboratories CP2102 ...

Page 9: ...l crystal may be used Refer to the C8051F52x 52xA 53x 53xA data sheet for more information on configuring the system clock source The target board is designed to facilitate the installation of external crystals Install the crystals at the pads marked Y1 or Y2 Install a 10 MΩ resistor at R17 or R22 and install capacitors at C29 and C30 or C34 and C35 using values appropriate for the crystals you se...

Page 10: ... red LED labeled PWR is used to indicate a power connection to the target board The green LEDs labeled D1 and D2 are connected to the C8051F530A s GPIO pins through headers Remove the shorting blocks from the headers to disconnect the LEDs from the port pins The port pin signals are also routed to pins on the J1 and J2 I O connectors The red LED labeled USB ACTIVE is used to indicate that the CP21...

Page 11: ... pins of the C8051F530A parts They are used to connect the USB Debug Adapter to the target board for in circuit debugging and Flash programming Table 3 shows the DEBUG pin definitions Table 2 Pin Descriptions for J1 and J2 J1 J2 Pin Description Pin Description Pin Description Pin Description 1 P0 0_B 14 P1 5_B 1 P0 0_A 15 P1 6_A 2 P0 1_B 15 P1 6_B 2 P0 1_A 16 P1 7_A 3 P0 2_B 16 P1 7_B 3 P0 2_A 17 ...

Page 12: ...ernal 12 V 7 5 V minimum connected to the TB1 terminal block pins 1 and 3 Headers J13 and J14 connect the 5 V power supply to the VREGIN pins on U1 and U2 These headers can be populated to supply power directly or depopulated to measure the operating current drawn by the corresponding C8051F530A device 7 9 LIN Connectivity TB1 The C8051F530A Target Board has two C8051F530A devices U1 and U2 and tw...

Page 13: ...C8051F530A DK Rev 0 3 13 8 Schematics Figure 4 C8051F530A Target Board Schematic 1 of 3 ...

Page 14: ...C8051F530A DK 14 Rev 0 3 Figure 5 C8051F530A Target Board Schematic 2 of 3 ...

Page 15: ...C8051F530A DK Rev 0 3 15 Figure 6 C8051F530A Target Board Schematic 3 of 3 ...

Page 16: ...C8051F530A DK 16 Rev 0 3 DOCUMENT CHANGE LIST Revision 0 2 to Revision 0 3 Updated for C8051F530A TB Added LIN Connectivity TB1 on page 12 ...

Page 17: ...C8051F530A DK Rev 0 3 17 NOTES ...

Page 18: ...ty for the functioning of undescribed features or parameters Silicon Laboratories reserves the right to make changes without further notice Silicon Laboratories makes no warranty rep resentation or guarantee regarding the suitability of its products for any particular purpose nor does Silicon Laboratories assume any liability arising out of the application or use of any product or circuit and spec...

Reviews: