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:
How to use error directive in codewarrior version 10.6 as i am facing problem which is able to see in  attached sheet
View full article
This document shows a general way how to preserve memory range using target task in CW10.6.   I am using k64 freedom board and Segger J-link in my project as an example. K64 freedom board use MK64FN1M0 MCU which has 1 M size flash.  In my project I divide the flash into two areas in the link file as below:   /* Specify the memory areas */ MEMORY { m_interrupts       (rx) : ORIGIN = 0x00000000, LENGTH = 0x198 m_cfmprotrom       (rx) : ORIGIN = 0x00000400, LENGTH = 0x10 m_text             (rx) : ORIGIN = 0x00000800, LENGTH = 512K m_text2            (rx) : ORIGIN = 0x00080800, LENGTH = 512K - 0x800 m_data         (rwx) : ORIGIN = 0x1FFF0000, LENGTH = 64K                  /* Lower SRAM */ m_data2        (rwx) : ORIGIN = 0x20000000, LENGTH = 192K                 /* Upper SRAM */ } m_text2 is the memory area that I am trying to keep it from being erased while downloading the application to m_text memory area. Here are the steps to do this using target task in CW10.6. Add a target task view by clicking Window -> Show View -> other from menu bar, then select Debug -> Target Tasks view in the popup window. From the Target Tasks view, select “Import” from the context menu. Then select the flash (.xml) file for your target device. In this case I need to select MK64FN1M0.xml file. After that you will see a “MK64FN1M0” task in the list. Double click the task name, you will see there are two actions (“Erase” and “Program and Verify”) in the “Flash Programmer Actions” view.   The default Erase action will mass erase all flash, so I remove this action by unchecking the “Erase” action. I can add erase action in “Program and Verify” action later. Double click the “Program and Verify” action. In the popup dialog, check “Erase sectors before program” option. Check “Restrict to Addresses in this Range” option, and then specify the address range you want to program. The data/code out of this range will be preserved (will not be erased or changed). Click “Update Program Action” button to update the settings of this action. Move to Debug configurations window by clicking Run -> Debug configurations from Menu bar. Select a debug configuration, in this case I select the run configuration for Segger J-Link. Select Download tab which is under Debugger tab. By default, Standard Download will be executed and all the flash will be erased. As I am going to execute target task in this case, so uncheck “Perform Standard Download” and then check “Execute Tasks”. Click “Add” button to add a task. In this case I add K64F1M0M12 task which I created in previous step in target task view. Click “Debug” button, the application will be downloaded to flash but preserved area which was not specified in restrict flash range will not be erased. You can check this from memory view.   With the above steps, you can preserve a specified flash range while downloading application. I am using Segger J-link in my project as an example and the steps also work for other tools like P&E Multilink and USB Tap.
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
The content is to tell user how to add nand flash(MT29F2G08ABBDA) support in CW 10.3.
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
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 is a test for 56F800EX new additional 32bit multiplication instructions on CodeWarrior V10.3/V10.5/V10.6.
View full article
How to install and use eGit plug-in in CodeWarrior
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 MCU 10.5 for Kinetis KV10   To setup your CodeWarrior development environment for Kinetis KV10 applications. Read the documents attached for download and installation instructions. Download and install the CW MCU v10.5  product, patch and service pack in the order specified:   Evaluation: CodeWarrior for Microcontrollers 10.5 (Eclipse, Offline) CW MCU v10.5 PEx MQX Lite Update 1.0.1 CW MCU v10.5 Kinetis KV10 75MHz Service Pack   the updates were just posted on the following URLs: http://www.freescale.com/webapp/sps/site/overview.jsp?code=CW_UPDATES_MCU_10_5
View full article
T1040 is new to all the customers. The ecosystem is still not mature in this moment in Jan'2014 The note is for someone who is using Codewarrior PA10.3.3 for T1040 platform board bring up or debugging on this moment. if you have problem to connect T1040 platform with Codewarrior, the document might help you.
View full article
Detailed analysis report, done by Micetek (Freescale subcontractor that manufactures USB TAPs), following incidents where Rev F USB TAP/COP units were failing.
View full article
If you would like to migrate a project which is created by classic CW to eclipse CW, this file illustrates one of the ways to import PE beans to eclipse IDE manually. Test environment: 56F8037 in CW for DSC V8.3, CW for MCU V10.3, CW for MCU V10.4.
View full article
Another attachment in thead
View full article
I just download FNET2.5.0, it can't debug it by CW10.4, it comes error message when I start debug "Could not open memory configuration file".   The CW10.4 works for other examples project.   Why?   Regards Sam
View full article