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:
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
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
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
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
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
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
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
Recently I have two customers asking me same questions – How to use S12Z Burner under CW10 for S12Z. Unlikely CW10 for S08, S12Z build process does not use the Burner to generate S-Record file. By default, after a successfully build, S12Z build tool chain generates elf file only. The Burner panel has remained as part of the S12Z properties since the build tools configuration panels were imported from S08 build tools. Thus even users configure it, it doesn’t generate bbl file and s19/hex/bin files. Fortunately we have workaround to integrate burner tool into CodeWarrior10 post build steps. doc and demo code is attached. We can also refer article from Erich. S-Record, Intel Hex and Binary Files | MCU on Eclipse 
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
Recently we helped a customer resolve a question related with “asm_enhance”command line option usage. It’s strange there is no documentation of this knowledge in CodeWarrior help manual. After many discussions with development team, it gets clear to me. So I wrote an article on this topic for sharing.   “ -asm_enhance” option is added in ColdWarrior10 /CodeWarrior11 “compiler setting”, “General”, “Other Flags”:   "-asm_enhance" command line option can be used for two distinct aspects: Enabling inline assembly data optimizations Enabling stack effect computation through inline assembly code. These two aspects were all gathered under the same option because they both are referring to enhanced inline assembly – i.e. inline assembly code that gets handled almost as C code). Thank for the great support from Bogdan Ditu . For more information on -asm_enhance, see attached document.
View full article