Co IDE penataan bunga Guide

CoIDE User Guide

2013-01-21 V1.0 Completed

Website: http://www.coocox.org Forum:

http://forum.coocox.org

Technical: master@coocox.com Market:

market@coocox.com

1 CoIDE Quick Start

1. Launch CoIDE, select Browse in Repository

2. Select the manufacturer, e.g. Freescale.

3. Select your target chip, e.g. MKL05Z32VFM4. The Help view on the right side of CoIDE

will show corresponding information of the chip.

4. Check/Select the components which you want to use, e.g. xGPIO component. You will

be prompted to create a new project.

5. After clicking "Yes", CoIDE will pop up a wizard window. Input project name. You can

also modify the Project Path.

6. After clicking "Finish", CoIDE will create a project for you, containing manually-selected component code in step 4 and associated components will be automatically selected

and included (e.g. the startup component), as well as a main.c file.

7. In the Repository view, click xGPIO component and the detailed description of xGPIO

component will be displayed in the Help view.

8. The Components view shows all selected components and the number of examples for

each component. Click a component and its Example window will popup.

9. Cli k " ie " to ie the e a ple e.g. Bli k a d add to add it to our proje t.

10. Click "Yes" to confirm adding the example to the default path.

11. CoIDE will add the Blinky.c file to the project, and the Blinky function to the main function.

12. Click the Build utto to o pile a d li k the progra .

13. Cli k the Co figuratio utto to ope the o figuratio view.

14. I the De ugger ta , sele t CMSIS-DAP as the hard are adapter.

15. Cli k the Do load utto to do load ode to flash.

16. To start debugging, click on the Debug icon or press Ctrl+F5 .

17. If debugging is launched successfully, CoIDE will enter the debug mode.

18. Other debug windows can be added by simply selecting them from the View menu.

19. Set breakpoints in the C code window or the Disassembly window.

20. Use the debug functions like single stepping via the tool bar or debug menu.

2 General Introduction

CoIDE is a new, free and highly integrated software development environment for ARM Cortex MCU based microcontrollers, which includes all the tools necessary to develop high- quality software solutions in a timely and cost effective manner.

2.1 New Concepts

CoIDE consists of a component-based network platform and an Eclipse-based development environment. The component-based network platform can quickly obtain resources to build applications, share your resources and exchange ideas. The Eclipse-based development environment provides many features for code editing, code browsing, compiling, linking, debugging, project management, etc.

Features:

Free to use

Full functional IDE

Component-oriented development platform

Internet-based, efficient integration of network resources

Integrates CoOS (Real-Time Operating System)

Peripheral registers

2.1.1 Terminology Note

2.1.1.1 Component

In CoIDE, any reusable code can be called as a component, including OS, drivers, examples, middle layer software etc. Each component has its corresponding code snippets, usage, documentation and comments.

2.1.1.2 Dependence

When a component is selected, CoIDE automatically selects the required dependent components required for compiling or executing the program.

2.1.1.3 Code Snippet

Code Snippet (or example code) is an extension of a component. If the component is object- oriented, the code snippet will be application-oriented. For example, a PIO driver can be known as a component, a function using PIO driver to achieve LED flashing can be known as

a code snippet. The code snippet is generally very short, but the features are not restricted. It can be automatically inserted into the code.

2.1.2 CoIDE Features

CoIDE can be used for code editing, code browsing, compiling, linking, debugging and project management; it also can be used to obtain components, share components and to exchange ideas.

2.1.2.1 Component Network

Component Network contains a large amount of free components. The components are provided by CooCox and CooCox users. CooCox tools include a RTOS, flash manager, Component Network contains a large amount of free components. The components are provided by CooCox and CooCox users. CooCox tools include a RTOS, flash manager,

2.1.2.2 Component Oriented Programming

In embedded application development, if there is no suitable libraries, development work will become very complicated. Once you have the suitable libraries, anything will be manipulated in your hands. CooCox CoIDE Component Network contains a large amount of free components, users can choose suitable components according to your own needs, and use the component code snippets to build application will become more quickly. With a large number of components and detailed component documentation, programming will be as simple as building block.

2.1.2.3 Component Documentation

Detailed documentation (displayed in the Help View) is available for each component making it extremely easy for users with their development. This includes component description, component dependency relationship, component source files, usage of the component, comments etc. CoIDE automatically generates documentation for source files. Tip: having the code comments according to Doxygen standard will help generate detailed documentation.

2.1.2.4 Interaction

CooCox CoIDE, provides powerful interaction between the various elements such as the chip, component, peripheral, register, code snippet and more. Users can even ask questions directly from within the environment, making it easy to address any problems encountered in the development process.

2.1.2.5 Development Environment

CoIDE is based on the Eclipse development platform, and has the following features: 

Integrated CDT editor: A full-featured editor to edit and browse the code

Integrated GCC ARM Embedded: Using gcc tool chain, which is efficient and stable.

A clear interface: Menus and toolbar are simple, clear and easy to use.

GUI Setting: Dialogs for all settings.

2.2 Support list

2.2.1 Support Devices

The CooCox CoIDE mainly supports ARM Cortex-M based devices. Until now, CooCox has supported Cortex-M4, Cortex-M3, Cortex-M0 and Cortex-M0+ chips from Atmel, Energy Micro, Freescale, Holtek, NXP, Nuvoton, ST and TI. For the latest support list, please visit: http://www.coocox.org/CooCox_CoIDE.htm

 Atmel:

AT91SAM3U4E AT91SAM3U4C AT91SAM3U2E AT91SAM3U2C

AT91SAM3U1E AT91SAM3U1C  Energy Micro:

EFM32G200F16 EFM32G200F32 EFM32G200F64

EFM32G210F128

EFM32G230F128 EFM32G230F32 EFM32G230F64

EFM32G280F128 EFM32G280F32 EFM32G280F64

