Power Application Controller www.active-semi.com Copyright 2018 Active-Semi, Inc.
Table of Contents 1 Overview... 3 1.1 Supported Versions... 3 2 Download... 4 2.1 CoIDE... 4 2.2 CoFlash (optional)... 4 2.3 ColinkEX USB Drivers... 4 2.4 GNU ARM Embedded Toolchain... 4 3 Install... 5 3.1 CoIDE... 5 3.2 CoFlash (optional)... 5 3.3 ColinkEX USB Drivers... 6 3.3.1 Windows 7... 6 3.3.2 Windows 8 or 10... 6 3.4 GNU ARM Embedded Toolchain... 6 4 Configure... 7 4.1 CoIDE toolchain path... 7 5 Creating a New Project... 8 5.1 Create a New Pac52xx Project... 8 5.2 Add the M0 CMSIS Core files... 10 5.3 Add the PAC52xx SDK... 12 5.4 Build the Project... 17 6 Linking Functions into RAM... 19 6.1 Create a RAM Function... 19 7 Conclusion... 21 About Active-Semi... 22 2018 Copyright, Active-Semi International, Inc. - 2 - Revised 2018/02/15
1 OVERVIEW This document will discuss how to install and configure CooCox CoIDE for use with PAC5xxx. 1.1 Supported Versions This documents supports CooCox CoIDE v1.7.8. No other versions of CooCox CoIDE are supported. 2018 Copyright, Active-Semi International, Inc. - 3 - Revised 2018/02/15
2 DOWNLOAD This section will discuss what to download. Please contact Active-Semi with any trouble obtaining any of the required files. 2.1 CoIDE If not already installed, download CoIDE v1.7.8 from this link: http://www.coocox.org/download/tools/coide-1.7.8.exe 2.2 CoFlash (optional) If not already installed, download CoFlash v1.4.8 from this link: http://www.coocox.org/download/tools/coflash-1.4.8.exe 2.3 ColinkEX USB Drivers If not already installed, download ColinkEx USB Drivers v1.2.1 from this link: http://www.coocox.org/download/tools/colinkexusbdriver-1.2.1.exe 2.4 GNU ARM Embedded Toolchain If not already installed, download GNU Arm Embedded Toolchain v4.8-2013-q4 released 2013-12-23 from this link: https://launchpad.net/gcc-arm-embedded/4.8/4.8-2013-q4-major 2018 Copyright, Active-Semi International, Inc. - 4 - Revised 2018/02/15
3 INSTALL This section will discuss how to install the files you downloaded. 3.1 CoIDE Install CoIDE v1.7.8 using the default options. When prompted, choose NOT to install CoCenter by unchecking the box. 3.2 CoFlash (optional) Install CoFlash v1.4.8 into the following directory: C:\CooCox\CoFlash 2018 Copyright, Active-Semi International, Inc. - 5 - Revised 2018/02/15
3.3 ColinkEX USB Drivers See the appropriate section for your Windows OS version. 3.3.1 Windows 7 Install ColinkEx USB Drivers v1.2.1 into the following directory: C:\CooCox\CooCox ColinkEx USB Driver When prompted, choose to install the unsigned drivers anyways. You may have to do this multiple times. 3.3.2 Windows 8 or 10 Before attempting to install the ColinkEx USB drivers, you must first disable the Driver Signature Enforcement feature. For instructions on how to disable the Driver Signature Enforcement feature, choose one of the resources available from this link: https://www.google.com/#q=disable+driver+signature+enforcement Once the Driver Signature Enforcement feature is disabled, install the ColinkEx USB Drivers v1.2.1 into the following directory: C:\CooCox\CooCox ColinkEx USB Driver 3.4 GNU ARM Embedded Toolchain Install GNU Arm Embedded Toolchain v4.8-2013-q4 released 2013-12-23 into the following directory: C:\gcc\4.8-2013q4 2018 Copyright, Active-Semi International, Inc. - 6 - Revised 2018/02/15
4 CONFIGURE This section will discuss what to configure. 4.1 CoIDE toolchain path Run CoIDE and select Project->Select Toolchain Path in the menu. Click Browse and set the toolchain path to: C:\gcc\4.8-2013q4\bin 2018 Copyright, Active-Semi International, Inc. - 7 - Revised 2018/02/15
5 CREATING A NEW PROJECT This section will discuss how to create a new PAC52xx project and add the PAC52xx SDK. The latest version of the PAC52xx SDK can be downloaded from the Software Tab of any PAC52XX product page. For example, the PAC5223 product page is located at: https://active-semi.com/products/intelligent-motor-control/pac5223 5.1 Create a New Pac52xx Project Create a new project by selecting Project->New Project in the menu. Choose a name and directory to save the new project. The example below uses the project name pac52xx_coocox and default project directory C:\CooCox\CoIDE\workspace\pac52xx_coocox 2018 Copyright, Active-Semi International, Inc. - 8 - Revised 2018/02/15
Select Chip and then a PAC52xx device, such as PAC5220. 2018 Copyright, Active-Semi International, Inc. - 9 - Revised 2018/02/15
A new PAC52xx project should now be created with a blank main.c file. CooCox IDE Installation 5.2 Add the M0 CMSIS Core files Open the Repository window by selecting View->Repository in the menu. 2018 Copyright, Active-Semi International, Inc. - 10 - Revised 2018/02/15
Check the box next to M0 Cmsis Core in the COMMON section. This will create a cmsis_core group in your project. 2018 Copyright, Active-Semi International, Inc. - 11 - Revised 2018/02/15
5.3 Add the PAC52xx SDK Install the PAC52xx SDK into your project directory, being sure to read and accept the License Agreement. The example below uses the default project directory C:\CooCox\CoIDE\workspace\pac52xx_coocox and installs the PAC52xx SDK into the directory C:\CooCox\CoIDE\workspace\pac52xx_coocox\pac5xxx_sdk Add a Group to the project by right-clicking on pac52xx_coocox and selecting Add Group 2018 Copyright, Active-Semi International, Inc. - 12 - Revised 2018/02/15
Name the group pac5xxx_sdk Create three more subgroups under the pac5xxx_sdk group as shown. 2018 Copyright, Active-Semi International, Inc. - 13 - Revised 2018/02/15
Add the PAC52xx SDK files to the pac5xxx_boot subgroup by right-clicking on it and selecting Add Files Browse to the PAC52xx SDK folder inside the project directory. For the pac5xxx_boot subgroup, add the files from the pac5xxx_boot_coide folder. 2018 Copyright, Active-Semi International, Inc. - 14 - Revised 2018/02/15
Repeat this process for the pac5xxx_drivers and pac5xxx_peripheral subgroups by adding the files from the folders with their respective names. 2018 Copyright, Active-Semi International, Inc. - 15 - Revised 2018/02/15
Add the pac5xxx_sdk_version.h file to the pac5xxx_sdk group. 2018 Copyright, Active-Semi International, Inc. - 16 - Revised 2018/02/15
5.4 Build the Project Open the Configuration window by selecting View->Configuration in the menu. CooCox IDE Installation Configure the build warnings to exclude unused functions by adding the term -Wno-unused-function to the Misc Controls box. 2018 Copyright, Active-Semi International, Inc. - 17 - Revised 2018/02/15
To build the project, select Project->Build in the menu. If the build is successful, the Console window will show BUILD SUCCESSFUL and the program size. 2018 Copyright, Active-Semi International, Inc. - 18 - Revised 2018/02/15
6 LINKING FUNCTIONS INTO RAM This section will discuss how to create functions that are placed into RAM, instead of FLASH, for quicker execution. 6.1 Create a RAM Function Modify main.c as shown below. In this example, the gpio_init function will be placed into FLASH but the gpio_toggle function will be placed into RAM instead because of the PAC5XXX_RAMFUNC attribute. This can be verified by checking the map file. 2018 Copyright, Active-Semi International, Inc. - 19 - Revised 2018/02/15
The pac52xx_coocox.map file is located in the bin folder where the project is saved. The example below uses the project directory C:\CooCox\CoIDE\workspace\pac52xx_coocox 2018 Copyright, Active-Semi International, Inc. - 20 - Revised 2018/02/15
7 CONCLUSION CooCox CoIDE should now be installed and properly configured for use with PAC5xxx. CooCox IDE Installation 2018 Copyright, Active-Semi International, Inc. - 21 - Revised 2018/02/15
ABOUT ACTIVE-SEMI Active-Semi, Inc., headquartered in Dallas, TX, is a leading innovative semiconductor company with proven power management, analog, and mixed-signal products for end-applications that require power conversion (AC/DC, DC/DC, DC/AC, PFC, etc.), motor drivers and control, and LED drivers and control along with ARM microcontrollers for system development. Active-Semi s latest family of (PAC ) ICs offer high-level of integration with 32-bit ARM Cortex -M0, along with configurable power management peripherals, a Configurable Analog Front End with high-precision high-speed data converters, single-ended and differential PGAs, and integrated low-voltage and high-voltage gate drives. PAC ICs offer unprecedented flexibility and ease in the systems design of various end-applications such as Wireless Power Transmitters, Motor drives, UPS, Solar Inverters, and LED lighting that require a microcontroller, power conversion, analog sensing, high-voltage gate drives, open-drain outputs, analog and digital general purpose IO, as well as support for wired and wireless communication. More information and samples can be obtained from http://www.active-semi.com or by emailing marketing@active-semi.com Active-Semi shipped its 1 Billionth IC in 2012, and has over 120 in patents awarded and pending approval. LEGAL INFORMATION & DISCLAIMER Copyright 2018 Active-Semi, Inc. All rights reserved. All information provided in this document is subject to legal disclaimers. Active-Semi reserves the right to modify its products, circuitry or product specifications without notice. Active-Semi products are not intended, designed, warranted or authorized for use as critical components in life-support, life-critical or safety-critical devices, systems, or equipment, nor in applications where failure or malfunction of any Active-Semi product can reasonably be expected to result in personal injury, death or severe property or environmental damage. Active-Semi accepts no liability for inclusion and/or use of its products in such equipment or applications. Active-Semi does not assume any liability arising out of the use of any product, circuit, or any information described in this document. No license, express, implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of Active-Semi or others. Active-Semi assumes no liability for any infringement of the intellectual property rights or other rights of third parties which would result from the use of information contained herein. Customers should evaluate each product to make sure that it is suitable for their applications. Customers are responsible for the design, testing, and operation of their applications and products using Active-Semi products. Customers should provide appropriate design and operating safeguards to minimize the risks associated with their applications and products. All products are sold subject to Active-Semi's terms and conditions of sale supplied at the time of order acknowledgment. Exportation of any Active-Semi product may be subject to export control laws. Active-Semi, the Active-Semi logo, are registered trademarks of Active-Semi, Inc. Active-Semi logo, Solutions for Sustainability, Micro Application Controller, Multi-Mode Power Manager, Configurable Analog Front End, and Application Specific Power Drivers are trademarks of Active-Semi, Inc. ARM and Cortex are registered trademarks of ARM Limited. All referenced brands and trademarks are the property of their respective owners 2018 Copyright, Active-Semi International, Inc. - 22 - Revised 2018/02/15