Processor Expert Software Knowledge Base

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

Processor Expert Software Knowledge Base

Discussions

Sort by:
The processor (CPU) component is automatically inserted to Processor Expert project at the time of its creation. It generates a code needed for very basic operation of the CPU and also a common initialization code for resources shared among the peripherals (like interrupt vectors table, clock control etc.). Clock settings The processor component is initially set to use no external clock sources (for example, crystal) and only one clock configuration is created. To adjust clock settings, use Component Inspector view to modify the properties in Clock settings and Clock configurations groups. Processor Expert instantly checks the timing of the whole project so the errors are reported if the timing settings are in conflict or cannot be reached. External bus and memory The processor component is initially set to use no external bus and only internal memory. To enable and configure external bus, use the Component Inspector view to modify the properties within the group External bus. The placement of individual data or code sections within the address space can be configured on the Build options tab of the Component Inspector. Importing Board Configuration The settings for the CPU can be imported from the file. If you are using standard Freescale board configurations, select the command File > Import… Then select Processor Expert / Apply Board Configuration. In the dialog that appears click Browse… button and look for a file with extension .peb at <CWInstallDir>\MCU\Processor_Expert\BoardConfigurations\<processor family>\<board name>\<module>. If your board is not available within the CodeWarrior installation, you can import the settings from other already configured project. In such case use the command File > Import… and then select Processor Expert / Component Settings to Project.
View full article
Select the Help > Cheat sheets… from the CodeWarrior menu.   Unfold the CodeWarrior Processor Expert Features and select Processor Expert Basics for CodeWarrior for MCUs. Click OK. Click the Go to Creating Project link in the Processor Expert Basics and follow the shown steps.
View full article
Timeout Description Generic timout driver which allows to timeout an operation. Component Timeout.PEupd Dependencies FreeRTOS License License : Open Source (LGPL) Copyright : (c) Copyright Erich Styger, 2011, all right reserved. This an open source software implementing timeout routines using Processor Expert. This is a free software and is opened for education, research and commercial developments under license policy of following terms: * This is a free software and there is NO WARRANTY. * No restriction on use. You can use, modify and redistribute it for personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY. * Redistributions of source code must retain the above copyright notice.
View full article
This document describes the creation of the Low power demo application (Low power demo application on FRDM-KL03Z board ) in KDS 2.0.0  with latest version of KSDK 1.1.0. It is an update of the previous document because the KSDK 1.1.0 implementation brings new features that makes design of a low power demo application more complicated. This document describes the creation of the following low power demo application: When the application starts the green LED blink one time, The RTC device  alarm is set to 15 second  (external oscillator 32768Hz is used) to wakeup CPU and the CPU enters the VLLS1 mode (VLLS0 mode cannot be used with external oscillator).  The CPU wake up is possible by the following ways: - When you push the SW2 button the processor is woken and the green LED start blinking (5 times). - When you short the pin PTB6 to ground 5 times (the pin is available on the 8 pin header connector – pin number 4; you can for example connect a button to the pin number 4 and ground) the processor is woken and the green LED start blinking (5 times). - When selected RTC timeout expired (15 seconds) the processor is woken by the alarm interrupt and the green LED start blinking (5 times). The application is initialized again and recovery from the VLLS1 mode is executed. The alarm is set again to 15 second and the CPU enters the VLLS1 mode again. Preparation First of all the KDS 2.0.0 and KSDK 1.1.0 must be installed. You can find instructions in the document  How to install Kinetis SDK 1.1.0 support in KDS 2.0.0. New project When you properly install and update all the software you are prepared to create the Low power demo application. Create a new Kinetis design Studio project: Select the FRDM-KL03Z board Select the Kinetis SDK path to the KSDK 1.1.0 and select Processor Expert The application is created and there are not any warnings reported in the Problems window. But there is another issue. The fsl_os_abstraction component in the OSs group is added into application (it was not in the KSDK 1.0.0) and it allocated LPTMR device in the inherited fsl_lptmr_hal  component: The only solution of this conflict is removal of this component (the low power demo needn’t any OS; it is a simple application only). But this component is used by fsl_clock_manager and the fsl_clock_manager is used by PinSettings componnet. So you must remove all these component ( fsl_os_abstraction, fsl_clock_manager, PinSettings). When the PinSettings is removed from the project all signal names are also removed and you must select pins in the Cpu component again: The PinSettings component must be replaced by Init_GPIO component that allows settings of GPIO pins including routing and electrical properties. Add the Init_GPIO component into the project and set following properties (switch to Advance view): Select Device - GPIOB Set Settings/Clock Gate to Enabled. Set Settings/Pin 0 group to Initialize and select following properties of this pin (LLWU_P4): Pin Direction – Input Pull resistor – Enabled Pull selection  - Pull Up Set Settings/Pin 6 group to Initialize and select following properties of this pin (LPTMR_ALT3): Pin Direction – Input Pull resistor – Enabled Pull selection  - Pull Up Set Settings/Pin 11 group to Initialize and select following properties of this pin (PTB11 – GREEN LED): Pin Direction – Output Output value  – 1 Set Pin selection/routing/Pin 11 to Enabled. The Pin 11 group is open and the PTB11 is selected as the Pin (GPIO functionality). These settings provide initialization code for routing of selected pins and also GPIO functionality for PTB11 that used for driving of the green LED of the RGB LED on the freedom board. There is also necessary to change the linker settings when you have installed the new version of GCC tools (according to the document How to install Kinetis SDK 1.1.0 support in KDS 2.0.0 - Additional Steps for Kinetis L family chapter) Open the context menu of the project, select Properties item and change the Other linker flags settings to “-specs=nano.specs -specs=nosys.specs”, in C/C++ Build / Settings,  Tools Settigns tab, Cross ARM C++ Linker/Miscellaneous: Tip: If you want to know details of compiled code and the code size, you can use the following options to create extended list file and print code size info on the following Toolchains tab: You can generate Processor Expert code and process Build of the application without any error and warning. When the Build is finished the following information is provided in the Console window: 'Invoking: Cross ARM GNU Create Listing' arm-none-eabi-objdump --source --all-headers --demangle --line-numbers --wide "Low power demo KL03.elf" > "Low power demo KL03.lst" 'Finished building: Low power demo KL03.lst' ' ' 'Invoking: Cross ARM GNU Print Size' arm-none-eabi-size --format=berkeley "Low power demo KL03.elf" text         data          bss          dec          hex      filename 1480          108          876         2464          9a0      Low power demo KL03.elf 'Finished building: Low power demo KL03.siz' ' ' Note: You can see that the memory footprint is quite small because all SDK component are removed. Routing of pins Routing of pins is provided by Init_GPIO and other components in the project. There will be used following pins: SW2 - ADC0_SE9/PTB0/IRQ_5/LLWU_P4/EXTRG_IN/SPI0_SCK/I2C0_SCL – input pin for the SW2 button on the board as LLWU wakeup pin GPIO pin – PTB6/IRQ_2/LPTMR0_ALT3/TPM1_CH1/TPM1_CLKIN1 – input pin of LPTMR device LED_GREEN - PTB11/TPM0_CH0/SPI0_MISO - output pin that driver the green LED of the RGB LED on the board Adding Processor Expert components Now you can add all components for the low power demo application. fsl_gpio_hal to control GPIO pins Init_LLWU and fsl_llwu_hal components to control LLWU device Init_SRTC and fsl_rtc_hal to control RTC device Init_LPTMR and fsl_lptmr_hal to control LPTMR device fsl_smc_hal to control SMC (System Mode Controller) device CPU device We are going to use external oscillator 32768Hz and we need to configure device to allow Very Low Leakage Stop modes. There we set following properties in the Component Inspector of the CPU (switch to Advance view): Check that the Clock settings/Clock Sources/System oscillator 0 is Enabled and set Enable in stop to Enabled. The Clock source, clock pins and clock frequency are preset for the FRDM-KL03Z board Go to the Clock configuration/Clock Configuration 0 and set: Internal reference clock/Slow IRC frequency to 2MHz (it is enough for our demo application and it also decrease power consumption). MCG lite settings/MCG mode set to LIRC_2M Very low power mode to Enabled (leave setting of VLP mode entry to User because the VLLS1 mode is entered after blinking; we will write the code to enter VLLS1 mode) System clocks/Core clock set to 0.5Mhz System clocks/Bus clock set to 0.5Mhz (it allow us to enter very low leakage stop modes) Set Low Power mode setings/Acknowledge isolation to Not allowed value (we will do it in the user code) GPIO pins Open the Component Inspector of fsl_gpio_hal componet, switch to Advance view and set following properties: Select Device - GPIOB LLWU (Low-Leakage Wakeup unit) device Open the Component Inspector of Init_LLWU, switch to Advance view and set following properties: Set Settings/External Source/Pin 4 to Any edge value (we will use this pin that is connected to SW2 button) Set Pins/Pin 4 to Enabled and select  the Pin ADC0_SE9/PTB0/IRQ_5/LLWU_P4/EXTRG_IN/SPI0_SCK/I2C0_SCL in the item below Set Initialization/Utilize after reset values to no We will use the LLWU to wake-up the CPU and we need not any interrupt. RTC (Real Time Clock) device Open the Component Inspector of Init_SRTC, switch to Advance view and set following properties: Set Settings/Clock gate to Enabled Set Settings/Oscillator settings/Oscillator state to Enabled (it enable external oscillator also in stop modes) Set Settings/Time settings/Alarm time [s] to 15 (15 seconds timeout to wake-up from VLLS1 mode) Set Interrupts/ RTC interrupt/Interrupt request to Enabled Set Interrupts/ RTC interrupt/Time overflow interrupt to Disabled Set Interrupts/ RTC interrupt/Time invalid interrupt to Disabled Set Initialization/Time counter to Enabled Set Initialization/Utilize after reset values to no LPTMR (Low-Power Timer) device Open the Component Inspector of Init_LPTMR, switch to Advance view and set following properties: Set  Settings/Clock gate to Enabled Set Settings/Clock settings/Clock select to Internal 1kHz LPO (this clock source is enabled in the VLLS1 mode) Set Settings/Clock settings/Prescale value/Glitch filter to Prescaler/64; Glitch Filter 32 (it will eliminates glitches on connected button that will be used for generating pulses) Set Settings/Compare value to 4 (the LPTMR interrupt is invoked when the compare value is equal to counter and the counter value is increased, i.e. 5 pulses on the input pins invoke the LPTMR interrupt) Set Settings/Timer mode to Pulse Counter (we will use the timer to count external pulses on the input pin 3) Set Settings/Pin select to Input 3 Set Settings/Pin polarity to Active Low Set Pins/Input pin 3 to Enabled and select PTB6/IRQ_2/LPTMR0_ALT3/TPM1_CH1, TPM_CLKIN1 in Pin 3 item. Set Interrupts/Interrupt request to Enabled Set Interrupts/Timer interrupt to Enabled (we will use the timer interrupt to wakeup CPU from VLLS1 mode after 5 pulses on the input 3 pin) Set Initialization/Timer enable to yes Set Initialization/Utilize after reset values to no We have finished design time settings of Processor Expert components and we are ready to write the application code. When you generate code and Build the application there will not be any error or warning. The Processor Expert project looks as follow: Application code During the component settings we have enabled two interrupt – RTC interrupt and LPTMR interrupt. Therefore we need to write theses interrupt service routines. If you look for example into RTC.h file, you can find the declaration of the RTC_IRQHandler interrupt routine. So we can use the declaration to write the definition of the routine in the main.c program module: #define RTC_ALARM_TIMEOUT_SEC 15 /* RTC interrupt service routine */ PE_ISR(RTC_IRQHandler) { if (RTC_HAL_HasAlarmOccured(RTC_BASE)) {   // set the next alarm in RTC_ALARM_TIMEOUT_SEC seconds (clear also the TAF flag)   RTC_HAL_SetAlarmReg(RTC_BASE,RTC_HAL_GetAlarmReg(RTC_BASE) + RTC_ALARM_TIMEOUT_SEC); } if (RTC_HAL_IsTimeInvalid(RTC_BASE)) {        /* clear TIF (Time Invalid Flag) by stop of the counter and setting TSR reg */        RTC_HAL_EnableCounter(RTC_BASE, false);        RTC_HAL_SetSecsReg(RTC_BASE, 0);        /* enable counter */        RTC_HAL_EnableCounter(RTC_BASE, true); } } This interrupt routine services the Alarm interrupt in case that it is invoked during blinking of the green LED in the run mode (clear the flag and set the new Alarm time) and also it services the Invalid Time interrupt that can occur during recovering from the VLLS1 mode. Please note, that RTC module is little bit special , it runs in all  run, wait and stop modes and the reset enables the Time Invalid interrupt bit (TIIE bit in RTC_IER) and invoke the Time Invalid interrupt on reset (POR or software reset). Therefore we need to clear the Invalid Time flag otherwise the application remain invoking RTC interrupt in an infinite cycle and the application does not work at all (it is also one of the issue that has not a straight forward solution). The RTC interrupt routine (defined above) shall properly serve all case we need in our application. Please note, that RTC interrupt always cause the wake-up from low-leakage stops modes (it is not configurable by LLWU on KL03 derivatives – see the chip-specific LLWU information). In addition, the after reset value of RTC_SR register is 0x01 (TIF flag is set). Therefore when the RTC is not initialized and a low-leakage stop mode is entered the CPU is immediately woken-up due to the RTC module interrupt flag (TIF flag is set). I.e. you must always properly initialize RTC module and clear all flags before you enter a low-leakage stop mode. We need also a service routine for the LPTMR device that is used for waking up from VLSS1 mode. This is a simple interrupt service routine that just clear the LPTMR interrupt flag: /* LPTMR interrupt service routine */ PE_ISR(LPTMR0_IRQHandler) {   /* clear LPTMR interrupt flag */   LPTMR_HAL_ClearIntFlag(LPTMR0_BASE); } Now we can write the main function. We will need a temporary count variables for blinking: /* Write your local variable definition here */ volatile uint32_t i; // for waiting uint8_t blink_count; We need also a definition of the pin PTB11 that drivers the GREEN LED /* PTB11 - LED GREEN pin */ #define LED_GREEN_PIN 11 And the number of LED blinking: #define LED_BLINK 5 After devices initialization in PE_low_level_init() we need to check the reason of reset (POR reset or VLLS1 recovery). Thus we can write following code: /* Write your code here */   if (RCM_SRS0 == 0x01) { /* test the reason of reset - wakeup on VLLS */     if(PMC->REGSC &  PMC_REGSC_ACKISO_MASK) {       PMC->REGSC |= PMC_REGSC_ACKISO_MASK; /* VLLSx recovery */     }     for (blink_count = 0; blink_count < LED_BLINK; blink_count++) {        // green LED blinking     GPIO_HAL_ClearPinOutput(GPIOB_BASE,LED_GREEN_PIN);        for (i = 0; i<40000; i++);     GPIO_HAL_SetPinOutput(GPIOB_BASE,LED_GREEN_PIN);         for (i = 0; i<40000; i++);   }     // set the next alarm in "RTC_ALARM_TIMEOUT_SEC" seconds (clear also the TAF flag)     RTC_HAL_SetAlarmReg(RTC_BASE,RTC_HAL_GetAlarmReg(RTC_BASE)+RTC_ALARM_TIMEOUT_SEC);   } else {       /* power-on reset */       /* switch the green LED on */     GPIO_HAL_ClearPinOutput(GPIOB_BASE,LED_GREEN_PIN);        /* wait a while */        for (i = 0; i<40000; i++);        /* switch the green LED off */     GPIO_HAL_SetPinOutput(GPIOB_BASE,LED_GREEN_PIN);   } In case of VLLS1 recovery we acknowledge the pin isolation ACKISO bit in the PMC_REGSC register. This bit must be cleared to allow normal run mode of all pins. Then five blinking of the green LED follows (it is just a simple code for demo purposes only; you can write your own more sophisticated code for blinking by TPMx device with Init_TPM component if you want). In case of POR reset one blink of the green LED is processed. When the reset/wakup state is served by the our application code the VLLS1 mode can be entered. As the first step, we need to be sure that there are not any interrupt flags set to wake-up the CPU from VLLS1 mode so we clear LLWU and SW2 pin (PTB0) interrupt flags and then we enter VLLS1 mode by using enter_vllsx function: /* clear LLWU flag for the selected pin 4 - PTB0 */ LLWU_F1 |= LLWU_F1_WUF4_MASK; /* clear interrupt flag of the SW2 pin - PTB0 */ PORTB_PCR0 |= PORT_PCR_ISF_MASK; // enter the VLLS3 //enter_vllsx((smc_por_option_t)NULL,kSmcStopSub3); // enter the VLLS0 - RTC and LPTMR do not work becuase of external crystal clock source does not work in the VLLS0 mode //enter_vllsx(kSmcPorEnabled, kSmcStopSub0); // enter the VLLS1 enter_vllsx((smc_por_option_t)NULL,kSmcStopSub1); // switch the green LED on - error state when the VLLSx mode is not entered GPIO_HAL_ClearPinOutput(GPIOB_BASE,LED_GREEN_PIN);  There is also code for switching on the green LED in case the VLLS1 mode is not entered (indication of the error state). The enter_vllsx function is defined by the following way (it is used existing function from a demo KSDK demo example): /* * VLLSx mode entry routinue */ static void enter_vllsx(smc_por_option_t PORPOValue, smc_stop_submode_t VLLSValue) {        smc_power_mode_config_t smcConfig;        /* set power mode to specific VLLSx mode */        smcConfig.porOption = true;        smcConfig.porOptionValue = (smc_por_option_t) PORPOValue;        smcConfig.powerModeName = kPowerModeVlls;        smcConfig.stopSubMode = (smc_stop_submode_t) VLLSValue;        SMC_HAL_SetMode(SMC_BASE, &smcConfig); } It is all code we need for our low power demo application. The application can be built and run now. 'Invoking: Cross ARM GNU Create Listing' arm-none-eabi-objdump --source --all-headers --demangle --line-numbers --wide "Low power demo KL03.elf" > "Low power demo KL03.lst" 'Finished building: Low power demo KL03.lst' ' ' 'Invoking: Cross ARM GNU Print Size' arm-none-eabi-size --format=berkeley "Low power demo KL03.elf" text         data          bss          dec          hex      filename 7828          112          896         8836         2284      Low power demo KL03.elf 'Finished building: Low power demo KL03.siz' ' ' Note: You can see that the code size has increased because SDK functions have been used in the application. This is partly due to usage assert function that allows reporting of error by using standard libraries. If you needn’t this functionality and you need just a compact code (to decrease the power consumption) you can do it by the following way: Open Properties of the Low power demo KL03 application, select C/C++Build/Settings, on the Tool Settings tab, select Cross ARM C Compiler/Preprocessor and add NDEBUG symbol in the Defined symbols list: When you Clean and Build the application again the code size is reduced: 'Invoking: Cross ARM GNU Print Size' arm-none-eabi-size --format=berkeley "Low power demo KL03.elf" text         data          bss          dec          hex      filename 3192          108          876         4176         1050      Low power demo KL03.elf 'Finished building: Low power demo KL03.siz' ' ' 08:20:28 Build Finished (took 15s.886ms) There is also additional step that allows you to reduce the code size of the application. You can set Optimization Level of GNU C tools. Open Properties of the Low power demo KL03 application, select C/C++Build/Settings, on the Tool Settings tab, select Optimization and set the Optimization Level to requested value (please note that some of the level are not suitable for debugging): Debugging The application contain predefined  debug connect by default. . When you open the context menu of the project in the Project Explorer window and select Debug As/Debug Configurations.... The Debug Configurations window is opened and you can select and configure all predefined debug configurations (OpenOCD, PE Micro, Segger J-link). The default configuration can be easily used with the Freedom board (OpenSDA interface – j-link or PE Micro). You can just select the right debug connection and click on the Debug for debugging of your application. In the Debug Configuration window open the GDB SEGGER J-Link Debugger  group and select the Low power demo KL03 Debug configuration. See the Debugger tab, there is already filled MKL03Z32xxx4 Device name. Uncheck Allocate console for semihosting and SWO (SWO is not support by OpenSDA SEGGER J-link). Go to on Startup tab and uncheck the Enable SWO option (SWO is not supported by OpenSDA SEGGER J-link). Click on the Apply and Debug button and the debugger starts (you must have the FRDM-KL03Z board connect to the workstation). You can now start the application (click on the Resume button) and check the functionality. The debugger is disconnected due to VLLS1 mode entry. But the application run and can be used. If you want to connect a button for the LPTMR pulses generating you can connect one pin of the button to the PTB6 on pin #4 of 8-pins connector J1 and the second pin of the button to the GND to the pin #7 of the 10-pins connector J2, see below: You can use this demo application as a start point of your real low power application. I hope it will help you and save your time of your first low power application implementation in the Processor Expert. There is also possible to measure power consumption of the CPU in VLLS1 mode. It is described in the FRDM-KL03 User Guide. Just unsolder R27 and R28 and solder a header pins to J10 position of the board. You must use jumper for J10 now to connect power supply for the CPU and when the jumper is removed you can use these two pins to measure the energy consumption of the CPU (e.g. by a multimeter)
View full article
SimpleEvents Description Set/clear/check event flags Component SimpleEvents.PEupd Dependencies LowPower License License : Open Source (LGPL) Copyright : (c) Copyright Erich Styger, 2011, all rights reserved. This an open source software implementing a simple event module using Processor Expert. This is a free software and is opened for education, research and commercial developments under license policy of following terms: * This is a free software and there is NO WARRANTY. * No restriction on use. You can use, modify and redistribute it for personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY. * Redistributions of source code must retain the above copyright notice.
View full article
Introduction This document describes migration steps of CW MCU 10.6 projects with Processor Expert into KDS 3.0.0. Note: We strongly recommend backup of your original CodeWarrior application. If you want to use default configuration of compiler and debugger (toolchain) in KDS 3.0.0 use instructions described in the document Processor Expert project (CW MCU 10.6) migration into new project in KDS 3.0.0 The following document describes conversion of the whole project (toolchain configuration, source code files, Processor Expert configuration). Steps of the conversion by using CodeWarrior Converter and KDS Upgrade Assistant 1. Create a new workspace in KDS 3.0.0 (it is a workaround for KDS Upgrade Assistant that does not allow selection of migrated project in non-empty workspaces) 2. Import the project by using File > Import command, see below. Select File > Import, from the IDE menu.           The import dialog appears. Expand the General tree and select Existing Projects into Workspace. Click Next. The Import projects screen appears. Click Browse and select the root directory to search for an existing Eclipse project Select the projects you want to import in your Workspace Check Copy project into workspace if want to create a copy of the project in the workspace (otherwise the project is linked into the workspace only). Click Finish - the imported project appears in the Project Explorer view. 3 Convert CodeWarrior Project file by using command Convert CodeWarrior project file… in the context menu of the project in Project Explorer window, see detailed steps below. Select the recently imported legacy project you want to convert. Right-click and select Convert CodeWarrior Project file. Note: The context menu Convert CodeWarrior project file... will only work with GNU/gcc CodeWarrior project and not for CodeWarrior projects using the legacy Freescale compiler (for this compiler use instructions described in the chapter Steps of the conversion by manual configuration of the toolchain or Processor Expert project (CW MCU 10.6) migration into new project in KDS 3.0.0​). The CodeWarrior to KDS project migration assistant dialog appears and prompts whether you want to convert the project. Click Yes. The CodeWarrior to KDS project migration assistant will prompt that the conversion has completed and a backup of the original *cproject file has been created in .cproject_backup. Click to OK to close the CodeWarrior to KDS project migration assistant dialog. Note: To see the conversion process log, navigate to the project's root directory and open the KDSConverter.log file. 4. Process update of the project by using Project > KDS Upgrade Assistant… Select the project: Select settings for conversion (for details see the document Kinetis Design Studio: Migrating KDS V2.0.0 Projects to GNU Tools for ARM Embedded (Launchpad, KDS V3.0.0). For CodeWarrior project can be used following settings. Click on the Finish button to process the upgrade. Known Issues: The converter does not distinguish between Executable projects and Static Library projects. In the latter case the options for converting Newlib-nano and adding semihosting should be suppressed. When selecting options to add _exit() implementation and semihosting=rdimon on projects from KSDK_1.1.0demos\hello_world\kds a Cross ARM C Linker errors reports "multiple definition of _isatty". It is necessary to remove the user definition of _isatty. When you want to upgrade a converted CodeWarrior project you must use a new empty workspace otherwise the KDS Upgrade Assistant may not find the project in the workspace (the project is not displayed in the list of projects for the upgrade). GNU ARM Embedded (launchpad) on Linux - because the GNU ARM Embedded tools are 32-bit only for Linux, on Ubuntu 14.04 64-bit (and others) you may see error messages suggesting that arm-none-eabi-gcc could not be found. The tools do exist, however the system doesn't know how to run them. This is because the 32-bit compatibility packages need to be installed: See http://gnuarmeclipse.livius.net/blog/toolchain-install for details and suggested solution. 5. Remove all CW MCU 10.6 startup code (delete all files in the Project_Settings/Startup_Code project folder) and add a new Startup file by using Build options of CPU component: 6. Generate code (a new startup source code file is added into Project Settings/Startup_Code folder in the project). 7.Build the application. If the application is built without errors you can use it and debug it. If there are errors (e.g. linker error) check the Console window of the compiler and linker. There can be for example missing parameter of the selected target CPU – the toolchain settings (the configuration) is damaged and cannot be used due to the following issues: C/C++ Development Toolkit issues Editing the toolchain may damage the project In certain conditions, changing the toolchain for a project in the C/C++ Build → Tool Chain Editor page from another plug-in to GNU ARM Eclipse plug-in might not work; even worse, there are cases when the project is permanently damaged. There is not known way to repair such a broken project; you have to create a new project and copy the content (this is a CDT bug, not a plug-in bug). See the website http://gnuarmeclipse.livius.net/blog/known-problems/#Editing_the_toolchain_may_damage_the_project. Toolchain configuration Issue When you use the latest version of the GNU ARM Eclipse plugin you can get message "Orphaned CDT build configuration [org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1561998926.1100932005.1237614533.626146708.187750101.514251714]: parent extension cfg [org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug] not found". The “org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug” ID comes from a project generated with the old version of the plug-in, no longer supported. Recreate the project with the latest version and it will work. See also http://sourceforge.net/p/gnuarmeclipse/support-requests/6/ In this case you must create a new configuration from a template and set all options manually. Skip following steps and continue below in the chapter Steps of the conversion by manual configuration of the toolchain. 8. Open the context menu of the project in the Project window and select Debug As > Debug Configurations. Add a new debug configuration, e.g. GDB SEGGEER J-Link Debugging. 9. Verify the settings of the debugger (for example select the Device Name). 10. Click on the Apply button and then on the Debug button. Steps of the conversion by manual configuration of the toolchain When the previous conversion process fails you can follow these instructions. Delete the converted project (that has been damaged) from the workspace and follow these steps. 1. Import the project by using File > Import command, see detailed steps in the previous chapter – Step number 2. 2. Select the C/C++ Build / Tool Chain Editor in the Properties of the project (see following screenshot). You see the warning message “Orphaned configuration ….”.  You must create a new configuration for this project (the current configuration is created by a previous version of plugins and it is not compatible). 3. Click on the Manage Configurations… 4. Click on the New button 5. Write the name of the new configuration and select the Copy Settings from. You can copy configuration from an existing project or you can use default template (the following description  suppose default configuration). 6. Click on the OK button. New configuration is created. 7. Select the old configuration and click on the Delete button. 8. Click on the OK button. 9. The new configuration is selected in the Properties window, see below: 10. Click on the Apply button. 11. Select the C/C++ Build/Settings, Tools Settings tab (in the same Properties window). 12. On the Target Processor page select the correct target Processor, the ARM family e.g. cortex-m0plus for KL25Z. Click on the Apply button. 13. On the Optimization page select the Optimization Level: None (-O0). Click on the Apply button. 14. On the Debugging page select the Debug level: Maximum (-g3). Click on the Apply button. 15. On the Cross ARM C Linker / General page add the following script:      Script files (-T): "${ProjDirPath}/Project_Settings/Linker_Files/ProcessorExpert.ld" 16. On the Cross ARM C Linker / Libraries page add the following script:      Library search path (-L): "${ProjDirPath}/Project_Settings/Linker_Files/" 17. On the Cross ARM C Linker / Miscellaneous page add the following script:       Check the option: Use newlib-nano (--specs=nan.specs)      Add the following parameter to the Other linker flags:  -specs=nosys.specs 18. Click on the Apply button. 19. Set the Build Artifact (see below) and click on the OK button. 20. Remove all CW MCU 10.6 startup code (delete all files in the Project_Settings/Startup_Code project folder) and add a new Startup file by using Build options of CPU component: 21. Generate code (a new startup source code file is added into Project Settings/Startup_Code folder in the project). 22. Build the application. 23. If you see the following error: Error: Cannot run program "gcc": Launching failed Modify the PATH variable in the Properties of the Project. Select C/C++ Build/Environment page, double-click on the PATH variable and add the absolute path to the folder KDS_3.0.0\toolchain\arm-none-eabi\bin\ (e.g. add c:\Freescale\KDS_3.0.0\toolchain\arm-none-eabi\bin\; at the beginning of the PATH values). Click on the OK button. Build the application again. The project should be compiled without any error. If you still see any toolchain settings error and you are not able to fix these issue use instructions described in the document Processor Expert project (CW MCU 10.6) migration into new project in KDS 3.0.0​. 24. Open the context menu of the project in the Project window and select Debug As > Debug Configurations. Add a new debug configuration, e.g. GDB SEGGEER J-Link Debugging. 25. Verify the settings of the debugger (for example select the Device Name). 26. Click on the Apply button and then on the Debug button. The application is migrated and debugging should work properly.
View full article
This article describe procedure how to properly install support for KL03 derivative in KDS (Kinetis Design Studio) 1.1.1  (KDS 2.0.0) and also additional steps to update GCC compiler and debug firmware on the FRDM-KL03Z board. KDS 1.1.1 (KDS 2.0.0) installation If you don’t have KDS 1.1.1 (KDS 2.0.0), please get the installation package (for Windows and Linux) on Freescale website. Go to the page Kinetis Design Studio Integrated Development Environment (IDE), select the build and install it. Kinetis SDK installation The KL03Z derivative support is distributed as a service pack KSDK 1.0.0 for KL03Z. Download the Freescale Kinetis SDK_1.0.0 for the FRDM-KL03Z Windows or Linux installer and install it. After the KSDK 1.0.0 for KL03Z is installed you need also install the PEx service pack for KL03. In the KDS main menu select Help > Install new software… , click on Add.. button , click on Archive and select KL03Z-1.0.0-GA-SA-RC2-for-Eclipse.zip in the SDK subfolder (e.g. c:\Freescale\KSDK_1.0.0-KL03Z\tools\eclipse_update\KL03Z-1.0.0-GA-SA-RC2-for-Eclipse.zip): Additional Steps Next step is to install the updated GCC compiler. This is due to C standard library footprint issue in the GCC version that is distributed in KDS 1.1.1 (KDS 2.0.0). The KL03Z derivatives contain small amount of RAM memory and therefore this step is also strongly recommended. Detailed instructions, how to update the GCC, are provided in the KSDK user guide located in the KSDK 1.0.0 for KL03Z installation folder in KSDK_1.0.0-KL03Z\doc\Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User’s Guide.pdf – chapter Appendix B: Kinetis Design Studio environment variable fix and swap tool chain. Please note that when you update the GCC you must change the linker flags for every new project with GCC to “-specs=nano.specs -specs=nosys.specs” as described in the document. (otherwise the default setting of linker flags will cause an error of GCC linker). If you haven’t done that yet,  update firmware of the FRDM-KL03Z board to allow application flashing and debugging. It is described in the same document in the chapter Appendix C: OpenSDA J-Link firmware updated. You can start creating a new application for the KL03 now. For example see Low power demo application on FRDM-KL03Z board.
View full article
SSD1289 Description Display driver for the Solomon Systech SSD1289 LCD (which is used on the TWR-LCD). Component SSD1289.PEupd Dependencies Wait License License : Open Source (LGPL) Copyright : (c) Copyright Erich Styger, 2011, all rights reserved. This an open source software in the form of a Processor Expert Embedded Component. This is a free software and is opened for education, research and commercial developments under license policy of following terms: * This is a free software and there is NO WARRANTY. * No restriction on use. You can use, modify and redistribute it for personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY. * Redistributions of source code must retain the above copyright notice.
View full article
Learn the Processor Expert UI, what components are, and how to add one to a project in the CodeWarrior Development Studio.
View full article
The attached document shows how tou use Processor Expert Driver Suit to generate code for CW. You can see details in the notes at the botton of the slides.  Best regards, Carlos
View full article
Training Videos Processor Expert - Introduction (Driver Suite) (Video 04:01) - Learn the Processor Expert UI, what components are, and how to add one to a project.. Processor Expert: Working with Components (Driver Suite) (Video 03:53) - Using Microcontroller Driver Suite, learn how to add, configure, and remove a component, and how to generate code. Processor Expert: The Code Model (Driver Suite) (Video 04:45) - Using Microcontroller Driver Suite, learn the answers to the questions: What code does Processor Expert generate? Where does it put the code? And how do I use it? Processor Expert: Creating an MQX Lite Project (Driver Suite) (Video 05:15) - Using Microcontroller Driver Suite, learn how to create an MQX Lite component from scratch. You'll also learn where Processor Expert puts the task functions and the RTOS code itself. Processor Expert: An MQX Lite Example (Driver Suite) (Video 04:39) - See how a full MQX Lite application works, how the tasks are implemented, and how they interact with other components in Microcontroller Driver Suite. Processor Expert: Exporting and Importing Templates (Driver Suite) (Video 03:56) - Learn how to export and import a file that can completely configure and generate the code required for an arbitrarily complex hardware and software system with Microcontroller Driver Suite. Processor Expert: Integrating with IAR Embedded (Video 06:22) - Learn how to incorporate Processor Expert's generated code into an IAR Embedded Workbench project. Processor Expert: Integrating with Keil Microvision (Video 04:54) - Learn how to incorporate Processor Expert's generated code into a Keil Microvision project.
View full article
This tutorial shows a basic steps to create a CodeWarrior project with Processor Expert configured for the FRDM-KL25 board. The steps apply to CodeWarrior version 10.3 or newer. 1. In the CodeWarrior , go for [File | New | Bareboard Project]. 2. Type a project name such as e.g. KL25Z-PE” then click [Next] 3. In Devices page, please go to the line [Device or board to be used], type in part of the name our target device:  "kl25z" and select the final target device MKL25Z128 from the filtered list. Then click [Next]. 4. In the Connections window select only the [OpenSource SDA] connection type and click [Next]. Note: This is the on-board USB debug connection on FRDM-KL25. 5. In the Rapid Application Development select [Processor Expert] and click [Finish]. 6. The CodeWarrior Projects view contains a newly created project. Double-click the Processor Expert.pe file to ensure to see  the Processor Expert components from the project in the Component view. 7. In the Component view open the view menu (small down-heading arrow) and select Apply Board Configuration command 8. Click Browse… button and select FREEDOM-KL25Z / cpu / CPU_default.peb 9. Click Finish to confirm replacement of the default CPU component by the pre-configured one for the FRDM-KL25 board. Now the project is configured to run from on-board crystal at 48MHz. You can continue with adding components from the Components library view and configuring them in the Inspector or for example try the follow tutorial Toggling Pin on Kinetis Using a Timer Output .
View full article
Using Microcontroller Driver Suite, learn the answers to the questions: What code does Processor Expert generate? Where does it put the code? And how do I use it?
View full article
SMAC 2.4 GHz stack for MC13213 and MC13201 Description Simple MAC (Freescale SMAC) implementation. Component SMAC.PEupd Dependencies SPHY License (c) Copyright Freescale Semiconductor, 2012 Adoption as a Processor Expert component: Erich Styger
View full article
This file can be used on the MC56F8322 device to output clock signals to pins for checking the ROSC frequency as trimed by the factory trim values. The code was generated by processor expert with GUI selections made in Code Warrior IDE.
View full article
Learn how to export and import a file that can completely configure and generate the code required for an arbitrarily complex hardware and software system with Microcontroller Driver Suite.
View full article
When you get a good answer, it is extremely helpful to everyone if you mark it as a correct answer. A hundred people may look at a hot topic, and when there is an answer, they can jump straight to it. So for everyone's benefit, when you get a good answer, mark it! It's part of being a good community member. As well, but much less importantly, one of the things we're going to measure is how quickly the community answers questions. But we're far more interested in people being able to find the right answer. So from time to time, if it looks like people forget to mark answers, we may go through and do it for you. But we aren't your mom. Help your colleagues, and mark the good answers. In fact, you know better than us what's right.
View full article
If you are a CodeWarrior user and yet you don't own a License, this post will be of great use for you and your designs! You might be using Power Architecture technology and the QorIQ processors as well. If I'm just about right, I'll let myself introduce you to the new Optimization Suite for the QorIQ processors. The whole QorIQ Optimization Suite helps optimize your application by utilizing on-chip hardware from the QorIQ processor to provide enhanced levels of visibility of hundreds and hundreds of on chip hardware events, and the first included tool that you'll find in here will be the Scenarios Tool, which includes the following new interesting features: Extract measurement information with either :        Freescale TAP TCP/IP if running Freescale SDK with TCF connector enabled. See data as an average or as a time series Select subsets of data to plot or average Save sample data to review later Multiple windows to display multiple measurements Sampling Time Base Determined by Host computer Now that you know that it provides visibility by utilizing “measurement scenarios”, you'll no longer design "blindly" and you'll be able to test the potential of your creations right away. These measurement scenarios include CPU scenarios, memory and traffic scenarios, and DPAA and peripheral scenarios. The requirements: Host computer system requirements Microsoft® Windows® 7 Microsoft Windows Vista (SP2) (32-bit) Home Basic, Home Premium, Business, Enterprise, Ultimate Edition Microsoft Windows XP Professional (SP3) 32 and 64 Red Hat Enterprise Linux 5.4, 32 and 64 Ubuntu 8.0.4, 32-bit, 9.10, 32 and 10.04, 64 SuSE 11, 32-bit (tested with 11.1) Target system requirements Compatible QorIQ Device (See “Supported Devices”) Connection Method ( you only need one of these ) Linux system running Freescale’s TCF connector. (Included in Freescale SDK for Supported Devices) Freescale USB TAP or Gigabit TAP Get more info within the Overview or get it started at once and download the Scenario tools for Windows! Rather Linux version?
View full article
GenericBitIO Description Generic Bit I/O. Alternative Bit I/O implementation which is independant of the Processor Expert data base. Component GenericBitIO.PEupd Dependencies none License License : Open Source (LGPL) Copyright : (c) Copyright Erich Styger, 2011, all right reserved. This an open source software implementing a generic Bit I/O driver using Processor Expert. This is a free software and is opened for education, research and commercial developments under license policy of following terms: * This is a free software and there is NO WARRANTY. * No restriction on use. You can use, modify and redistribute it for personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY. * Redistributions of source code must retain the above copyright notice.
View full article
QuadCounter Description Driver for a quadrature counter. Component QuadCounter.PEupd Dependencies none License License : Open Source (LGPL) Copyright : (c) Copyright Erich Styger, 2012, all rights reserved. This an open source softwareusing Processor Expert. This is a free software and is opened for education, research and commercial developments under license policy of following terms: * This is a free software and there is NO WARRANTY. * No restriction on use. You can use, modify and redistribute it for personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY. * Redistributions of source code must retain the above copyright notice.
View full article