EFM32G290F128 EFM32G290F32 EFM32G290F64

EFM32G840F128 EFM32G840F64 EFM32G840F32

EFM32G880F128 EFM32G880F64 EFM32G880F32

EFM32G890F128 EFM32G890F64 EFM32G890F32  Freescale :

MKL04Z16VFK4, MKL04Z16VFM4, MKL04Z16VLC4, MKL04Z16VLF4, MKL04Z32VFK4, MKL04Z32VFM4, MKL04Z32VLC4, MKL04Z32VLF4, MKL04Z8VFK4, MKL04Z8VFM4, MKL04Z8VLC4 MKL05Z16VFK4, MKL05Z16VFM4, MKL05Z16VLC4, MKL05Z16VLF4, MKL05Z32VFK4, MKL05Z32VFM4, MKL05Z32VLC4, MKL05Z32VLF4, MKL05Z8VFK4, MKL05Z8VFM4, MKL05Z8VLC4 MKL14Z32VFM4, MKL14Z32VFT4, MKL14Z32VLH4, MKL14Z32VLK4, MKL14Z64VFM4, MKL14Z64VFT4, MKL14Z64VLH4, MKL14Z64VLK4

MKL15Z128VFM4, MKL15Z128VFT4, MKL15Z128VLH4, MKL15Z128VLK4, MKL15Z32VFM4, MKL15Z32VFT4, MKL15Z32VLH4, MKL15Z32VLK4, MKL15Z64VFM4, MKL15Z64VFT4, MKL15Z64VLH4, MKL15Z64VLK4

MKL24Z32VFM4, MKL24Z32VFT4, MKL24Z32VLH4, MKL24Z32VLK4, MKL24Z64VFM4, MKL24Z64VFT4, MKL24Z64VLH4, MKL24Z64VLK4

MKL25Z128VFM4, MKL25Z128VFT4, MKL25Z128VLH4, MKL25Z128VLK4, MKL25Z32VFM4, MKL25Z32VFT4, MKL25Z32VLH4, MKL25Z32VLK4, MKL25Z64VFM4, MKL25Z64VFT4, MKL25Z64VLH4, MKL25Z64VLK4

 Holtek:

HT32F1251, HT32F1251B, HT32F1252, HT32F1253

HT32F1755, HT32F1765, HT32F2755

 NXP:

LPC1111x101 LPC1111x201 LPC1112x101 LPC1112x201

LPC1113x201 LPC1113x301 LPC1114x201 LPC1114x301

LPC11C14x301 LPC11C12x301

LPC1224x101 LPC1224x121 LPC1225x301 LPC1225x321 LPC1226x301 LPC122 7x301

LPC1311 LPC1313 LPC1342 LPC1343

LPC1751 LPC1752 LPC1754 LPC1756 LPC1758 LPC1759

LPC1763 LPC1764 LPC1765 LPC1766 LPC1767 LPC1768 LPC1769

 Nuvoton:

NUC100LC1BN, NUC100LD1BN, NUC100LD2BN, NUC100RC1BN, NUC100RD1BN, NUC100RD2BN NUC100LD3AN, NUC100LE3AN, NUC100RD3AN, NUC100RE3AN, NUC100VD2AN, NUC100VD3AN, NUC100VE3AN NUC120LC1BN, NUC120LD1BN, NUC120LD2BN, NUC120RC1BN, NUC120RD1BN, NUC120RD2BN NUC120LD3AN, NUC120LE3AN, NUC120RD3AN, NUC120RE3AN, NUC120VD2AN, NUC120VD3AN, NUC120VE3AN NUC122LC1AN, NUC122LD2AN, NUC122SC1AN, NUC122SD2AN, NUC122ZC1AN, NUC122ZD2AN NUC130LC1CN, NUC130LD2CN, NUC130LE3CN, NUC130RC1CN, NUC130RD2CN, NUC130RE3CN, NUC130VE3CN NUC140LC1CN, NUC140LD2CN, NUC140LE3CN, NUC140RC1CN, NUC140RD2CN, NUC140RE3CN, NUC140VE3CN

M0516LBN, M0516ZBN, M052LBN, M052ZBN, M054LBN, M054ZBN, M058LBN, M058ZBN

Mini51LAN, Mini51ZAN, Mini52LAN, Mini52ZAN, Mini54LAN, Mini54ZAN

NANO100KC2BN, NANO100KD2BN, NANO100KD3BN, NANO100KE3BN, NANO100LC2BN, NANO100LD2BN, NANO100LD3BN, NANO100LE3BN, NANO100SC2BN, NANO100SD2BN, ANO100SD3BN, NANO100SE3BN NANO110KC2BN, NANO110KD2BN, NANO110KD3BN, NANO110KE3BN, NANO110SC2BN, NANO110SD2BN, NANO110SD3BN, NANO110SE3BN NANO120KC2BN, NANO120KD2BN, NANO120KD3BN, NANO120KE3BN, NANO120LC2BN, NANO120LD2BN, NANO120LD3BN, NANO120LE3BN, NANO120SC2BN, NANO120SD2BN, NANO120SD3BN, NANO120SE3BN NANO130KC2BN, NANO130KD2BN, NANO130KD3BN, NANO130KE3BN, NANO130SC2BN, NANO130SD2BN, NANO130SD3BN, NANO130SE3BN

 ST

STM32F050C4, STM32F050C6, STM32F051C4, STM32F051C6, STM32F051C8, STM32F051K4, STM32F051K6, STM32F051K8, STM32F051R4, STM32F051R6 STM32F051R8,

STM32F100C4, STM32F100C6, STM32F100C8, STM32F100CB,

STM32F100R4, STM32F100R6, STM32F100R8, STM32F100RB, STM32F100RC, STM32F100RD, STM32F100RE,

