CodeWarrior Development Tools Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeWarrior Development Tools Knowledge Base

Labels

Discussions

Sort by:
This document contains an overview of what is the Codewarrior Linker File for Kinetis devices and how to edit it to relocate code and data. It also explains how to create a debug sesion out of external RAM.   Regards, Carlos
View full article
Digital Signal Controllers (DSC) is populated in motor control, Power conversion, automotive and wireless charger, etc. Digital Signal Controllers|NXP    1. CodeWarrior Eclipse v11 Nearly all the DSC products can be supported by CodeWarrior eclipse. The latest CodeWarrior v11 can support DSC naturally on 64bit Windows 10 and windows 7 for all recommend run control interface. CodeWarrior eclipse v11 is our recommendation. CodeWarrior for Microcontrollers-Eclipse IDE 11.0|NXP  CodeWarrior 11.0.1 update just released in end of June, with this update, Unlimited License for all Code Size.         CodeWarrior Classic v8.3 Aside from CodeWarrior eclipse v11, we also have some customers prefer using classic CodeWarrior v8.3.  For some very old DSC product, for example DSP56F80x, it is supported by classic CodeWarrior for DSC v8.3 only. CodeWarrior® Development Tools for 56800/E DSC|NXP  CodeWarrior for DSC v8.3 doesn’t support 64bit Windows 10 and Windows7 naturally, because the ccs driver included in CodeWarrior v8.3 package only support old windows platform. We will explain how to configure the USB TAP run control interface on Windows 7 and Windows 10 64-bit for those using CodeWarrior development tools based on the Classic IDE rather than the Eclipse IDE. This workaround was tested and verified on Windows 7 64-bit and Windows 10 64-bit  for CodeWarrior DSC V8.3. Installation steps:        Install CodeWarrior v8.3 on a Windows 7 or Windows 10 64bit system. At the end of installation, three or four error messages appear regarding a problem installing the USB drivers. Ignore these errors.        Acquire latest ccs driver from CodeWarrior eclipse. Install CodeWarrior for Microcontrollers-Eclipse IDE 11.0|NXP  to a computer, Copy ccs folder from CodeWarrior v11 installation folder to CodeWarrior v8.3 install folder, replace original ccs folder.        Uninstall CodeWarrior eclipse v11. This step is optional.   Now you can use CodeWarrior v8.3 on new windows platform. Please NOTE: Officially CodeWarrior 8.3 was not designed for win7/10.  This doc is just a personal technical sharing. If user meets windows compatible issue of 8.3 on win7/10. Please move to CodeWarrior 11.
View full article
Inside {CW10 install folder}\eclipse there is ecd.exe which is used to run build projects from command line. this article focuses on ecd.exe usage with examples. Especially How to use ecd.exe command to build, generateMakefiles,make and reference a project.
View full article
In many of user applications we use a CRC/checksum to verify that the code/flash on the target is not modified. For this, not only the code/data in flash counts, but as well all the unused gaps in the memory map. Instead to leave it up to the flasher/debugger (which usually erases it to 0xFF), I want to fill it with my pattern. For example 0xAA.   How to implement? There may be several ways,  but I think the easiest way is to modify linker file.   the linker file structures are different for different MCUs.   For example, CW for 8bit/16bit and Coldfire V1 uses PRM file;  while CW for kinetis Gnu compiler uses ld file. We will talk about each of the case separately. 1. CW for 8bit/16bit and Coldfire V1. 1.1 .  NO FILL command involved. We define a segment  in prm file MYCONST_ROM     =  READ_ONLY    0x0870 TO 0x08FF; Then allocate MYCONST  into it inside PLACEMENT. MYCONST    INTO  MYCONST_ROM; In C code, we only define  my_const_var(0xCCDD) at this range. #pragma CONST_SEG MYCONST const unsigned int my_const_var = 0xCCDD; #pragma CONST_SEG DEFAULT   After build, we will see only 0xCCDD in this area in generated s19 file: S1050870CCDDD9   1.2  use FILL command to fill unused area of MYCONST_ROM With FILL command we can fill unused area of a section.  Add “FILL 0xAA” : MYCONST_ROM       =  READ_ONLY 0x0870 TO 0x08FF FILL 0XAA;   Rebuild the project. we will see the rest of the field of MYCONST_ROM  is filled in  S19 file: S1230870CCDDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACF S1230890AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA04 S12308B0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE4 S12308D0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC4 S11308F0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA54 2. CW for kinetis GNU compiler: 2.1 . No fill() command involed. Define segment in MEMORY section: my_section    (rx) : ORIGIN = 0X00000800, LENGTH = 0x20   define output  SECTION: .myData : {     . = ALIGN(4);           KEEP(*(.myData))     . = ALIGN(4); }> my_section In C code, define const variable “my_const” (0xCCCCDDDD) const int my_const __attribute__((section(".myData"))) = 0xCCCCDDDD;   After build, we will see only 0xCCCCDDDD in this area in generated s19 file: S1070800DDDDCCCC9E 2.2 Use FILL(0xaa)  command to fill unused area of my_section with 0xAA. Here is the modified code in ld file, I highlight the code I add: .myData : {        . = ALIGN(4);                   KEEP(*(.myData))     . = ALIGN(4);     FILL(0xaa)     . = ORIGIN(my_section) + LENGTH(my_section) ;   }> my_section Rebuild the project. we will see the rest of the field of my_section is filled with 0xAA in  S19 file: S1130800DDDDCCCCAAAAAAAAAAAAAAAAAAAAAAAA9A S1130810AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA34
View full article
Interrupt technology is an important method to improve the efficiency of real-time CPU. In Kinetis, interrupt vector table is allocated in lowest ROM address of whole memory.   However in some application, we need move vector table to other address. A typical usage is developing boot loader code. The boot loader code occupies the first region of the FLASH memory (the lowest memory address space starting from 0x0000000). This placement moves at the beginning of the available memory space and it is necessary to shift this address in the user application.   The CM0+ and CM4 core adds support for a programmable Vector Table Offset Register (VTOR) to relocate the exception vector table, which is not existing in Freescale 8/16bit MCU. This device supports booting from internal flash and RAM. Kinetis supports booting from internal flash with the reset vectors located at addresses 0x0 (initial SP_main), 0x4 (initial PC), and RAM with relocating the exception vector table to RAM.   for detail, see attached document and demo project made under CW10.6, and KDS
View full article
The CodeWarrior C and C++ compilers use the Embedded Warrior Library (EWL) for C to provide and extend the libraries documented in the ISO/IEC standards for C. EWL C also offers facilities described in the POSIX specification and some common application programming iwnterfaces (APIs) from UNIX operating systems.   Intrinsic functions generate in-line assembly code instead of making a call to a library function. Intrinsic functions generate less object code and perform faster than their regular counterparts. In some cases these functions generate just a single assembly instruction.Get the EWL for C   n o w !   For the EWL C++ reference libraries you can also find:   The EWL C++ Library Overview of thismanual describes the language support library that provides components that are required by certain parts of the C++ language, such as memory allocation and exception processing.   “LanguageSupport Library” discusses the ANSI/ISO language support library.   Diagnostics Library elaborates on the diagnostics library that provides a consistent framework for reporting errorsina C++ program, including predefined exception classes.   General Utilities Libraries discusses the general utilities library, which includes components used by other library elements, such as predefined storage allocator for dynamic storage management.   Strings Library discusses the strings components provided for manipulating text represented as sequences of type char, sequences of typewchar_t, or sequences of any other “character-like” type.   ...and so on! Find out what the rest of the libraries have got to give you to improve and update CodeWarrior tools! Check out the manual here!
View full article
This post will step by step show how to report a software  defect or problem to NXP support team. Please take a few minutes to read it. This will help us investigate the issue more efficiently and quickly. Basically we need prepare:      1. Your IDE version: - If you use classic version: Start the IDE and click on Help | About Freescale CodeWarrior. Click on Installed Products. Save all info displayed into a txt file. - If you use eclipse version: Start the IDE and click on Help | About CodeWarrior Development Studio or About Kinetis Design Studio. Save the version and build id. 2. Demo Code: - Create a demo project to show the problem.  Then send the entire sample code folder in zip format. - If the problem is in NXP SW package, for example SDK package, please provide the SW version or download link.      3. Mention how to reproduce the problem step by step with the demo code.      4. Error screenshot.     Steps of submitting the case: 1. Go to Sales and Support page, click on Hardware & Software for Submit new ticket: http://www.nxp.com/support/sales-and-support:SUPPORTHOME    2. Then click on “Add a new case”   3. Fill the New Case form. Here is an example:                                                         
View full article
CodeWarrior Development Studio for HCS12(X) Microcontrollers (Classic IDE) v5.2 has been released for several months.   Recently, since v5.2 release, I have received many questions from customers. These questions are almost similar: how to add the missing devices back to my CodeWarrior v5.2 ?   From my side I think there is one workaround if a specific device has a service pack. For detail, please see attached document.
View full article
This document describes the steps required for U-Boot debugging using the CodeWarrior IDE for low-end and high-end Power Architecture CPU, from NOR, NAND, SPI and SD card flash devices.
View full article
Processor Expert offers static code which allows choosing standalone mode and linked mode for each project. You can select either linked mode or standalone mode for static code during project creation. But what if you want to change mode for a created project? With the below steps you can learn how to convert a project from linked mode to standalone mode in CodeWarrior v10.6.   1. From the original linked mode PEx project, remove the “static_code” folder. 2. Close the project in CW10.6. Navigate to the top folder of the project, then open the ProcessorExpert.pe file using text editor software, for example, windows notepad. 3. Seach the key world “LINKED” in the ProcessorExpert.pe file. Replace the line <ProjectStaticFilesGenerationMode>LINKED</ProjectStaticFilesGenerationMode> with <ProjectStaticFilesGenerationMode>STANDALONE</ProjectStaticFilesGenerationMode>   4. Remove the .ProcessorExpert.g_c file and .ProcessorExpert.g_x file under the top folder of the project. 5. Then re-open the project in CW10.6. Click “Generate PEx Code” button from Pex components view.   You will see a “static files track changes” dialog pop up. Click OK, PEx will create static files under the project folder. 6. You will see that IO_Map, PDD and System files have been generated under Static_Code folder.   Unfortunately PEx doesn’t generate Peripherals files automatically. So you need copy the Peripherals files to the project manually. For dsc 56F82748 MCU in this case, the peripherals static files are located under the “C:\Freescale\CW MCU v10.6\MCU\ProcessorExpert\lib\56800\pdd2\MC56F82748VLH\perihperals” folder on my machine. You can simply drag and drop the folder to the project.     Then select “Copy files and folders” option and click “OK”.     7. Now you can see that the static files are placed under the project folder now. You can verify this by checking if there is an arrow mark on the static file icons. Alternatively, you can also check by right clicking on a static file and then click “Show In Windows Explorer” item from the context menu. The stitic files should be located under the project folder.   With above tricks, you can also convert a project from standalone mode to linked mode easily.
View full article
Scanboard is a tcl proc within the IDcode.tcl script that can be used as a quick sanity check for basic JTAG connectivity. This routine will return the JTAG ID codes for devices on the scanchain and if they are known Freescale devices (at the time the script was last updated) the core indexes will also be displayed for CodeWarrior project configuration. IDcode.tcl is included automatically during the CodeWarrior installation but updates may be available.   This script is executed within the CodeWarrior Connection Server (CCS) and not the CodeWarrior IDE itself where ccs is the conduit that the CodeWarrior Debugger talks to the TAP hardware. CCS can also be used standalone but this is not a supported mode and the use of it is not documented.   On a windows machine start ccs via the Start menu for the CodeWarrior installation you wish to use.   i.e. Start → All Programs → Freescale CodeWarrior →CW for Power Architecture v10.2.1→ CodeWarrior Connection Server   CCS starts iconized in the task bar so double click on the icon to display the ccs console window   On a Linux machine start ccs manually via the ccs executable location within the CodeWarrior installation directory ($CW_INSTALLDIR)/PA/ccs/bin/ccs   i.e. /usr/local/Freescale/CodeWarrior_PA_10.2.1/PA/ccs/bin/ccs Once the CCS console is available the IDcode.tcl file must be brought into the tcl environment via the source command. Beware that on a Linux system the file name is case sensitive.   % source IDcode.tcl   The script will automatically query the host system to determine if there are any available CodeWarriorTAP or USBTAP devices connected via USB which can be used for a remote connection. Specify the connection option that is attached to the target system. For example to configure the connection to be a CodeWarriorTAP on the network select 2 and then enter the IP address or the CodeWarriorTAP name if it is in the host table or can be found within the DNS tables.   It is also possible to predefine custom remote connections via the DefinedCCSConnections.tcl located within the …/ccs/bin directory as well. See this file for details. Once the remote connection has been specified the script will the automatically execute the scanboard proc and attempt to read back the IDcode(s) available on the JTAG scanchain.     In this example the CodeWarriorTAP is connected to a system that has a T4240 processor and displays the IDcode for this device. If there had been multiple processors available on the scan chain each device would have been identified and displayed.
View full article
Sometimes we don't use external debugger but OpenSDA on-board . The debugger controller clock setting need more attention because of slow debug by OpenSDA on-board. if you set the bus clock too high to make step by OpenSDA. The Non error will report at the stage of download(Fig2) and pause, even stop(Fig1). Fig 1  Pause and stop error  Fig 1  Download error  when you encounter. you can set debugger follow some steps. 1 open debug configurations-Target setting-Edit... 2 In Edit you need remove the selection of 'use bus clock as debug controller clock source ' and then reopen the CW and project debug fine works. Enjoy!
View full article
Some customers often ask where or how to download previous version CodeWarrior(CW), for example the CW for HCS12Z(X) v5.1, the CW for MCUs v10.5 or some patch packages. It is really hard to find sometimes. So I write this document to introduce how to download them step by step. Also we can refer to this process  to download other old version for Kinetis Design Studio(KDS). This DOC mainly includes two parts: - How to Download Previous Version CodeWarrior: -  How to Download Patch for  CodeWarrior: About the detail steps please check the attachment. BR Alice
View full article
This document explains how to use the Flash Tool Kit to support additional flash devices on the Flash Programmer for CodeWarrior Development Studio for Microcontrollers V10.0 by creating new programming algorithms and support files.   This application note applies only to the external flash devices used with ColdFire V2/V3/V4 processors.     This document includes these topics.   • Create a flash device XML configuration file • Create new target task • Create external flash algorithm • Flash programmer examples • Create new flash utility • Flash utility examples • Troubleshooting flash programmer   The application note we are here suggesting provides you the necessary info to add devices to the FreescaleCodeWarrior Flash Programmer, along with some specifications that might be really useful depending on each CPU setup and the files and documentation that is required.   Many manufacturers use the same flash device algorithms, so it is likely that flashes can be programmed using the algorithms included with the CodeWarrior software. In addition, many manufacturers produce devices compatible with those of Intel, Advanced Micro Devices (AMD), or STMicroelectronics (ST).   Anyways, enjoy and keep finding interesting content with DebuggerGuys!   Adding Device(s) to CodeWarrior Flash Programmer for Microcontrollers V10.0
View full article
This is a test for 56F800EX new additional 32bit multiplication instructions on CodeWarrior V10.3/V10.5/V10.6.
View full article
This Quick Start explains how to install service pack updater archive for your CodeWarrior software running on the Windows or Linux platform.   Support for new devices and/or updates can be added to the CodeWarrior Development Studio for Microcontrollers v10.x (CW MCU10.1) directly from the Internet (Online mode) or from a downloaded archive (Offline mode).   This document describes both the Offline and Online modes of updating CodeWarrior MCU v10.1 and a troubleshooting update. These instructions will show you how to manipulate that list to ensure that you can focus on the right URL for the CodeWarrior tools update.The topics covered in this document are:   • Updating Online: Lists the steps required to complete the update when you are connected to the Internet.   • Troubleshooting Updates:  Lists the troubleshooting updates.   • Updating Offline: Lists the steps required to complete the update when you are not connected to the Internet.   Start catching up with this updater archive!
View full article
I am working on a project in which I decided to use ColdFire Architectures , but within the classical view of CW. Luckily, there is another version of this document in which the conversion of ColdFire projects to CW Development Studio is also shown in a brief and easy way!   It can be read in the introductory part of the document: "This application note explains how to convert a ColdFire project created in CodeWarrior Development Studio for Microcontrollers V6.2 or CodeWarrior Development Studio for ColdFire Architectures V7.1 to CodeWarrior Development Studio for Microcontrollers V10.0."   I'll admit it was a thrill finding this document, I hope it is of great help for you as it was for me! And if you're not into CodeWarrior development tools, I don't know what you're waiting for!   Converting ColdFire Projects to CodeWarrior Development Studio for Microcontrollers V10.0  
View full article