Development Tools for Microcontroller Applications

36
Development Tools for Microcontroller Applications Chapter 12

Transcript of Development Tools for Microcontroller Applications

Page 1: Development Tools for Microcontroller Applications

Development Tools for Microcontroller Applications

Chapter 12

Page 2: Development Tools for Microcontroller Applications

Lesson 01

Software Development Process and Development

Tools

Page 3: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

3

Step 1: Development PhasesStep 1: Development Phases

Testing and Debugging

Design Implementation

Requirement and specifications

AnalysisPhase 1 Phase 2 Phase 3

Phase 4

Page 4: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

4

Phase 1: Analysis

• A listing of the requirements made• Required system understood and analysed • Specifications of the application to be

developed

Page 5: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

5

Phase 2: Design

• Assume an application (program) consisting of modules or tasks

• A module can be used in multiple parts of an application or in multiple applications or projects

Page 6: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

6

Application contents— modules or tasks, segments, codes, macros, routines (functions)

and library routinesApplication

Module or task 1 Module or task m

Segment 1 Segment s1

code 1 Macro 1

Routines

New Routines Library Routines

Page 7: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

7

Module

• A module consists of set of functions. • The set independent of the results of next

module

Page 8: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

8

Task

• A task–a set of instructions• The set performs some action or a set of actions in a system• The running of the task controlled by systems software—Operating System (OS) or Real Time Operating System (RTOS)

Page 9: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

9

Appropriate software-development tools for the design

• Firstly the tool selection • Selection of appropriate modules or tasks,

program segments, macros, routines and library routines, and their linkages done.

Page 10: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

10

Selection of hardware for the design

• Based on requirements• Hardware consists of the microcontroller,

memory, needed external interfaces, and expansion circuits

• Selection of an appropriate target platform done for development

Page 11: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

11

Emulator and Target Board

• Use of an emulator circuit for a microcontroller circuit helps in the test phase

• Use of a target board with a monitor– helps in the tests by final high speed run.

Page 12: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

12

Step 2 in Development PhasesStep 2 in Development Phases

Design

modules

macros routines

Top and bottom levels

Segments

Page 13: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

13

Phase 3: Implementation

• Each module or task implemented (coded)• Coding for the segments• Statements• Macros • Routines• Appropriate software development tools

employed for coding and using the macros and library routines

Page 14: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

14

Step 3 in Development PhasesStep 3 in Development Phases

Implementation

modules

macros routines

Code Generation

Segments

Data

Page 15: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

15

Phase 4: Testing and Debugging

• A targeted system prototype used during the development phase

• A cycle of the coding for the application codes used• The cycle consists of design and implementation

phases• The developed codes embedded• The embedding of machine codes done in the flash

memory at the device• The codes then tested

Page 16: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

16

Cycle of Write, Testing and Debugging and Editing

• The developed codes embedded• The embedding of machine codes done in the

flash memory at the device• The codes then tested

Page 17: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

17

WriteWrite--editedit--embed and test cycleembed and test cycle

Testing and Debugging

Implementation

Edit2

1 Write

3Embed

4

Page 18: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

18

Step A in a software project development processes and development cycle

• A project creation • The selection of a device (target

microcontroller) from a device database• Then the device configuring• Then tools set• Then used in the project

Page 19: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

19

Step A: Project and Application CreationStep A: Project and Application Creation

Project Creation

Device Selection2

1 Project Definition

3Device Selection

Page 20: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

20

Step B in a software project development processes and development cycle

• Project file called source file created with the help of an editor

1. in assembly by using an assembler or macro assembler, or

2. in C by using a compiler, or3. in C using an RTOS environment integrated with C

compiler in case of a multi-tasking system.4. in Visual Basic using an environment integrated

with Visual Basic compiler

Page 21: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

21

Step B: Project and Application Step B: Project and Application CreationCreation

Project Creation

C

Source File Creation

C compiler

Editing RTOS

Assembly Assembler/Macro-Assembler

Page 22: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

22

Step C in a software project development processes and development cycle

• Other previously developed source files included in the project

• Project manager– helps in building the application

Page 23: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

23

Step C: Object Files Step C: Object Files

Project Manager

Including Object Files

Including Object Files

Page 24: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

24

Step D in a software project development processes and development cycle

• Source-file errors corrected

Page 25: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

25

Step D: Object Files Step D: Object Files

Source Code

Correction of Errors

Page 26: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

26

Step E in a software project development processes and development cycle

• The source and library files linked • Tested using (i) suitable emulator, or (ii) a

suit- able debugger/ simulator/ target debugger using a monitor

Page 27: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

27

Step E: Project and Application Step E: Project and Application CreationCreation

Linking

Object FilesLibrary Files

Test and Debug

Emulator Debugger Simulator Target debugger

Page 28: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

28

Software Development Tool–make facility inIDE

• An IDE provides an integrated development environment

• Managing• Organising• Editing • An integrated make facility

Page 29: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

29

Software Development Tool–Editor in IDE

• Editor used to make assembly or C source file• Assembler or C compiler used when coding in

assembly or C, respectively• RTOS (internally integrated with the C

compiler) used in case of multi-tasking systems and real-time constrained systems

Page 30: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

30

Software Development Tool in IDE

• Source file from the assembler or C compiler • Linker with a C library using a library manager• Links all the files from the RTOS or from the

assembler, compiler, and library• The codes locate at the appropriate and distinct

addresses

Page 31: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

31

Software Development Tool–Locator in IDE

• Locator creates a hex- file• Used by a device programmer• Burns the codes into the target PROM• Used for program testing using an ICE or an

IDE debugger tool

Page 32: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

32

Task Scheduling

Task Synchronisation

RTOSRTOSMultiple Tasks

Inter Process Communication using signal, semaphores, ...

Page 33: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

33

Summary

Page 34: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

34

We learntSoftware Development Steps• Analysis • Design• Implementation• Testing and Debugging • Write Edit Embed and Test cycle

Page 35: Development Tools for Microcontroller Applications

2011 Microcontrollers-... 2nd Ed. Raj Kamal Pearson Education

35

We learntSoftware Development Tools • Assembler• Library Manager• Linker• Locator • Debugger/Simulator• IDE• RTOS

Page 36: Development Tools for Microcontroller Applications

End of Lesson 01 on

Software Development Process and Development

Tools