STM32F100V8, STM32F100VB, STM32F100VC, STM32F100VD, STM32F100VE,

STM32F100ZC, STM32F100ZD, STM32F100ZE,

STM32F101C4, STM32F101C6, STM32F101C8, STM32F101CB,

STM32F101R4, STM32F101R6, STM32F101R8, STM32F101RB, STM32F101RC, STM32F101RD, STM32F101RE, STM32F101RF,

STM32F101T4, STM32F101T6, STM32F101T8, STM32F101TB,

STM32F101V8, STM32F101VB, STM32F101VC, STM32F101VD, STM32F101VE, STM32F101VF, STM32F101VG,

STM32F101ZC, STM32F101ZD, STM32F101ZE,

STM32F102C4, STM32F102C6, STM32F102C8, STM32F102CB,

STM32F102R4, STM32F102R6, STM32F102R8, STM32F102RB,

STM32F103C4, STM32F103C6, STM32F103C8, STM32F103CB,

STM32F103R4, STM32F103R6, STM32F103R8, STM32F103RB, STM32F103RC, STM32F103RD, STM32F103RE, STM32F103RF, STM32F103RG,

STM32F103T4, STM32F103T6, STM32F103T8, STM32F103TB,

STM32F103V8, STM32F103VB, STM32F103VC, STM32F103VD, STM32F103VE, STM32F103VF, STM32F103VG,

STM32F103ZC, STM32F103ZD, STM32F103ZE, STM32F103ZF, STM32F103ZG,

STM32F105R8, STM32F105RB, STM32F105RC, STM32F105V8, STM32F105VB, STM32F105VC,

STM32F107RB, STM32F107RC, STM32F107VB, STM32F107VC

STM32F405RG, STM32F407IG, STM32F407VG, STM32F407ZG, STM32F415RG, STM32F417VE

 TI

LM3S102 LM3S316 LM3S601 LM3S617 LM3S811 LM3S818

LM3S1958 LM3S1968

LM3S2110 LM3S2276 LM3S2776 LM3S2793 LM3S2965 LM3S2B93

LM3S3748 LM3S3W26

LM3S5749 LM3S5B91

LM3S6432 LM3S6537 LM3S6610 LM3S6911 LM3S6918 LM3S6965

LM3S8962 LM3S8971

LM3S9792 LM3S9B90 LM3S9B92 LM3S9B96 LM3S9L97

2.2.2 Supported Adapters

List of debug adapters, supported by CoIDE

Debugging Adapter

Available Devices

PC USB Driver

Colink

Atmel, TI, NXP, ST

Colink Driver Atmel, Energy Micro, Freescale , TI, NXP,

CoLinkEx CoLinkEx Driver

Nuvoton, ST, Holtek

Nu-Link, Nu-Link-Me or

Nu-Link Driver Nu-Link-pro

Nuvoton

FTDI Driver J-Link( How to use )

FTDI devices Atmel, TI, NXP, ST

Atmel, Energy Micro, TI, NXP, ST

J-Link Driver ST-Link/V2

ST-Link or ST-Link/V2

ST

Driver e-link32

e-link32 Driver Open-SDA

Holtek

Freescale

2.3 Requirement for CoIDE System requirements:

Windows XP SP3/Windows Vista/Windows 7

Hardware requirements:

Debug adapter such as CoLinkEx, Open-SDA, etc.

Software requirements:

GCC ARM Embedded ( see: Set GCC Compiler )

Install the related driver for the adapter you used

3 Preparation

3.1 Set GCC Compiler

Before you use CoIDE to start your project, you need to configure the GCC compiler and debugger.

It is recommended to use the ARM GCC compiler. For more details about ARM GCC, please click here . In addition, you can also choose other GCC compilers such as CodeSourcery GCC.

3.1.1 ARM GCC Introduction Features:

All GCC 4.7 features, plus latest mainline features

Cortex-M0/M0+/M1/M3/M4 support

Cortex-M4 with hard float multilib support

Fixed point fraction support

Nano C Library support Download link: https://launchpad.net/gcc-arm-embedded/+download

Note:

As CoIDE supports different GCC compilers, you need to pay attention to the following points when you switch between the compilers:

The different compilers have different C libraries, for example: ARM GCC has a base C Library, Nano C library Semihosting Library and a Retarget Library. However, CodeSourcery GCC only has the base C Library. See: Project Configuration

ARM GCC and CodeSourcery GCC use different link.ld when they compile the same project. CoIDE will generate different link.ld when you create the project, so it is

strongly recommended of you to set the GCC compiler before you start.

If you want to use ARM GCC to compiler the project you created under CodeSourcery GCC, you need to delete the Build.xml, link.ld, memory.ld. Then check a component and reconfigure the project after setting the GCC.

In CoIDE 1.7.0 or higher, we support the ARM GCC 4.7 version, which provide a Nano C library for Cortex M series.

3.1.2 Set GCC in CoIDE

1. After launching the CooCox CoIDE, click "Select Toolchain Path" under the Project menu.

2. Click the Browse button, select the folder that contains the arm-none-eabi-gcc.exe and

the other GCC execute files.

3. For example, select the bin folder and click OK to save the setting.

4 User Interface

4.1 Menus and Actions

4.1.1 File Menu Actions Name

Description

Shortcut

New File Create a new file. Ctrl + Shift + N Open File … Open a file from the file system in the Editor view. Save the content of the current editor. Disabled if the editor

Save Ctrl + S does not contain unsaved changes.

Save As... Save the content of the current editor under a new name. Save the content of all editors with unsaved changes.

Save All Ctrl + Shift + S Disabled if no editor contains unsaved changes.

Exit Exit CoIDE.

4.1.2 Edit Menu Actions Name

Description

Shortcut

Undo Undo your operations. Ctrl + Z Cut

Cut a code snippet or a file. Ctrl + X Copy

