CodeWarrior Development Tools Knowledge Base

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

CodeWarrior Development Tools Knowledge Base

Labels
  • General 75

Discussions

Sort by:
Greetings, The third update for CodeWarrior for MCU V10.6 is available. This update includes the previous 1.0.0 and 2.0.0 updates, and applies to CodeWarrior for MCU v10.6 only. New device support: •             S12Z: S12ZVC96, S12ZVCA128, S12ZVCA192, S12ZVCA64, S12ZVCA96 •             DSC: MWCT1012, MWCT1212, MWCT1111 Updated support for silicon revisions: •             Kinetis K Series: K11DN512A,  K11DX128A, K11DX256A, K21DN512A, K21DX128A, K21DX256A, K21FN1M0A, K21FX512A See attached release notes for further details.   There are two ways of installation: Offline or Online. Offline installation is recommended as the size of the installation files is up to 900 MB (depending on the installed architectures).   Offline Installation: Go to https://www.freescale.com/cwmcu10 Click on the 'Downloads' tab and select the product download: Select 10.6: Download the Update 3: From CodeWarrior for MCU10.6, select the menu Help > Install new Software and select the downloaded archive file: Check the MCU 10.6 Updates and go through the installation with 'Next >' button. Restart Eclipse as prompted.   Online Installation In CodeWarrior, use the menu Help > Install New Software Use the following Eclipse update site: http://freescale.com/lgfiles/updates/Eclipse/MCU10_6/com.freescale.mcu.updatesite Install the update Restart CodeWarrior as prompted   Full release notes are attached to this document.
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
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
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
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
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
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
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
From your perspective, a CodeWarrior compiler is a single program. Internally, however, a CodeWarrior compiler has two parts: • The front-end, shared by all CodeWarrior compilers, translates human-readable source code into a platform-independent intermediate representation of the program being compiled • The back-end, customized to generate software for a target platform, converts the intermediate representation into object code containing data and native instructions for the target processor A CodeWarrior compiler coordinates its front-end and back-end to translate source code into object code in several steps: • Configure settings requested from the compiler to the CodeWarrior IDE or passed to the linker from the command-line • Translate human-readable source code into an intermediate representation • Optionally output symbolic debugging information • Optimize the intermediate representation • Convert the intermediate representation to native object code • Optimize the native object code • Output the native, optimized object code   A linker combines and arranges the object code in libraries and object code generated by compilers and assemblers into a single file or image, ready to execute on the target platform. The CodeWarrior linker builds an executable image in several steps: • Configure settings requested from the linker to the CodeWarrior IDE or passed to the linker from the command-line • Read settings from a linker control file • Read object code • Search for and ignore unused objects (“deadstripping”) • Build and output the executable file • Optionally output a map file   You might think these are real hard to cambine and put together to get something to work. If you do think that, it's easier than it looks! I found this reference manual at Freescale web page describing how to use the CodeWarrior compiler and linker tools to build software.   As a little introduction, let me explain that CodeWarrior build tools are programs that translate source code into object code then organize that object code to create a program that is ready to execute; CodeWarrior often run on a different platform than the programs they generate, meaning, not the host platform but the target platform. The linker now comes into our lives to pull our code off! Great isn't it? Come on, take a look at it! CodeWarrior build Tools reference
View full article
Standalone Programming is widely used when user doesn’t need a debugger for programming in CodeWarrior 10. Thus people only uses elf/s19 file to program target without using project and source files. There is a very famous article written by Erich Styger regarding using “Flash File to Target” as a standalone programmer for target programming. https://mcuoneclipse.com/2012/08/02/standalone-flash-programmer/   Besides this method, Flash Programmer Task is also good for standalone programming.  As I know some customers prefer to use this method because it can also do checksum, dump flash,etc during programming. I will introduce how to utilize Flash Programmer Task step by step in the following for brainstorming. This article is based on CodeWarrior 10.6.4 and FRDM-K64 board, but the method is same for all Kinetis,HCS08,HCS12Z,etc devices   For detail, see attached article and video.
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
  Today I woke up with the inquiry-ish mood, so I would like to make you some questions, dear reader...ready?   So, you've been working on CodeWarrior Development Tools? Nice! I've become really close with this developing tool due to the major benefits that it's portfolio brings to the developers' community.   Have you experienced any trouble finding .bins or actualizing updates manually? If the answer is "yes", well, me too! Sometimes it's kinda difficult getting to know IDEs completely or finding out all the features that are contained within them.   Did you know that CodeWarrior can be turned into a more graphical coding environment? If the answer is "no", let me tell you there is a way! And a pretty easy one...   If I told you CodeWarrior and Eclipse get together to empower developing tasks...? Yes indeed, they can be merged and they'd easy things up!   Why would I like to merge CodeWarrior and Eclipse features? Basicly, because the classical IDE provided by CodeWarrior turns out to be very manual when it comes to updates; besides, whenever you decide to search for an update, you must sync it and organize it all by yourself...and I know it might not be that hard, but it's not funny when you end up with tons of versions for each update.   The marvellous thing of working with CodeWarrior inside Eclipse IDE is that the graphical environment makes it way easier and friendlier for you, for us developers, and there is no need to search for updates or even trying to get the code segments when working with Processor Expert, for example, it is all viasually arranged and set for you to just have a blast programming.   This time I'll attach the Quick Starts of the CodeWarrior Project Importer, where you can find all the info you need to start using CodeWarrior tools from Eclipse IDE.   Amazing thing, have fun!
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
Working with ColdFire Architectures for CodeWarrior is really simple and very useful. One little problem that many people has run into, is the relocation of code and data within the MCUs that are being used.   Maybe this will help those who have that issue, the Document I recently found explains the solution I now present.   It provides guidance for relocating code and data within the Microcontroller memory map. It also explains how to create new memory segments and sections by editing the CodeWarrior Linker Command File (LCF) for ColdFire Architectures.   The Linker Command File (LCF) along with other compiler directives, places pieces of code and data into RAM and ROM. You can do this by creating specific sections in the LCF and then matching them to the source code using pragma directives.   Other than making a program file from your project's object files, the linker has several extended functions for manipulating program code in different ways. You can access these functions through commands in the linker command file (LCF).   Linker command files consist of three kinds of segments, which must be in this order: • A memory segment, which begins with the MEMORY{} directive, • An optional closure segment, which begins with the FORCE_ACTIVE{}, KEEP_SECTION{}, or REF_INCLUDE{} directives, and • A sections segment, which begins with the SECTIONS{} directive.   LCF only gets more interesting, so get the Document read now!
View full article
The following is a list of our documents in regards to developing MCU on CodeWarrior platform.   If you need to log an issue in Case System,  or obtain a license for your CodeWarrior product, please refer to:  How to log an issue in Case system instead CRM (Service request - not used anymore)?   1.  CodeWarrior Common Feature   1.1 Reversion Release History CodeWarrior for MCU V10.6 Update 3.0.0 available New CodeWarrior for MCU v10.6.4 available CodeWarrior v10.6.4 Update 5 available   1.2 IDE and Installation How install (or check availability) patch and update under Eclipse ? How to solve “IDE failed to start …” message - Classic version on Windows OS (most of the time 64 bit as Win 7 or Win 8.1)   1.3 Project Management Convert a Processor Expert project from linked mode to standalone mode   1.4 Build Tool Chain (Assembler, Compiler, Linker) Linking and compiling with CodeWarrior Classic - How to use dashboard (Jenkins) to build a CodeWarrior project?   2. CodeWarrior for Kinetis   2.1 Board Bring-up  How to work KV10 with CW10.5   2.2 RTOS  MQX applications...new at this, too?~   2.3 Build Tool Chain (Assembler, Compiler, Linker) How to fill unused memory for CW for 8/16bit and kinetis Gnu. Interrupt Vector Redirection Method in Kinetis Relocating Code and Data Using the CW GCC Linker File for Kinetis Relocate Code (configuration linker files) - CW10.6 - Kinetis Extended inline assembly with GCC in CodeWarrior   2.4 Programmer and Debugger Preserve Memory Ranges In CodeWarrior v10.6   3. CodeWarrior for MPC5xxx   3.1 Build Tool Chain (Assembler, Compiler, Linker) Generate CRC value for MPC56xx in CodeWarrior for MCU v10.6.4   3.2 Programmer and Debugger Debug code using CodeWarrior 10.5 Flash two .elf files using CodeWarrior 10.6   4. CodeWarrior for DSC   4.1 Project Management How to migrate PE project from Classic CodeWarrior to Eclipse CodeWarrior How to solve PE bean migration for 56F84xxx in CodeWarrior V10.3   4.2 Build Tool Chain (Assembler, Compiler, Linker) To use 56F800EX new additional 32bit multiplication instructions on CodeWarrior V10.3/V10.5/V10.6.   4.3 Programmer and Debugger Workaround for programming 56F8323 in CodeWarrior v10.6 debugger   4.4 External Tool Integration Integrate Quick Start 2.6 for DSC with CodeWarrior 10.6.4 Using TWR-56f8400 board with FreeMASTER via USBTAP interface   5. CodeWarrior for Coldfire   5.1 Build Tool Chain (Assembler, Compiler, Linker) Relocating code with CodeWarrior CodeWarrior and ColdFire get optimized!   5.2 Programmer and Debugger Problem with Multilink Rev C  - not running after MCU V10.6 Update3 installed & CW for MCF V7.2   6. CodeWarrior for 8/16bit MCU   6.1 IDE and Installation CW MCU v10.5 for 8bit MCU Banked Memory Patch Installation   6.2 Build Tool Chain (Assembler, Compiler, Linker) Classic - Is it possible (How) to use HCS12 on Eclipse? How to fill unused memory for CW for 8/16bit and kinetis Gnu.
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
This reference manual describes the contents of the Embedded Warrior Library for C++. The C++ Standard library provides an extensible framework, and contains components for: language support, diagnostics, general utilities, strings, locales, containers, iterators, algorithms, numerics, and input/output. Additionally, EWL C++ offers extra facilities forinput/output, threads, and other components. Libraries included within this reference manual are:   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.   Localization Library covers the localization components extend internationalization support for character classification, numeric, monetary, anddate/time formatting and parsing among other things. EWL_Utility utilities used for non standard headers.   Overview of EWL C++ Debug Mode describes the Embedded Warrior Library for C++  debug mode facilities.   Hash Libraries describes nonstandard “hash” libraries.   Metrowerks::threads is a reference to threads support in the Embedded WARRIOR  Libraries.   EWL std::tr1 is a reference about items that are proposed for inclusion in the Embedded Warrior Library   C++ Switches, Flags and Defines is a chapter on the various flags that you can use to create a customized version of the EWL C++ Library ...and many more resourceful subjects are contained!   Get ready to update your CodeWarrior Development Tools for EWL C++ programming! View manual here!
View full article
How to log an issue in Case system instead CRM (Service request)?     After the merge of Freescale and NXP, technical support cases are answered in a different system. To submit your case into the new system, please follow below steps:    1) Go to http://www.nxp.com/support/sales-and-support:SUPPORTHOME.    2) On the bottom of the page under Submit New Issues, click Hardware & Software.    3) Register with your business email to access NXP technical online support.    4) A verification email will be sent to your account. Click the link embedded in that email to verify your access.    5) On the NXP online support page, select Contact Support from the top menu and click “submit a new case” to start the process.   Attached you will find a video explaining the process to follow.
View full article