Copy a code snippet or a file. Ctrl + C Paste

Paste the code snippet or a file to a place. Ctrl + V

4.1.3 View Menu Actions Name

Description

Shortcut

Repository Open Repository View. Open the current project configuration page (Open

Configuration builder.xml of the current project in Editor).

Project Open Project View Components

Open component platform Help

Open Help View. Outline

Open Outline View. Peripherals

Open Peripherals View. Breakpoints

Open Breakpoints View.

Default layout Resume to the default layout.

4.1.4 Project Menu Actions Name

Description

Shortcut

New Project Create a new Project and close the current project. Open Project... Show a dialog that can be used to select an existing project. Close Project

Close the current project. Select

Select the GCC Toolchain you want to use. Toolchain path

Build the currently selected project. This is an incremental Build

build, meaning that the builder analyzes the changes since the F7 last time of build and minimizes the number of changed files.

Rebuild Rebuild all files of the current project. Ctrl + R Clean

Clean the intermediate files that generated by building.

Upload Open the Login dialog box, you can upload Component after

Component login with CooCox account. You can upload development board after login with CooCox

Upload Board account.

Upload You can upload component examples after login with CooCox

Example account.

4.1.5 Flash Menu Actions Name

Description

Shortcut

Program Download

Download program to Flash.

Flash Erase

Erase Flash.

4.1.6 Debug Menu Actions Name

Ctrl+F5 Toggle Breakpoint

To debug the current project.

Ctrl +Shift+ B Toggle Line Breakpoint

To set a breakpoint at the current line.

To set a breakpoint at one line in the function. Toggle Method Breakpoint To set a breakpoint at the entry of current function. Toggle Watch Breakpoint To set a Watch Breakpoint. Skip All Breakpoints

Skip all the Breakpoints when debugging.

Remove All Breakpoints Delete all the Breakpoints. Breakpoint Type

Breakpoint Type

4.1.7 Search Menu Actions Name

Description

Shortcut

Search... Execute a C/C++ or file search. Ctrl + H File...

Execute a file search. C/C++ …

Execute a C/C++ search.

4.1.8 Help Menu Actions Name

Description

Shortcut

Welcome Open the Welcome view. Help Contents

CoIDE Users' Guide. About CoIDE

Display CoIDE version number and license information.

4.2 Toolbar

4.2.1 Editor Toolbar Actions

Icons Name

Description

Shortcut

Create a new Project and close the current New Project

project.

Create New File Create a new file. Save the content of the current editor. Disabled

Save Ctrl + S

if the there is no changed. Build the currently selected project. This is an

incremental build, meaning that the builder Build

F7 analyzes the changes since the last time of build

and minimizes the number of changed files. Rebuild

Ctrl + R Start Debug.

Rebuild all files of the current project.

Ctrl + F5 Download Code

Debug the current project.

Download program to flash.

to Flash Flash Erase

Erase the full chip.

Configuration

Configure the project.

Target Manage

Manage the Targets in the project

Repository

Open Repository View.

Welcome

Open Welcome View

Open Element

Ctrl +Shift +T Search

Open the Search dialog box.

Ctrl + H Toggle Mark

Open the Search dialog box.

Turns mark occurrences on and off in the C/C++ Occurrences Alt+Shift+0 editor.

Next Annotation Go to the next annotation. Ctrl +. Previous

Ctrl + , Annotation

Go to the previous annotation.

Last Edit Go to the location where you have modified last Location Ctrl + Q time.

Back to...

Alt + Left Forward to...

Go back to the previous position.

Forward to next position.

Alt + Right

4.2.2 Debug Toolbar Actions

Icons Name

Description

Shortcut

Instruction Stepping Select the instruction stepping mode command Mode to step the instruction.

Select the Reset command to reset the Reset CPU

debugging. Select the Run command to resume execution

Run

F5 of the currently suspended debug target.

Select the Suspend command to halt execution Suspend

F9

of the currently selected thread in a debug

target. Ends the selected debug session and/or

Terminate Ctrl + F5

process. Select to execute the current line, including

Step Into

any routines, and proceed to the next

F11

statement. Select to execute the current line, following

Step Over F10

execution inside a routine. Select to continue execution to the end of the

Step Out current routine, then follow execution to the Ctrl + F11

routine's caller.

Run To Line Select to continue execution to current line. Ctrl + R Open Element

Ctrl +Shift +T Search

Open the Search dialog box.

Ctrl + H Toggle Mark

Open the Search dialog box.

Turns mark occurrences on and off in the Occurrences Alt+Shift+0 C/C++ editor.

Ctrl +. Previous Annotation Go to the previous annotation.

Next Annotation

Go to the next annotation.

Ctrl + , Go to the location where you have modified

Last Edit Location Ctrl + Q

last time.

Back to...

Alt + Left Forward to...

Go back to the previous position.

Forward to next position.

Alt + Right

4.3 Editor View

4.3.1 Welcome

When you launch CoIDE for the first time, you could see the welcome page. The welcome page is a convenient entry for Browse in ‘epositor , Create a New Proje t ,

Ope a Proje t , refer to User Guide and go to Forum .

4.3.2 Breakpoint

This view shows the information of breakpoints set by user in the code.

4.3.3 Components

This view displays all the components of the current project selection. Clicking on

a component in this view will have:

The Help view display the properties of the clicked component, such as the component source files, source files documents, dependent components, usage and comments.

The Code Snippet View displays all code snippets of the component.

The Project View highlights the component source files.

4.3.4 Console

This view shows the output of the execution of your program and enables you to enter input for the program.

Console View Toolbar: Icon Command

Description

Force the Console view to remain on top of other Pin Console

views in the window area. If multiple consoles are open, you can select the one

Display Selected Console

to display from a list.

Open Console

Open new console view.

Clear Console

Clear the console.

Scroll Lock

Toggle the Scroll Lock.

Show Console When Standard Out Changes Show console when standard out changes.

Show Console When Standard Error Changes Show console when standard error changes.

4.3.5 Configuration

Click the Configuration button to enter the configuration view. The Configuration view is split into seven tabs that contain the configuration for the project. They are Device, Compile, Link, Output, User, Debugger and Download.

4.3.5.1 Device configuration

4.3.5.2 Compile configuration

4.3.5.3 Link configuration

4.3.5.4 Output configuration

4.3.5.5 User configuration

4.3.5.6 Debug configuration

4.3.5.7 Download configuration

4.3.6 Editor

The C/C++ editor provides specialized features for editing C/C++ related files.

The most common way to invoke the C/C++ editor is to open a file from the Project Explorer by clicking the file (single or double-click depending on the user preferences).

The C/C++ editor only provides context menu (right click your mouse in the editor view, the context menu will appear) and key binding actions.

4.3.7 Help

This view displays all information about the selected component including:

1. Component name, overview and other information

2. API Reference, the reference of the APIs, which link to the Doxygen Documents generated by CoIDE.

3. Source files: Source files of the component.

4. Dependency: Other components depended by the component.

4.3.8 Help Contents

The Help Menu provides contents for help with the features and functionality of the CoIDE.

Toolbar Icon

Go Back

Toolbar Go Forward to

Go back to the previous position.

Toolbar Home

Forward to the next position.

Go to the home page of the Help content. Toolbar Show in table of

Show the page position in the table of

content Toolbar content view.

Bookmark Document Add a bookmark. Toolbar Print Page

Toolbar Print Topics

Print the current page.

Context menu Search Topics

Print the topics.

Context menu Collapse All

Search the topics.

Context menu Link with contents

Collapse all the topics.

Link with the contents.

Context menu

Show Result Search Results Categories Show the categories of the search results.

View Show Result

Search Results Description Show the description of the search results.

View Delete Selected

Bookmark View Bookmark

Delete the selected bookmark.

Delete All Bookmark Delete the entire bookmark. Bookmark View

4.3.9 Outline

The Outline view will show the outline when you open a source file in the edit view. It can show all the includes, definitions, macros, functions in the source file you opened.

You can click the icons or the characters behind to go to the related values in the edit view.

Outline view toolbar icons:

The table below lists the icons displayed in the Outline view toolbar.

Sort items alphabetically

Filters…

Hide Fields Link With Editor Hide Static Members

Group Includes Hide Non-Public Members

Group Macros Hide Inactive Elements

Group Methods Outline view menu

Group Namespaces Outline view icons: The table below lists the icons displayed in the Outline view.

Icon

Description Class

Namespace Method private

Macro Definition Method protected Enum

Method public Enumerator

Struct

Variable Type definition Field private

Union

Field protected

Function

Field public

4.3.10 Peripheral

This view shows the information of peripheral register. Click on the corresponding register to get the register detailed information view:

4.3.11 Project Explorer

This view displays all files of the file system under your project directory, including C source files (*.c, *.h), assembly source files (*.s), project configuration files (build.xml), linker script files (*.ld), library files (*.a), etc. In this view you could do the following operations:

Open files in the editor view

Open project configuration interface

Close the current project

Create new projects, files, or folders

Manage existing files (copy, paste, delete, move or rename)

4.3.12 Repository

This view displays all available components in the project. The √ efore the o po e t sho s this o po e t has ee added to the proje t. B he ki g or u he ki g the √ before components to add or delete the components.

4.3.13 Search

The Search view only appears after you have searched something in the project.

The type of the selected C/C++ element defines which search context menus are available. Search view Toolbar:

Icon Command Description

Next Navigate to the next search result.

Previous Navigate to the previous search result. Remove the Selected

Removes user selected matches from the search Matches

console.

Remove All Matches

Clear the search console.

Run the Current Search Again Run the current search again.

Terminate Terminate the current search. Show the list of previously runs searching, which

Show Previous Searches

can be re-selected. Force the search view to remain on top of other

Pin the Search View

views in the window area. List two selectable view layouts for search

Menu results: Flat and Hierarchical.

Minimize Console

Minimize the Console view.

Maximize Console Maximize the Console view.

4.4 Debug View

4.4.1 Breakpoints

The Breakpoints View lists all the breakpoints you have set in your workspace. Up to six breakpoints can be toggled if you are debugging in flash with Cortex-M3 series' chips, for Cortex-M0, the number is four. Otherwise, warnings will be presented at runtime.

You can double-click a breakpoint to find its location in the editor (if applicable). You can also enable or disable breakpoints, delete them, add new ones.

The commands available in the Breakpoints View are listed below.

Command Name

Description

Availability

Context Remove Selected

Only remove the selected

Breakpoints menu and breakpoint(s). view action

Context Remove All

menu and Breakpoints view action

Remove all breakpoints.

Show Breakpoints Display the breakpoints supported by Supported by

View action

the selected target board.

Selected Target Context

Go to the corresponding location of the Go to File

menu and

breakpoint in the java editor.

view action Skip All

Set all breakpoints to be skipped. View action Expand All

Expand all the sub items in the view. View action Collapse All

Collapse all the sub items in the view. View action Change if the breakpoints should be

Link with View View action

linked to the Debug View.

Add Event

View action Breakpoint(C/C++)...

Add event breakpoint.

Add watchpoints (Not supported by the Add Watchpoints current version. It will be supported in

View action (C/C++)...

the future versions.)

Show full paths Show the full paths of the breakpoints. View action Allow you to select an alternate

Group By... grouping for your breakpoints or create View action your own.

Select the default working set so that Select default the new breakpoints will be added into Working Sets... View action

this working set. Deselect the default working set so

Deselect Default that the new breakpoints will not be

View action Working Set

added into any working set.

Working Sets...

Open the working sets dialog.

View action Change the selected breakpoint(s) to

Context Enable

menu Change the selected breakpoint(s) to

be enabled.

Context Disable

be disabled.

menu Context

Select All Select all the breakpoints in the view. menu

Copy the selected breakpoints to the Context Copy

system clipboard.

menu Context

Paste Paste copied breakpoints into the view. menu

Context Import Breakpoints... Open the import breakpoints wizard.

menu Context

Export Breakpoints... Open the export breakpoints wizard. menu

Breakpoint Open the breakpoints properties Context

1. The Debug view shows the target debugging information in a tree hierarchy.

2. The number beside the thread label is a reference counter, not a thread identification

number.

3. The CDT displays stack frames as child elements. It displays the reason for the suspension beside the thread, (such as end of stepping range, breakpoint hit, and signal

received). When a program exits, the exit code is displayed.

Debug view context menu commands command

Name

Description

Remove All Terminated Clear all terminated processes in Debug view.

Toggle step filters on/off. When on, all step functions apply Use Step Filters

step filters. Copy the selected stack of suspended threads as well as the

Copy Stack state of the running threads to the clipboard.

Find... Open the debug view element-searching dialog. Select to execute the current line, including any routines,

Step Into

and proceed to the next statement. Select to execute the current line, following execution

Step Over

inside a routine. Select to continue execution to the end of the current

Step Return routi e, the follo e e utio to the routi e s aller. Instruction Stepping

Activate to enable instruction stepping mode to examine a Mode

program as it steps into disassembled code. Select the Resume command to resume execution of the

Resume

currently suspended debug target. Select the Suspend command to halt execution of the

Suspend currently selected thread in a debug target.

End the selected debug session and/or process. The impact Terminate

of this action depends on the type of the item selected in the Debug view.

Terminate and Select the Terminate and Relaunch command to terminate Relaunch

the selected debug target and then relaunch it. Select the Restart command to restart the remote debug

Restart

target. Select the Disconnect command to disconnect the

Disconnect

connection to the debug target.

Relaunch This command relaunches the selected debug target. Open the launch configuration dialog, allowing you to make

Edit...

changes. Open the source lookup dialog, allowing you to make

Edit Source Lookup...

changes.

Lookup Source Select to force a source lookup to take place. Terminate and

Terminate the selected debug target and removes it from Remove

the view.

Terminate/Disconnect All Terminate all active launches in the view.

Open the Properties for window showing the process Properties

properties.

4.4.3 Disassembly

The Disassembly View shows the loaded program as assembler instructions mixed with source code for comparison. The currently executing line is marked by a yellow arrow and highlighted with green background in this view. You can do the following tasks in the Disassembly view.

Set breakpoints at the start of any assembler instruction

Enable and disable breakpoints and set their properties

Step through the disassembly instructions of your program

Jump to specific instructions in the program

Disassembly view context menu commands Command

Copy Copy the selected content into the clipboard. Context menu

Select All

Select all the content.

Context menu Context menu

Show the assembly and its corresponding

Show Source and View

source code

action Show Symbols Show function label and symbols

Context menu

Preferences

Parameter selection.

Context menu Resume program execution until the specific

line is reached. This is a convenient way to Run To Line

Context menu suspend execution at a line without setting a

breakpoint. Jump to the line selected in the Disassembly

Move to Line Context menu

view.

Resume At Line Resume program execution from the line Context menu Resume At Line Resume program execution from the line Context menu

Refresh View Refresh Disassembly view. View action Go to Current

Program

View action Counter(Home)

Jump to the current program execution.

Link with Display the current operating position of the Active Debug

View action

code

Context Open New

View action View

Open a new Disassembly view.

Pin to Debug Context View action

4.4.4 Expressions

An expression is a snippet of code that can be evaluated to produce a result. The context for an expression depends on the particular debug model. Some expressions may need to be evaluated at a specific location in the program so that the variables can be referenced. You can view information about expressions in the Expressions view.

You can inspect expressions from a scrapbook page, a stack frame of a suspended thread, or other places. The Expressions View opens automatically when an item is added to the view. When debugging a C/C++ program, data that contains variables can be expanded to show the variables and the fields of the variables.

There are many commands available in the Expressions View: Command

Show Type Name Configure columns to display type names. View action

Show logic Show logic structure of the Expressions. View action Show logic Show logic structure of the Expressions. View action

View action Add Watch

Collapse All

Collapse all the Expressions.

Context menu Expression Allow you to add a watch expression.

and view action

Context menu Remove

Remove the currently selected

expression(s) from the view.

and view action

Context menu Remove All

Remove all of the expressions from the

and view action Open New

view.

View action View

Open a new Expressions view.

Pin to Debug Context View action

Refresh

View action Select All

Refresh.

Context menu Copy

Select all the variables in the view.

Copy the selected expressions and

Expressions Context menu variables to the system clipboard. Open the search dialog to find elements

Find... Context menu

in the variables view.

Disable Disable a currently enabled expression. Context menu Enable

Context menu Edit Watch

Enable a currently disabled expression.

Allow you to edit existing watch

Context menu Expression

expression.

Reevaluate

Reevaluate the currently selected

Context menu Expression

expression. Select a format type. Choices include:

Format

Binary, Decimal, Natural, and

Context menu

Hexadecimal.

4.4.5 Memory

The Memory view of the Debug perspective lets you monitor and modify your process memory. Memory can be displayed in different predefined data formats -- memory renderings. The CoIDE supports five rendering types -- hexadecimal (default), ASCII, signed integer and unsigned integer.

The Memory view can display and modify the value of selected memory address. The Rendering pane can be configured to display more than two renderings at the same time.

Memory view toolbar icons:

The table below lists the icons displayed in the Memory view toolbar.

Command Name Description

New Tab Click to create a new memory view.. Go

Shows the Memory value of the selected address. Import

Import memory view from different kinds of files. Export

Export memory to different kinds of files. Open New View

Open a new Memory view.

Pin to Debug Context Default Rendering

Select default rendering.

Find/Replace Find or replace value from the Rendering pane. Find next

Find next one after the command: Find/Replace. Clear Expressions

Clear the contents of the address input box.

Memory view context menu:

The context menu inside the Memory view includes:

Name

Description

Panes Enable or disable the showing of the Address, Binary, and Text portions of Panes Enable or disable the showing of the Address, Binary, and Text portions of

Toggle between the Little (default) and Big Endian display of memory. Choose the character encoding used to convert memory values into text for

Text display. Choices include: ISO-8859-1 (default), US-ASCII, or UTF-8.

Specify the cell size used to display values in the Binary column. Choices Cell Size include 1, 2, 4 (default), and 8 bytes.

Specify the radix used to display the values in the Binary column. Choices Radix include Hex, Decimal Signed, Decimal Unsigned (default), Octal, and Binary.

Columns Specify the number of columns in the Binary column. Select the update mode of the Rendering pane: Always, On Breakpoints, or

Update Mode

Manual.

Copies the selected portion (address, content or binary number) of the Copy Rendering pane to the clipboard.

Reset To Base Reset the Rendering pane to the original base address. Address

Refresh Refresh the Rendering pane.

4.4.6 Peripherals view (CoAssistant)

The Peripherals View can be used to view and modify the value of Peripherals' registers. Values that have been changed are highlighted in the Peripherals view when your program stops.

It displays the register list and views the value of these registers. Register that have been changed are highlighted in the Peripherals view.

Click the Register name to open the detail information view. In this view, you can get the description, RW access, address offset and the reset value of the register. You can also modify the value of register when you debug a project.

4.4.7 Registers

The Registers view of the Debug perspective lists information about the registers in a selected stack frame.

You can view information about the registers in a selected stack frame. Values that have been changed are highlighted in the Registers view when your program stops.

Registers view toolbar icons:

The table below lists the icons displayed in the Registers view toolbar.

Command Name

Description

Show Type Configure columns to show type names(unavailable when Name

columns are displayed).

Show logic structure Show logic structure of the registers.

Collapse All

Collapse all the registers.

Open New View Open a new Registers view. Pin to Debug

Layout Provides multiple layout options for the Registers view.

Registers view context menu commands:

The Registers view context menu commands include:

Command Name

Description

Select All

Select all the editor content.

Copy Registers Copy the register names and contents to the clipboard.

Enable

Enable the selected register.

Disable

Disable the selected register. Select a format type. Choices include Binary, Decimal,

Format

Natural, and hexadecimal. Open the Find dialog, which allows you to find specific

Find...

elements within the view. Open the Set Value dialog to change the selected

Change Value...

registers value. Open the Register Group dialog, which allows you to

Add Register Group define a register group that is shown in the Registers

view.

Restore Default Restore the original register groups. Register Groups

Add Watchpoints Add watchpoints (Not supported by the current version. (C/C++)...

It will be supported in the future versions.) Watch

Convert the selected register into a watch expression.

4.4.8 Semihosting view

Semihosting view is used to show the information of the host computer and the ARM input and output communication when debugging.

Semihosting view toolbar icons:

The Semihosting view toolbar commands include:

Clear Console Clear Console view content.

Scroll Lock Toggle the Scroll Lock. Show semihosting info

Show semihosting information.

Semihosting view context menu commands:

The Semihosting view context menu commands include:

Command Name

Description

Cut

Cut the selected content.

Copy Copy the selected content to the system clipboard. Paste

Paste the content in the clipboard.

Select All

Select all the content.

Find/Replace Find or replace specific element from the Rendering pane. Open Link

It always is in an invalid state.

Clear

Clear all the content.

Scroll Lock

Toggles the Scroll Lock.

4.4.9 Variables

The Variables View displays information about the variables associated with the stack frame selected in the Debug View. When debugging a C/C++ program, data that contains variables can be expanded to show the variables and the fields the variables contain.

You can view information about the variables in a selected stack frame in the Variables view. When execution stops, the changed values are by default highlighted. Like the other debug- related views, the Variables view will not be refreshed when you run your executable code. The refresh occurs when the execution stops.

Variables view

There are many commands available in the Variables View:

Command Name

Description

Availability

Show Type Name Configure columns to show type names. View action Show logic structure Show logic structure of the Variables.

View action Collapse All

Collapse all the Variables.

View action Context menu

Add Global Variables Add Global Variables. and view action

Remove Global Context menu

Remove Global Variables.

Variables and view action Remove All Global

Context menu

Remove All Global Variables.

Variables and view action Open New View

View action Pin to Debug Context

Open a new Variables view.

View action Select All

Select all the variables in the view.

Context menu Copy the selected variables to the system

Copy Variables Context menu

clipboard.

Enable

Context menu Disable

Enable a currently disabled variable.

Context menu Cast To T pe…

Disable a currently enabled variable.

Cast To T pe…

Context menu

Allow you to create a memory monitor for View Memory

Context menu

the selected variable. Select a format type. Choices include

Format

Binary, Decimal, Natural, and

Context menu

hexadecimal. Open the search dialog to find elements in

Find... Context menu

the variables view. Allow you to change the value for the

Change Value... Context menu

underlying selected variable.

Add

Context menu Watchpoints(C/C++)

Add Watchpoints(C/C++).

Allows you to create a watch expression Watch

Context menu

for the selected variable.

5 Project Management

5.1 Create Project

CoIDE provides two models for creating projects:  Create a new project based on your target chip.

 Create a new project based on your target board. You can select a MCU or a board to create a project and start your embedded development.

A board is a set of components including basic components, driver components and app examples. If CooCox supports your target board, it is recommended to create a new project based on your target board. When you select the board, CooCox will show you all the components and examples that suitable for your board. You don t need to do any modification on the examples and components.

5.1.1 Create Project by Chip Model

To create an embedded project using CoIDE by chip model, you only need to perform the following steps:

1. Select Project > New Project from the menu or select Create a New Project from the welcome page.

2. A wizard window will pop up, enter a name for the project (for example: GPIO_Test),

You can also modify the Project Path.

3. Choose a model. For example, select ''Chip Model', then click Next .

4. Select a chip. For example, select ''MKL05Z32VFM4''.

5. Click "Finish". CoIDE automatically generates GPIO_Test.coproj file and one configuration: "GPIO_Test".

6. Check a component; for example, select 'GPIO'. CoIDE will automatically check the components, which are depended by the checked component.

7. You can view the result in Component View.

8. You can also click Drivers to view the Driver pages and add the driver components to

your project.

5.1.2 Create Project by Board Model

To create an embedded project using CoIDE by board model, you only need to perform the following steps:

9. “ele t Proje t > Ne Proje t from the menu or select Create a New Project from the welcome page.

1. A wizard window will pop up, enter a name for the project (for example: Cookie_Test)

2. Choose a model. For example, select ''Board Model''. Then click Next .

3. Select a board. For example, select '' Cookie NuMicro'' which produced by CooCox.

4. Click "Finish". CoIDE automatically generates Cookie_Test.coproj file and one configuration: "Cookie_Test".

5. Click "Document". CoIDE will show document about cookie board in Help View.

6. Check a driver component; for example, select 'LCDShield'. CoIDE will automatically

check the components, which are depended by the checked component.

7. You can review the result in Peripherals Page.

8. You can also click Drivers to view the Driver pages and add the other driver components to your project.

5.2 Manage Target/Groups/Files and Switch Chip

5.2.1 Target List Management in the Multi-configuration

There is a default configuration target after creating project: Flash configuration target.

Click Target Manage button to manage configuration list. You can modify the configuration name, increase configuration, delete configuration, and change the sort order of configuration, set as current target and so on. Click OK to confirm.

In the project view, select the parent directory in which you want to create the Group (If you do not select the parent directory, the default is the root directory of the project), select Add Group in context menu:

Group edit box pops up, and you can add the Group.

Click Add Files menu item to add a link file to the project view:

Click the New File e u ite to create a new file. As it is shown in the following figure, after clicking ''Open'' you can create a file and add the file to the project view as a link file.

Double click the file name in Project view to open and edit it.

5.3 Project configuration

Click Configuration button

to open project configuration view.

Configuration area is divided into seven different configuration items: Device, Compile, Link, Output, User, Debugger and Download. The first five configurations are building and linking configurations, the last two are debugging/programming configurations.

5.3.1 Change device

Device can be changed in the latest version of CoIDE.

However, the new chip might not be compatible with component files or other configuration you checked in the old chip, so errors or warnings could occur. User needs to consider carefully and modify appropriately.

1. Click ''Device'' in context menu in project view to change project chip.

2. Select the target file you need to change, a d the li k Change Devi e .

3. CoIDE will prompt you to confirm the change.

4. Click OK, then CoIDE will show you the following view. Peripherals view and all the other views will be associated to the new chip.

5.3.2 Compile configuration

1) Option area: 1) Option area:

select the FPU hard, you need to enable FPU module in the code)

b) Optimization: Select the level of optimization, it includes (None(-O0), Optimize(- O1), Optimize More(-O2), Optimize Most(-O3), Optimize Size(-Os))

2) Include paths area: Add / ‘e o e header files paths The added paths will be associated to the current path of the project file to be

processed.

3) Defined Symbols area: Add / Remove pretreatment (macro definition) Symbol

4) Misc Controls area: User can edit (add) user-defined compile commands.

5) Compile Control String area: Show compile commands (do not edit)

5.3.3 Link configuration

1) Options area:

a) Use Memory Layout from Memory Window (Checked by default) Check: Memory Areas will be available; Scatter File will be unavailable.

Mean to use memory Areas memory data, and use IDE default link file (such as link.ld). Uncheck: Memory Areas will be unavailable; Scatter File will be available.

The system will add default link.ld/arm-gcc-link.ld and the memory.ld file in the directory of the project file, at the same time, the link file path is filled into the Scatter File area, and user can select a custom link file in the Scatter File area.

b) Discard unused sections

Allow recovery of unused input section. Segments that contain the entrance symbol and all the segments of undefined symbols in the command line will be retained. Segments that contain a dynamic object reference symbol will also be retained. Check this option to reduce code size.

c) Don’t use standard system startup files

Do not use the standard system startup files when linking. The standard system libraries are used in default u less - ostdli or - odefaultli s is used.

d) Library select list

Select link library: Not use C Library, Use base C Library, Use nano C Library*, Semihosting, Retarget

Options: Printf float, Scanf float Note: Use nano C Library only work if you are using gcc-arm-none-eabi-4_7-2012q4 or

higher version. If you choose Use nano C Library , it will provide two more options Printf float and Scanf float . Just like the following picture.

2) Linked Libraries area: Add/remove library file.

Library is collection of a series of procedures, external function and variables. It is integrated into an application program by the compiler and linker during compilation, and made into a target file and an executable file that can run independently. The CoIDE library is the GCC library.

3) Memory Areas area

The memory area is o l a aila le he Use Me or La out fro Me or Wi do is checked.

a) Select: Debug in Flash (default), Debug in RAM

b) I Me or Areas area, start address a d size for I‘OM a d I‘AM can be customized:

IROM and IRAM start address and size is automatically changed according to your choice, or you can manually modify these values.

c) In Start line, IROM and IRAM start address can be customized; in Size line, IROM and

IRAM size can be customized.

4) Scatter File area