<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
-<?fileVersion 4.0.0?>\r
-\r
-<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">\r
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">\r
<storageModule moduleId="org.eclipse.cdt.core.settings">\r
<cconfiguration id="com.crt.advproject.config.exe.debug.56486929">\r
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.56486929" moduleId="org.eclipse.cdt.core.settings" name="Debug">\r
</tool>\r
</toolChain>\r
</folderInfo>\r
- <folderInfo id="com.crt.advproject.config.exe.debug.56486929.2106668528" name="/" resourcePath="ThirdParty/USB_CDC">\r
- <toolChain id="com.crt.advproject.toolchain.exe.debug.1865989435" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.debug" unusedChildren="">\r
- <targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.debug" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.exe.debug"/>\r
- <tool id="com.crt.advproject.cpp.exe.debug.1158267972" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.debug.359174792"/>\r
- <tool id="com.crt.advproject.gcc.exe.debug.1784372430" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.debug.517029683">\r
- <option id="com.crt.advproject.gcc.exe.debug.option.optimization.level.369260631" name="Optimization Level" superClass="com.crt.advproject.gcc.exe.debug.option.optimization.level" value="gnu.c.optimization.level.size" valueType="enumerated"/>\r
- <inputType id="com.crt.advproject.compiler.input.466388069" superClass="com.crt.advproject.compiler.input"/>\r
- </tool>\r
- <tool id="com.crt.advproject.gas.exe.debug.401476199" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.debug.281614531">\r
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1255426283" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>\r
- <inputType id="com.crt.advproject.assembler.input.882456885" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>\r
- </tool>\r
- <tool id="com.crt.advproject.link.cpp.exe.debug.2009352548" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.debug.1490011469"/>\r
- <tool id="com.crt.advproject.link.exe.debug.1734116997" name="MCU Linker" superClass="com.crt.advproject.link.exe.debug.1212311005"/>\r
- </toolChain>\r
- </folderInfo>\r
<folderInfo id="com.crt.advproject.config.exe.debug.56486929.1781697322" name="/" resourcePath="ThirdParty/CMSISv2p10_LPC18xx_DriverLib">\r
<toolChain id="com.crt.advproject.toolchain.exe.debug.222538953" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.debug" unusedChildren="">\r
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.debug" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.exe.debug"/>\r
<tool id="com.crt.advproject.link.exe.debug.536813209" name="MCU Linker" superClass="com.crt.advproject.link.exe.debug.1212311005"/>\r
</toolChain>\r
</folderInfo>\r
+ <folderInfo id="com.crt.advproject.config.exe.debug.56486929.2106668528" name="/" resourcePath="ThirdParty/USB_CDC">\r
+ <toolChain id="com.crt.advproject.toolchain.exe.debug.1865989435" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.debug" unusedChildren="">\r
+ <targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.debug" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.exe.debug"/>\r
+ <tool id="com.crt.advproject.cpp.exe.debug.1158267972" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.debug.359174792"/>\r
+ <tool id="com.crt.advproject.gcc.exe.debug.1784372430" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.debug.517029683">\r
+ <option id="com.crt.advproject.gcc.exe.debug.option.optimization.level.369260631" name="Optimization Level" superClass="com.crt.advproject.gcc.exe.debug.option.optimization.level" value="gnu.c.optimization.level.size" valueType="enumerated"/>\r
+ <inputType id="com.crt.advproject.compiler.input.466388069" superClass="com.crt.advproject.compiler.input"/>\r
+ </tool>\r
+ <tool id="com.crt.advproject.gas.exe.debug.401476199" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.debug.281614531">\r
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1255426283" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>\r
+ <inputType id="com.crt.advproject.assembler.input.882456885" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>\r
+ </tool>\r
+ <tool id="com.crt.advproject.link.cpp.exe.debug.2009352548" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.debug.1490011469"/>\r
+ <tool id="com.crt.advproject.link.exe.debug.1734116997" name="MCU Linker" superClass="com.crt.advproject.link.exe.debug.1212311005"/>\r
+ </toolChain>\r
+ </folderInfo>\r
<fileInfo id="com.crt.advproject.config.exe.debug.56486929.src/cr_startup_lpc18xx.cpp" name="cr_startup_lpc18xx.cpp" rcbsApplicability="disable" resourcePath="src/cr_startup_lpc18xx.cpp" toolsToInvoke=""/>\r
<sourceEntries>\r
<entry excluding="ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_wwdt.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_utils.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_uart.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_timer.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_ssp.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_sct.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_rtc.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_rit.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_qei.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_pwr.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_nvic.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_mcpwm.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_libcfg_default.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_lcd.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_i2s.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_i2c.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_gpdma.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_evrt.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_emc.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_dac.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_can.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_atimer.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/lpc18xx_adc.c|ThirdParty/CMSISv2p10_LPC18xx_DriverLib/src/debug_frmwrk.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
<storageModule moduleId="com.crt.config">\r
<projectStorage><?xml version="1.0" encoding="UTF-8"?> \r
<TargetConfig> \r
-<Properties property_0="" property_2="LPC1850A_4350A_SPIFI.cfx" property_3="NXP" property_4="LPC1830" property_count="5" version="1"/> \r
-<infoList vendor="NXP"><info chip="LPC1830" match_id="0x0" name="LPC1830" stub="crt_emu_lpc18_43_nxp"><chip><name>LPC1830</name> \r
+<Properties property_0="" property_2="LPC1850A_4350A_SPIFI.cfx" property_3="NXP" property_4="LPC1830" property_count="5" version="60000"/> \r
+<infoList vendor="NXP"><info chip="LPC1830" match_id="0x0" name="LPC1830" resetscript="LPC18LPC43ExternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"><chip><name>LPC1830</name> \r
<family>LPC18xx</family> \r
<vendor>NXP (formerly Philips)</vendor> \r
<reset board="None" core="Real" sys="Real"/> \r
<peripheralInstance derived_from="ADC0" id="ADC0" location="0x400e3000"/> \r
<peripheralInstance derived_from="ADC1" id="ADC1" location="0x400e4000"/> \r
<peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x400f4000"/> \r
+<peripheralInstance derived_from="EEPROM" id="EEPROM" location="0x4000e000"/> \r
</chip> \r
<processor><name gcc_name="cortex-m3">Cortex-M3</name> \r
<family>Cortex-M</family> \r
/*\r
- FreeRTOS V8.0.0:rc1 - Copyright (C) 2014 Real Time Engineers Ltd. \r
+ FreeRTOS V8.0.0:rc1 - Copyright (C) 2014 Real Time Engineers Ltd.\r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
/* This demo makes use of one or more example stats formatting functions. These\r
format the raw data provided by the uxTaskGetSystemState() function in to human\r
-readable ASCII form. See the notes in the implementation of vTaskList() within \r
+readable ASCII form. See the notes in the implementation of vTaskList() within\r
FreeRTOS/Source/tasks.c for limitations. */\r
#define configUSE_STATS_FORMATTING_FUNCTIONS 1\r
\r
\r
/* Set to 1 to include "trace start" and "trace stop" CLI commands. These\r
commands start and stop the FreeRTOS+Trace recording. */\r
-#define configINCLUDE_TRACE_RELATED_CLI_COMMANDS 0\r
+#define configINCLUDE_TRACE_RELATED_CLI_COMMANDS 1\r
\r
/* Dimensions a buffer that can be used by the FreeRTOS+CLI command\r
interpreter. See the FreeRTOS+CLI documentation for more information:\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
-<launchConfiguration type="com.crt.dsfdebug.crtmcu.launchType">\r
-<stringAttribute key=".gdbinit" value=""/>\r
-<stringAttribute key="LAUNCH_ID.OFSemuDetails" value="Red Probe Family"/>\r
-<booleanAttribute key="com.crt.ctrlcenter.crtInit" value="true"/>\r
-<stringAttribute key="com.crt.ctrlcenter.targetbase" value="NXP LPC18xx (SWD) (*)"/>\r
-<stringAttribute key="com.crt.ctrlcenter.targetconfig" value="<?xml version="1.0" encoding="UTF-8"?> <config chipvendor="NXP" genname="NXP LPC18xx (SWD)" id="config.gdb.stub"><parameters><params><param description="Enter as XTAL[,PLL]. PLL is optional. Values are in kHz" name="Crystal (XTAL) frequency and PLL value" required="false" type="nullString" value="" var="xtal.hz"/> </params> <initValue value="false" var="vector.catch"/> <params><param default="true" description="Vector catch" name="Vector catch" value="True" var="vector.catch"><enum value="True"/> <enum value="False"/> </param> </params> <params><param default="true" description="Enable Red Trace" name="Enable Red Trace " value="true" var="swv.enable"><enum value="true"/> <enum value="false"/> </param> </params> <params><param default="Auto" description="Enablement of semihosting support" name="Semihosting support" value="Auto" var="internal.semihost"><enum value="On"/> <enum value="Off"/> <enum value="Auto"/> </param> </params> <params><param default="" description="Switch debug interface between SWD and JTAG (leave blank for default [SWD])" name="Debug interface" option="" value="" var="internal.debug.interface"><enum value=""/> <enum value="JTAG"/> <enum value="SWD"/> </param> </params> <params><param default="" description="Maximum wire speed in KHz (leave blank to Auto-detect). Not all values are supported by all targets" name="Maximum wire speed" type="nullString" value="" var="emu.speed"><enum value=""/> <enum value="30000"/> <enum value="15000"/> <enum value="10000"/> <enum value="7500"/> <enum value="6000"/> <enum value="5000"/> <enum value="3750"/> <enum value="3000"/> <enum value="2500"/> <enum value="2000"/> <enum value="1500"/> <enum value="1250"/> <enum value="1200"/> <enum value="1000"/> <enum value="750"/> <enum value="600"/> <enum value="500"/> <enum value="400"/> <enum value="300"/> <enum value="250"/> <enum value="200"/> <enum value="150"/> </param> </params> <params><param content="startupScript" description="Startup script (for use with Redlink)" name="Startup script" type="nullString" value="" var="startup.script"/> <param default="" description="Additional options" name="Additional options" value="" var="misc.options"/> <param default="2" description="Set stub debug level (1-4)" name="Debug Level " value="2" var="debug.level"/> <param default="True" description="when True, executable image will be loaded into the target" name="Load image" type="boolean" value="True" var="load"><enum value="True"/> <enum value="False"/> </param> <param default="cont" description="Run, continue or (do nothing)" name="Run/Continue image" value="cont" var="run"><enum value="run"/> <enum value="cont"/> <enum value=""/> </param> <param default="off" description="If on is specified, make the debugger treat unknown memory as non-existent and refuse \naccesses to such memory. If off is specified, treat the memory as RAM" name="Memory Access Checking" value="off" var="mem.access"><enum value="on"/> <enum value="off"/> </param> <param default="cont" description="choose the disconnect behavior for the target" name="Disconnect behavior" value="cont" var="ondisconnect"><enum value="nochange"/> <enum value="stop"/> <enum value="cont"/> <enum value="run_cont"/> </param> <param default="" description="Command to run before starting the debugger" name="Pre launch command" value="" var="internal.prelaunch.command"/> </params> </parameters> <script emulators="${gdb.stub} -mi -info-emu" silent="false" swv="true" type="init">set remotetimeout 60000&#x0A;target extended-remote | ${gdb.stub} -g -mi -${debug.level:2} ${-c+speed:$null} ${-s+emu.speed:$null} ${-p+package:$null} ${-vendor=+vendor:$null} ${-flash-driver=+flash.driver:$null} ${-e+emulator:$null} ${vector.catch?-vc:} ${misc.options}&#x0A;set mem inaccessible-by-default ${mem.access}&#x0A;mon ondisconnect ${ondisconnect}&#x0A;set arm force-mode thumb&#x0A;${load}</script> <script silent="false" type="run">${run}</script> </config> "/>\r
-<intAttribute key="com.crt.ctrlcenter.version" value="1"/>\r
-<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="arm-none-eabi-gdb"/>\r
-<stringAttribute key="org.eclipse.cdt.debug.mi.core.GDB_INIT" value=""/>\r
-<booleanAttribute key="org.eclipse.cdt.debug.mi.core.breakpointsFullPath" value="false"/>\r
-<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="com.crt.ctrlcenter.cmdfactory"/>\r
-<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>\r
-<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="true"/>\r
-<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>\r
-<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>\r
-<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="0"/>\r
-<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="com.crt.ctrlcenter.CRTEmbeddedCDebugger"/>\r
-<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>\r
-<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>\r
-<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>\r
-<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>\r
-<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>\r
-<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug\FreeRTOS_UDP_Demo.axf"/>\r
-<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="FreeRTOS_UDP_Demo"/>\r
-<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.crt.advproject.config.exe.debug.56486929"/>\r
-<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="false"/>\r
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">\r
-<listEntry value="/FreeRTOS_UDP_Demo"/>\r
-</listAttribute>\r
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">\r
-<listEntry value="4"/>\r
-</listAttribute>\r
-<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="reserved-for-future-use"/> "/>\r
-<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>\r
-<stringAttribute key="saved_expressions<seperator>Unknown" value="RecorderData,&RecorderData,&eventBuffer,&eventData,eventData,0x100014c0,0x10001530,recorderData"/>\r
-</launchConfiguration>\r
+++ /dev/null
-/*******************************************************************************\r
- * Tracealyzer v2.4.1 Recorder Library\r
- * Percepio AB, www.percepio.com\r
- *\r
- * trcConfig.h\r
- *\r
- * Configuration parameters for the trace recorder library. Before using the \r
- * trace recorder library, please check that the default settings are \r
- * appropriate for your system, and if necessary adjust these. Most likely, you \r
- * will need to adjust the NTask, NISR, NQueue, NMutex and NSemaphore values to \r
- * reflect the number of such objects in your system. These may be \r
- * over-approximated, although larger values values implies more RAM usage.\r
- *\r
- * Terms of Use\r
- * This software is copyright Percepio AB. The recorder library is free for\r
- * use together with Percepio products. You may distribute the recorder library\r
- * in its original form, including modifications in trcHardwarePort.c/.h\r
- * given that these modification are clearly marked as your own modifications\r
- * and documented in the initial comment section of these source files. \r
- * This software is the intellectual property of Percepio AB and may not be \r
- * sold or in other ways commercially redistributed without explicit written \r
- * permission by Percepio AB.\r
- *\r
- * Disclaimer \r
- * The trace tool and recorder library is being delivered to you AS IS and \r
- * Percepio AB makes no warranty as to its use or performance. Percepio AB does \r
- * not and cannot warrant the performance or results you may obtain by using the \r
- * software or documentation. Percepio AB make no warranties, express or \r
- * implied, as to noninfringement of third party rights, merchantability, or \r
- * fitness for any particular purpose. In no event will Percepio AB, its \r
- * technology partners, or distributors be liable to you for any consequential, \r
- * incidental or special damages, including any lost profits or lost savings, \r
- * even if a representative of Percepio AB has been advised of the possibility \r
- * of such damages, or for any claim by any third party. Some jurisdictions do \r
- * not allow the exclusion or limitation of incidental, consequential or special \r
- * damages, or the exclusion of implied warranties or limitations on how long an \r
- * implied warranty may last, so the above limitations may not apply to you.\r
- *\r
- * Copyright Percepio AB, 2013.\r
- * www.percepio.com\r
- ******************************************************************************/\r
-\r
-#ifndef TRCCONFIG_H\r
-#define TRCCONFIG_H\r
-\r
-#include <stdint.h>\r
-\r
-/*******************************************************************************\r
- * CONFIGURATION RELATED TO CAPACITY AND ALLOCATION \r
- ******************************************************************************/\r
-\r
-/*******************************************************************************\r
- * EVENT_BUFFER_SIZE\r
- *\r
- * Macro which should be defined as an integer value.\r
- *\r
- * This defines the capacity of the event buffer, i.e., the number of records\r
- * it may store. Each registered event typically use one record (4 byte), but\r
- * vTracePrintF may use multiple records depending on the number of data args.\r
- ******************************************************************************/\r
-\r
-#define EVENT_BUFFER_SIZE 5000 /* Adjust wrt. to available RAM */\r
-\r
-\r
-/*******************************************************************************\r
- * USE_LINKER_PRAGMA\r
- *\r
- * Macro which should be defined as an integer value, default is 0.\r
- *\r
- * If this is 1, the header file "recorderdata_linker_pragma.h" is included just\r
- * before the declaration of RecorderData (in trcBase.c), i.e., the trace data \r
- * structure. This allows the user to specify a pragma with linker options. \r
- *\r
- * Example (for IAR Embedded Workbench and NXP LPC17xx):\r
- * #pragma location="AHB_RAM_MEMORY"\r
- * \r
- * This example instructs the IAR linker to place RecorderData in another RAM \r
- * bank, the AHB RAM. This can also be used for other compilers with a similar\r
- * pragmas for linker options.\r
- * \r
- * Note that this only applies if using static allocation, see below.\r
- ******************************************************************************/\r
-#define USE_LINKER_PRAGMA 0\r
-\r
-\r
-/*******************************************************************************\r
- * SYMBOL_TABLE_SIZE\r
- *\r
- * Macro which should be defined as an integer value.\r
- *\r
- * This defines the capacity of the symbol table, in bytes. This symbol table \r
- * stores User Events labels and names of deleted tasks, queues, or other kernel\r
- * objects. Note that the names of active objects not stored here but in the \r
- * Object Table. Thus, if you don't use User Events or delete any kernel \r
- * objects you set this to zero (0) to minimize RAM usage.\r
- ******************************************************************************/\r
-#define SYMBOL_TABLE_SIZE 5000\r
-\r
-/*******************************************************************************\r
- * USE_SEPARATE_USER_EVENT_BUFFER\r
- *\r
- * Macro which should be defined as an integer value.\r
- * Default is zero (0).\r
- *\r
- * This enables and disables the use of the separate user event buffer.\r
- *\r
- * Note: When using the separate user event buffer, you may get an artificial\r
- * task instance named "Unknown actor". This is added as a placeholder when the \r
- * user event history is longer than the task scheduling history.\r
- ******************************************************************************/\r
-#define USE_SEPARATE_USER_EVENT_BUFFER 0\r
-\r
-/*******************************************************************************\r
- * USER_EVENT_BUFFER_SIZE\r
- *\r
- * Macro which should be defined as an integer value.\r
- *\r
- * This defines the capacity of the user event buffer, in number of slots.\r
- * A single user event can use between 1 and X slots, depending on the data.\r
- *\r
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
- ******************************************************************************/\r
-#define USER_EVENT_BUFFER_SIZE 500\r
-\r
-/*******************************************************************************\r
- * USER_EVENT_CHANNELS\r
- *\r
- * Macro which should be defined as an integer value.\r
- *\r
- * This defines the number of allowed user event channels.\r
- *\r
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
- ******************************************************************************/\r
-#define CHANNEL_FORMAT_PAIRS 32\r
-\r
-/*******************************************************************************\r
- * NTask, NISR, NQueue, NSemaphore, NMutex\r
- *\r
- * A group of Macros which should be defined as an integer value of zero (0) \r
- * or larger.\r
- *\r
- * This defines the capacity of the Object Property Table - the maximum number\r
- * of objects active at any given point within each object class.\r
- * \r
- * NOTE: In case objects are deleted and created during runtime, this setting\r
- * does not limit the total amount of objects, only the number of concurrently\r
- * active objects. \r
- *\r
- * Using too small values will give an error message through the vTraceError\r
- * routine, which makes the error message appear when opening the trace data\r
- * in Tracealyzer. If you are using the recorder status monitor task,\r
- * any error messages are displayed in console prints, assuming that the\r
- * print macro has been defined properly (vConsolePrintMessage). \r
- *\r
- * It can be wise to start with very large values for these constants, \r
- * unless you are very confident on these numbers. Then do a recording and\r
- * check the actual usage in Tracealyzer. This is shown by selecting\r
- * View -> Trace Details -> Resource Usage -> Object Table\r
- * \r
- * NOTE 2: Remember to account for all tasks created by the kernel, such as the \r
- * IDLE task, timer task, and any tasks created by other 3rd party \r
- * software components, such as communication stacks. The recorder also has an \r
- * optional monitor task to account for, if this is used.\r
- * Moreover, one task slot is used to indicate "(startup)", i.e., a fictive \r
- * task that represent the time before the scheduler starts. \r
- * NTask should thus be at least 2-3 slots larger than your application task count.\r
- *\r
- ******************************************************************************/\r
-#define NTask 15\r
-#define NISR 10\r
-#define NQueue 10\r
-#define NSemaphore 10\r
-#define NMutex 10\r
-\r
-/* Maximum object name length for each class (includes zero termination) */\r
-#define NameLenTask 15\r
-#define NameLenISR 15\r
-#define NameLenQueue 15\r
-#define NameLenSemaphore 15\r
-#define NameLenMutex 15\r
-\r
-/******************************************************************************\r
- * TRACE_DESCRIPTION\r
- *\r
- * Macro which should be defined as a string.\r
- *\r
- * This string is stored in the trace and displayed in Tracealyzer. Can be\r
- * used to store, e.g., system version or build date. This is also used to store\r
- * internal error messages from the recorder, which if occurs overwrites the\r
- * value defined here. This may be maximum 256 chars.\r
- *****************************************************************************/\r
-#define TRACE_DESCRIPTION "Tracealyzer Recorder Test Program"\r
-\r
-/******************************************************************************\r
- * TRACE_DESCRIPTION_MAX_LENGTH\r
- *\r
- * The maximum length (including zero termination) for the TRACE_DESCRIPTION\r
- * string. Since this string also is used for internal error messages from the \r
- * recorder do not make it too short, as this may truncate the error messages.\r
- * Default is 80. \r
- * Maximum allowed length is 256 - the trace will fail to load if longer.\r
- *****************************************************************************/\r
-#define TRACE_DESCRIPTION_MAX_LENGTH 80\r
-\r
-\r
-/******************************************************************************\r
- * TRACE_DATA_ALLOCATION\r
- *\r
- * This defines how to allocate the recorder data structure, i.e., using a \r
- * static declaration or using a dynamic allocation in runtime (malloc).\r
- *\r
- * Should be one of these two options:\r
- * - TRACE_DATA_ALLOCATION_STATIC (default)\r
- * - TRACE_DATA_ALLOCATION_DYNAMIC\r
- *\r
- * Using static allocation has the benefits of compile-time errors if the buffer \r
- * is too large (too large constants in trcConfig.h) and no need to call the \r
- * initialization routine (xTraceInitTraceData).\r
- *\r
- * Using dynamic allocation may give more flexibility in some cases.\r
- *****************************************************************************/\r
-\r
-#define TRACE_DATA_ALLOCATION TRACE_DATA_ALLOCATION_STATIC\r
-\r
-\r
-/******************************************************************************\r
- * CONFIGURATION REGARDING WHAT CODE/FEATURES TO INCLUDE\r
- *****************************************************************************/\r
-\r
-/******************************************************************************\r
- * USE_TRACE_ASSERT\r
- *\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 0.\r
- *\r
- * If this is one (1), the TRACE_ASSERT macro will verify that a condition is \r
- * true. If the condition is false, vTraceError() will be called.\r
- *****************************************************************************/\r
-#define USE_TRACE_ASSERT 1\r
-\r
-/******************************************************************************\r
- * INCLUDE_FLOAT_SUPPORT\r
- *\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
- *\r
- * If this is zero (0), all references to floating point values are removed,\r
- * in case floating point values are not supported by the platform used.\r
- * Floating point values are only used in vTracePrintF and its subroutines, to \r
- * store float (%f) or double (%lf) argments. \r
- *\r
- * Note: vTracePrintF can still be used with integer and string arguments in\r
- * either case.\r
- *****************************************************************************/\r
-#define INCLUDE_FLOAT_SUPPORT 0\r
-\r
-/******************************************************************************\r
- * INCLUDE_USER_EVENTS\r
- *\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
- *\r
- * If this is zero (0) the code for creating User Events is excluded to\r
- * reduce code size. User Events are application-generated events, like \r
- * "printf" but for the trace log instead of console output. User Events are \r
- * much faster than a printf and can therefore be used in timing critical code.\r
- * See vTraceUserEvent() and vTracePrintF() in trcUser.h\r
- * \r
- * Note that Tracealyzer Standard Edition or Professional Edition is required\r
- * for User Events, they are not displayed in Tracealyzer Free Edition.\r
- *****************************************************************************/\r
-#define INCLUDE_USER_EVENTS 1\r
-\r
-/*****************************************************************************\r
- * INCLUDE_READY_EVENTS\r
- *\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
- *\r
- * If this is zero (0), the code for recording Ready events is \r
- * excluded. Note, this will make it impossible to calculate the correct\r
- * response times.\r
- *****************************************************************************/\r
-#define INCLUDE_READY_EVENTS 1\r
-\r
-/*****************************************************************************\r
- * INCLUDE_NEW_TIME_EVENTS\r
- *\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 0.\r
- *\r
- * If this is zero (1), events will be generated whenever the os clock is\r
- * increased.\r
- *****************************************************************************/\r
-#define INCLUDE_NEW_TIME_EVENTS 0\r
-\r
-/*****************************************************************************\r
- * INCLUDE_ISR_TRACING\r
- *\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
- *\r
- * If this is zero (0), the code for recording Interrupt Service Routines is \r
- * excluded to reduce code size.\r
- * \r
- * Note, if the kernel has no central interrupt dispatcher, recording ISRs \r
- * require that you insert calls to vTraceStoreISRBegin and vTraceStoreISREnd \r
- * in your interrupt handlers.\r
- *****************************************************************************/\r
-#define INCLUDE_ISR_TRACING 1\r
-\r
-/******************************************************************************\r
- * INCLUDE_OBJECT_DELETE\r
- * \r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
- *\r
- * This must be enabled (1) if tasks, queues or other \r
- * traced kernel objects are deleted at runtime. If no deletes are made, this \r
- * can be set to 0 in order to exclude the delete-handling code.\r
- *****************************************************************************/\r
-#define INCLUDE_OBJECT_DELETE 0\r
-\r
-/******************************************************************************\r
- * CONFIGURATION RELATED TO BEHAVIOR\r
- *****************************************************************************/\r
-\r
-/******************************************************************************\r
- * TRACE_RECORDER_STORE_MODE\r
- *\r
- * Macro which should be defined as one of:\r
- * - TRACE_STORE_MODE_RING_BUFFER\r
- * - TRACE_STORE_MODE_STOP_WHEN_FULL\r
- * Default is TRACE_STORE_MODE_RING_BUFFER.\r
- *\r
- * With TRACE_RECORDER_STORE_MODE set to TRACE_STORE_MODE_RING_BUFFER, the events are \r
- * stored in a ring buffer, i.e., where the oldest events are overwritten when \r
- * the buffer becomes full. This allows you to get the last events leading up \r
- * to an interesting state, e.g., an error, without having a large trace buffer\r
- * for string the whole run since startup. In this mode, the recorder can run\r
- * "forever" as the buffer never gets full, i.e., in the sense that it always\r
- * has room for more events.\r
- *\r
- * To fetch the trace in mode TRACE_STORE_MODE_RING_BUFFER, you need to first halt the\r
- * system using your debugger and then do a RAM dump, or to explicitly stop the\r
- * recorder using vTraceStop() and then store/upload the trace data using a\r
- * task that you need to provide yourself. The trace data is found in the struct\r
- * RecorderData, initialized in trcBase.c.\r
- *\r
- * Note that, if you upload the trace using a RAM dump, i.e., when the system is \r
- * halted on a breakpoint or by a debugger command, there is no need to stop the \r
- * recorder first.\r
- *\r
- * When TRACE_RECORDER_STORE_MODE is TRACE_STORE_MODE_STOP_WHEN_FULL, the recording is\r
- * stopped when the buffer becomes full. When the recorder stops itself this way\r
- * vTracePortEnd() is called which allows for custom actions, such as triggering\r
- * a task that stores the trace buffer, i.e., in case taking a RAM dump\r
- * using an on-chip debugger is not possible. In the Windows port, vTracePortEnd\r
- * saves the trace to file directly, but this is not recommended in a real-time\r
- * system since the scheduler is blocked during the processing of vTracePortEnd.\r
- *****************************************************************************/\r
-\r
-#define TRACE_RECORDER_STORE_MODE TRACE_STORE_MODE_RING_BUFFER\r
-\r
-/******************************************************************************\r
- * STOP_AFTER_N_EVENTS\r
- *\r
- * Macro which should be defined as an integer value, or not defined.\r
- * Default is -1\r
- *\r
- * STOP_AFTER_N_EVENTS is intended for tests of the ring buffer mode (when\r
- * RECORDER_STORE_MODE is STORE_MODE_RING_BUFFER). It stops the recording when\r
- * the specified number of events has been observed. This value can be larger\r
- * than the buffer size, to allow for test of the "wrapping around" that occurs\r
- * in ring buffer mode . A negative value (or no definition of this macro)\r
- * disables this feature.\r
- *****************************************************************************/\r
-#define STOP_AFTER_N_EVENTS -1\r
-\r
-/******************************************************************************\r
- * USE_IMPLICIT_IFE_RULES\r
- *\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
- *\r
- * ### Instance Finish Events (IFE) ###\r
- *\r
- * For tasks with "infinite" main loops (non-terminating tasks), the concept\r
- * of a task instance has no clear definition, it is an application-specific\r
- * thing. Tracealyzer allows you to define Instance Finish Events (IFEs),\r
- * which marks the point in a cyclic task when the "task instance" ends.\r
- * The IFE is a blocking kernel call, typically in the main loop of a task\r
- * which typically reads a message queue, waits for a semaphore or performs\r
- * an explicit delay.\r
- *\r
- * If USE_IMPLICIT_IFE_RULES is one (1), the kernel macros (trcKernelPort.h)\r
- * will define what kernel calls are considered by default to be IFEs.\r
- *\r
- * However, Implicit IFEs only applies to blocking kernel calls. If a\r
- * service reads a message without blocking, it does not create a new\r
- * instance since no blocking occurred.\r
- *\r
- * Moreover, the actual IFE might sometimes be another blocking call. We \r
- * therefore allow for user-defined Explicit IFEs by calling\r
- *\r
- * vTraceTaskInstanceIsFinished()\r
- *\r
- * right before the kernel call considered as IFE. This does not create an\r
- * additional event but instead stores the service code and object handle\r
- * of the IFE call as properties of the task.\r
- *\r
- * If using Explicit IFEs and the task also calls an Implicit IFE, this may \r
- * result in additional incorrect task instances.\r
- * This is solved by disabling the Implicit IFEs for the task, by adding\r
- * a call to\r
- * \r
- * vTraceTaskSkipDefaultInstanceFinishedEvents()\r
- * \r
- * in the very beginning of that task. This allows you to combine Explicit IFEs\r
- * for some tasks with Implicit IFEs for the rest of the tasks, if\r
- * USE_IMPLICIT_IFE_RULES is 1.\r
- *\r
- * By setting USE_IMPLICIT_IFE_RULES to zero (0), the implicit IFEs are disabled\r
- * for all tasks. Tasks will then be considered to have a single instance only, \r
- * covering all execution fragments, unless you define an explicit IFE in each\r
- * task by calling vTraceTaskInstanceIsFinished before the blocking call.\r
- *****************************************************************************/\r
-#define USE_IMPLICIT_IFE_RULES 1\r
-\r
-/******************************************************************************\r
- * INCLUDE_SAVE_TO_FILE\r
- *\r
- * Macro which should be defined as either zero (0) or one (1).\r
- * Default is 0.\r
- *\r
- * If enabled (1), the recorder will include code for saving the trace\r
- * to a local file system.\r
- ******************************************************************************/\r
-#ifdef WIN32\r
- #define INCLUDE_SAVE_TO_FILE 1\r
-#else\r
- #define INCLUDE_SAVE_TO_FILE 0\r
-#endif\r
-\r
-/******************************************************************************\r
- * TRACE_PROGRESS_MONITOR_TASK_PRIORITY\r
- *\r
- * Macro which sets the priority of the "recorder status monitor" task.\r
- *\r
- * This task, vTraceMonitorTask in trcUser.c, periodically writes\r
- * the recorder status using the vTraceConsoleMessage macro, which is to\r
- * be mapped to your console "printf" routine. The task is named TraceMon but \r
- * is intentionally excluded from the demo trace.\r
- *\r
- * Default is tskIDLE_PRIORITY + 1\r
- * Note that if your system constantly has a high CPU load from high-priority \r
- * tasks, this might not be get a chance to execute.\r
- * \r
- * See vTraceMonitorTask in trcUser.c\r
- *****************************************************************************/\r
-#define TRACE_PROGRESS_MONITOR_TASK_PRIORITY (tskIDLE_PRIORITY + 1)\r
-\r
-/******************************************************************************\r
- * TRACE_PROGRESS_MONITOR_TASK_STACKSIZE\r
- *\r
- * Macro which sets the stack size of the "recorder status monitor" task.\r
- *\r
- * This task, vTraceMonitorTask in trcUser.c, periodically writes\r
- * the recorder status using the vTraceConsoleMessage macro, which is to\r
- * be mapped to your console "printf" routine. The task is intentionally \r
- * excluded from the demo trace.\r
- *\r
- * See vTraceMonitorTask in trcUser.c\r
- *****************************************************************************/\r
-#define TRACE_PROGRESS_MONITOR_TASK_STACKSIZE 500\r
-\r
-/******************************************************************************\r
- * TRACE_PROGRESS_MONITOR_TASK_PERIOD\r
- *\r
- * Macro which sets the period of the "recorder status monitor" task.\r
- *\r
- * This task, vTraceMonitorTask in trcUser.c, periodically writes\r
- * the recorder status using the vTraceConsoleMessage macro, which is to\r
- * be mapped to your console "printf" routine. The task is named TraceMon but \r
- * is intentionally excluded from the demo trace.\r
- *\r
- * Default is 1000 ticks (typically 1 second). On the Windows port, a lower \r
- * value is suggested since the Windows port runs very slowly, often 20-40\r
- * times slower than the simulated time.\r
- *\r
- * See vTraceMonitorTask in trcUser.c\r
- *****************************************************************************/\r
-#ifdef WIN32\r
- #define TRACE_PROGRESS_MONITOR_TASK_PERIOD 100\r
-#else\r
- #define TRACE_PROGRESS_MONITOR_TASK_PERIOD 1000\r
-#endif\r
-\r
-/******************************************************************************\r
- * TEAM_LICENSE_CODE\r
- *\r
- * Macro which defines a string - the team license code.\r
- * If no team license is available, this should be an empty string "".\r
- * This should be maximum 32 chars, including zero-termination.\r
- *****************************************************************************/\r
-#define TEAM_LICENSE_CODE ""\r
-\r
-#endif\r
-\r
+++ /dev/null
-/******************************************************************************* \r
- * Tracealyzer v2.4.1 Recorder Library\r
- * Percepio AB, www.percepio.com\r
- *\r
- * trcHardwarePort.h\r
- *\r
- * Contains together with trcHardwarePort.c all hardware portability issues of \r
- * the trace recorder library.\r
- *\r
- * Terms of Use\r
- * This software is copyright Percepio AB. The recorder library is free for\r
- * use together with Percepio products. You may distribute the recorder library\r
- * in its original form, including modifications in trcPort.c and trcPort.h\r
- * given that these modification are clearly marked as your own modifications\r
- * and documented in the initial comment section of these source files. \r
- * This software is the intellectual property of Percepio AB and may not be \r
- * sold or in other ways commercially redistributed without explicit written \r
- * permission by Percepio AB.\r
- *\r
- * Disclaimer \r
- * The trace tool and recorder library is being delivered to you AS IS and \r
- * Percepio AB makes no warranty as to its use or performance. Percepio AB does \r
- * not and cannot warrant the performance or results you may obtain by using the \r
- * software or documentation. Percepio AB make no warranties, express or \r
- * implied, as to noninfringement of third party rights, merchantability, or \r
- * fitness for any particular purpose. In no event will Percepio AB, its \r
- * technology partners, or distributors be liable to you for any consequential, \r
- * incidental or special damages, including any lost profits or lost savings, \r
- * even if a representative of Percepio AB has been advised of the possibility \r
- * of such damages, or for any claim by any third party. Some jurisdictions do \r
- * not allow the exclusion or limitation of incidental, consequential or special \r
- * damages, or the exclusion of implied warranties or limitations on how long an \r
- * implied warranty may last, so the above limitations may not apply to you.\r
- *\r
- * Copyright Percepio AB, 2013.\r
- * www.percepio.com\r
- ******************************************************************************/\r
-\r
-#ifndef TRCPORT_H\r
-#define TRCPORT_H\r
-\r
-#include "trcKernelPort.h"\r
-\r
-/* If Win32 port */\r
-#ifdef WIN32\r
-\r
- #undef _WIN32_WINNT\r
- #define _WIN32_WINNT 0x0600\r
-\r
- /* Standard includes. */\r
- #include <stdio.h>\r
- #include <windows.h>\r
- #include <direct.h>\r
-\r
-/*******************************************************************************\r
- * The Win32 port by default saves the trace to file and then kills the\r
- * program when the recorder is stopped, to facilitate quick, simple tests\r
- * of the recorder.\r
- ******************************************************************************/\r
- #define WIN32_PORT_SAVE_WHEN_STOPPED 1\r
- #define WIN32_PORT_EXIT_WHEN_STOPPED 1\r
-\r
-#endif\r
-\r
-#define DIRECTION_INCREMENTING 1\r
-#define DIRECTION_DECREMENTING 2\r
-\r
-/******************************************************************************\r
- * Supported ports\r
- * \r
- * PORT_HWIndependent\r
- * A hardware independent fallback option for event timestamping. Provides low \r
- * resolution timestamps based on the OS tick.\r
- * This may be used on the Win32 port, but may also be used on embedded hardware \r
- * platforms. All time durations will be truncated to the OS tick frequency, \r
- * typically 1 KHz. This means that a task or ISR that executes in less than \r
- * 1 ms get an execution time of zero.\r
- *\r
- * PORT_Win32\r
- * "Accurate" timestamping based on the Windows performance counter. Note that\r
- * this gives the host machine time.\r
- *\r
- * Officially supported hardware timer ports:\r
- * - PORT_Atmel_AT91SAM7\r
- * - PORT_Atmel_UC3A0\r
- * - PORT_ARM_CortexM \r
- * - PORT_Renesas_RX600\r
- * - PORT_Microchip_dsPIC_AND_PIC24\r
- *\r
- * We also provide several "unofficial" hardware-specific ports. There have \r
- * been developed by external contributors, and have not yet been verified \r
- * by Percepio AB. Let us know if you have problems getting these to work.\r
- * \r
- * Unofficial hardware specific ports provided are:\r
- * - PORT_TEXAS_INSTRUMENTS_TMS570\r
- * - PORT_TEXAS_INSTRUMENTS_MSP430\r
- * - PORT_MICROCHIP_PIC32\r
- * - PORT_XILINX_PPC405\r
- * - PORT_XILINX_PPC440\r
- * - PORT_XILINX_MICROBLAZE\r
- * - PORT_NXP_LPC210X\r
- *\r
- *****************************************************************************/\r
-\r
-#define PORT_NOT_SET -1\r
-\r
-/*** Officially supported hardware timer ports *******************************/\r
-#define PORT_HWIndependent 0\r
-#define PORT_Win32 1\r
-#define PORT_Atmel_AT91SAM7 2\r
-#define PORT_Atmel_UC3A0 3\r
-#define PORT_ARM_CortexM 4\r
-#define PORT_Renesas_RX600 5\r
-#define PORT_Microchip_dsPIC_AND_PIC24 6\r
-\r
-/*** Unofficial ports, provided by external developers, not yet verified *****/\r
-#define PORT_TEXAS_INSTRUMENTS_TMS570 7\r
-#define PORT_TEXAS_INSTRUMENTS_MSP430 8\r
-#define PORT_MICROCHIP_PIC32 9\r
-#define PORT_XILINX_PPC405 10\r
-#define PORT_XILINX_PPC440 11\r
-#define PORT_XILINX_MICROBLAZE 12\r
-#define PORT_NXP_LPC210X 13\r
-\r
-/*** Select your port here! **************************************************/\r
-#define SELECTED_PORT PORT_ARM_CortexM\r
-/*****************************************************************************/\r
-\r
-#if (SELECTED_PORT == PORT_NOT_SET) \r
-#error "You need to define SELECTED_PORT here!"\r
-#endif\r
-\r
-/*******************************************************************************\r
- * IRQ_PRIORITY_ORDER\r
- *\r
- * Macro which should be defined as an integer of 0 or 1.\r
- *\r
- * This should be 0 if lower IRQ priority values implies higher priority \r
- * levels, such as on ARM Cortex M. If the opposite scheme is used, i.e., \r
- * if higher IRQ priority values means higher priority, this should be 1.\r
- *\r
- * This setting is not critical. It is used only to sort and colorize the \r
- * interrupts in priority order, in case you record interrupts using\r
- * the vTraceStoreISRBegin and vTraceStoreISREnd routines.\r
- *\r
- * We provide this setting for some hardware architectures below:\r
- * - ARM Cortex M: 0 (lower IRQ priority values are more significant)\r
- * - Atmel AT91SAM7x: 1 (higher IRQ priority values are more significant)\r
- * - Atmel AVR32: 1 (higher IRQ priority values are more significant)\r
- * - Renesas RX600: 1 (higher IRQ priority values are more significant)\r
- * - Microchip PIC24: 0 (lower IRQ priority values are more significant)\r
- * - Microchip dsPIC: 0 (lower IRQ priority values are more significant)\r
- * - TI TMS570: 0 (lower IRQ priority values are more significant)\r
- * - Freescale HCS08: 0 (lower IRQ priority values are more significant)\r
- * - Freescale HCS12: 0 (lower IRQ priority values are more significant)\r
- * - PowerPC 405: 0 (lower IRQ priority values are more significant)\r
- * - PowerPC 440: 0 (lower IRQ priority values are more significant)\r
- * - Freescale ColdFire: 1 (higher IRQ priority values are more significant)\r
- * - NXP LPC210x: 0 (lower IRQ priority values are more significant)\r
- * - MicroBlaze: 0 (lower IRQ priority values are more significant)\r
- *\r
- * If your chip is not on the above list, and you perhaps know this detail by \r
- * heart, please inform us by e-mail to support@percepio.com.\r
- *\r
- ******************************************************************************\r
- *\r
- * HWTC Macros \r
- *\r
- * These four HWTC macros provides a hardware isolation layer representing a \r
- * generic hardware timer/counter used for driving the operating system tick, \r
- * such as the SysTick feature of ARM Cortex M3/M4, or the PIT of the Atmel \r
- * AT91SAM7X.\r
- *\r
- * HWTC_COUNT: The current value of the counter. This is expected to be reset \r
- * a each tick interrupt. Thus, when the tick handler starts, the counter has \r
- * already wrapped.\r
- *\r
- * HWTC_COUNT_DIRECTION: Should be one of:\r
- * - DIRECTION_INCREMENTING - for hardware timer/counters of incrementing type\r
- * such as the PIT on Atmel AT91SAM7X.\r
- * When the counter value reach HWTC_PERIOD, it is reset to zero and the\r
- * interrupt is signaled.\r
- * - DIRECTION_DECREMENTING - for hardware timer/counters of decrementing type\r
- * such as the SysTick on ARM Cortex M3/M4 chips.\r
- * When the counter value reach 0, it is reset to HWTC_PERIOD and the\r
- * interrupt is signaled.\r
- *\r
- * HWTC_PERIOD: The number of increments or decrements of HWTC_COUNT between\r
- * two tick interrupts. This should preferably be mapped to the reload\r
- * register of the hardware timer, to make it more portable between chips in the \r
- * same family. The macro should in most cases be (reload register + 1).\r
- *\r
- * HWTC_DIVISOR: If the timer frequency is very high, like on the Cortex M chips\r
- * (where the SysTick runs at the core clock frequency), the "differential \r
- * timestamping" used in the recorder will more frequently insert extra XTS \r
- * events to store the timestamps, which increases the event buffer usage. \r
- * In such cases, to reduce the number of XTS events and thereby get longer \r
- * traces, you use HWTC_DIVISOR to scale down the timestamps and frequency.\r
- * Assuming a OS tick rate of 1 KHz, it is suggested to keep the effective timer\r
- * frequency below 65 MHz to avoid an excessive amount of XTS events. Thus, a\r
- * Cortex M chip running at 72 MHZ should use a HWTC_DIVISOR of 2, while a \r
- * faster chip require a higher HWTC_DIVISOR value. \r
- *\r
- * The HWTC macros and vTracePortGetTimeStamp is the main porting issue\r
- * or the trace recorder library. Typically you should not need to change\r
- * the code of vTracePortGetTimeStamp if using the HWTC macros.\r
- *\r
- ******************************************************************************/\r
-\r
-#if (SELECTED_PORT == PORT_Win32)\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (ulGetRunTimeCounterValue())\r
- #define HWTC_PERIOD 0\r
- #define HWTC_DIVISOR 1\r
- \r
- #define IRQ_PRIORITY_ORDER 1 // Please update according to your hardware...\r
-\r
-#elif (SELECTED_PORT == PORT_HWIndependent)\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT 0\r
- #define HWTC_PERIOD 1\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 1 // Please update according to your hardware...\r
-\r
-#elif (SELECTED_PORT == PORT_Atmel_AT91SAM7)\r
-\r
- /* HWTC_PERIOD is hardcoded for AT91SAM7X256-EK Board (48 MHz)\r
- A more generic solution is to get the period from pxPIT->PITC_PIMR */\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (AT91C_BASE_PITC->PITC_PIIR & 0xFFFFF)\r
- #define HWTC_PERIOD 2995 \r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 1 // higher IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_Atmel_UC3A0) \r
- \r
- /* For Atmel AVR32 (AT32UC3A) */\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT sysreg_read(AVR32_COUNT)\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ )\r
- #define HWTC_DIVISOR 1 \r
-\r
- #define IRQ_PRIORITY_ORDER 1 // higher IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_ARM_CortexM)\r
-\r
- /* For all chips using ARM Cortex M cores */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
- #define HWTC_COUNT (*((uint32_t*)0xE000E018))\r
- #define HWTC_PERIOD ((*(uint32_t*)0xE000E014) + 1)\r
- #define HWTC_DIVISOR 2\r
- \r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_Renesas_RX600) \r
-\r
- #include "iodefine.h"\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (CMT0.CMCNT)\r
- #define HWTC_PERIOD ((((TRACE_PERIPHERAL_CLOCK_HZ/TRACE_TICK_RATE_HZ)-1)/8))\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 1 // higher IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_Microchip_dsPIC_AND_PIC24) \r
-\r
- /* For Microchip PIC24 and dsPIC (16 bit) */\r
-\r
- /* Note: The trace library was originally designed for 32-bit MCUs, and is slower\r
- than intended on 16-bit MCUs. Storing an event on a PIC24 takes about 70 µs. \r
- In comparison, 32-bit MCUs are often 10-20 times faster. If recording overhead \r
- becomes a problem on PIC24, use the filters to exclude less interesting tasks \r
- or system calls. */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (TMR1)\r
- #define HWTC_PERIOD (PR1+1)\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_NXP_LPC210X)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
- \r
- /* Tested with LPC2106, but should work with most LPC21XX chips. */\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT *((uint32_t *)0xE0004008 )\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ ) \r
- #define HWTC_DIVISOR 1 \r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_TEXAS_INSTRUMENTS_TMS570)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- #define RTIFRC0 *((uint32_t *)0xFFFFFC10)\r
- #define RTICOMP0 *((uint32_t *)0xFFFFFC50)\r
- #define RTIUDCP0 *((uint32_t *)0xFFFFFC54)\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (RTIFRC0 - (RTICOMP0 - RTIUDCP0))\r
- #define HWTC_PERIOD (RTIUDCP0)\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_TEXAS_INSTRUMENTS_MSP430)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (TA0R)\r
- #define HWTC_PERIOD TRACE_CPU_CLOCKS_PER_TICK \r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 1 // higher IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_MICROCHIP_PIC32)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_INCREMENTING\r
- #define HWTC_COUNT (ReadTimer1()) /* Should be available in BSP */\r
- #define HWTC_PERIOD (ReadPeriod1()+1) /* Should be available in BSP */\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_XILINX_PPC405) \r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
- #define HWTC_COUNT mfspr( 0x3db)\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ )\r
- #define HWTC_DIVISOR 1\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT == PORT_XILINX_PPC440) \r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- /* This should work with most PowerPC chips */\r
- \r
- #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
- #define HWTC_COUNT mfspr( 0x016 )\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ )\r
- #define HWTC_DIVISOR 1 \r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
- \r
-#elif (SELECTED_PORT == PORT_XILINX_MICROBLAZE)\r
- /* UNOFFICIAL PORT - NOT YET VERIFIED BY PERCEPIO */\r
-\r
- /* This should work with most Microblaze configurations.\r
- * It uses the AXI Timer 0 - the tick interrupt source.\r
- * If an AXI Timer 0 peripheral is available on your hardware platform, no modifications are required.\r
- */\r
- #include "xtmrctr_l.h"\r
-\r
- #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING\r
- #define HWTC_COUNT XTmrCtr_GetTimerCounterReg( XPAR_TMRCTR_0_BASEADDR, 0 )\r
- #define HWTC_PERIOD ( TRACE_CPU_CLOCK_HZ / TRACE_TICK_RATE_HZ )\r
- #define HWTC_DIVISOR 16\r
-\r
- #define IRQ_PRIORITY_ORDER 0 // lower IRQ priority values are more significant\r
-\r
-#elif (SELECTED_PORT != PORT_NOT_SET)\r
-\r
- #error "SELECTED_PORT had unsupported value!"\r
- #define SELECTED_PORT PORT_NOT_SET\r
-\r
-#endif\r
-\r
-#if (SELECTED_PORT != PORT_NOT_SET)\r
- \r
- #ifndef HWTC_COUNT_DIRECTION\r
- #error "HWTC_COUNT_DIRECTION is not set!"\r
- #endif \r
- \r
- #ifndef HWTC_COUNT\r
- #error "HWTC_COUNT is not set!" \r
- #endif \r
- \r
- #ifndef HWTC_PERIOD\r
- #error "HWTC_PERIOD is not set!"\r
- #endif \r
- \r
- #ifndef HWTC_DIVISOR\r
- #error "HWTC_DIVISOR is not set!" \r
- #endif \r
- \r
- #ifndef IRQ_PRIORITY_ORDER\r
- #error "IRQ_PRIORITY_ORDER is not set!"\r
- #elif (IRQ_PRIORITY_ORDER != 0) && (IRQ_PRIORITY_ORDER != 1)\r
- #error "IRQ_PRIORITY_ORDER has bad value!"\r
- #endif \r
- \r
- #if (HWTC_DIVISOR < 1)\r
- #error "HWTC_DIVISOR must be a non-zero positive value!"\r
- #endif \r
-\r
-#endif\r
-/*******************************************************************************\r
- * vTraceConsoleMessage\r
- *\r
- * A wrapper for your system-specific console "printf" console output function.\r
- * This needs to be correctly defined to see status reports from the trace \r
- * status monitor task (this is defined in trcUser.c).\r
- ******************************************************************************/ \r
-#if (SELECTED_PORT == PORT_Atmel_AT91SAM7)\r
-/* Port specific includes */\r
-#include "console.h"\r
-#endif\r
-\r
-#define vTraceConsoleMessage(x)\r
-\r
-/*******************************************************************************\r
- * vTracePortGetTimeStamp\r
- *\r
- * Returns the current time based on the HWTC macros which provide a hardware\r
- * isolation layer towards the hardware timer/counter.\r
- *\r
- * The HWTC macros and vTracePortGetTimeStamp is the main porting issue\r
- * or the trace recorder library. Typically you should not need to change\r
- * the code of vTracePortGetTimeStamp if using the HWTC macros.\r
- *\r
- ******************************************************************************/\r
-void vTracePortGetTimeStamp(uint32_t *puiTimestamp);\r
-\r
-/*******************************************************************************\r
- * vTracePortEnd\r
- * \r
- * This function is called when the recorder is stopped due to full buffer.\r
- * Mainly intended to show a message in the console.\r
- * This is used by the Win32 port to store the trace to a file. The file path is\r
- * set using vTracePortSetFileName.\r
- ******************************************************************************/\r
-void vTracePortEnd(void);\r
-\r
-#if (INCLUDE_SAVE_TO_FILE == 1)\r
-\r
-/*******************************************************************************\r
- * vTracePortSetOutFile\r
- *\r
- * Sets the filename/path used in vTracePortSave.\r
- * This is set in a separate function, since the Win32 port calls vTracePortSave\r
- * in vTracePortEnd if WIN32_PORT_SAVE_WHEN_STOPPED is set.\r
- ******************************************************************************/\r
-void vTracePortSetOutFile(char* path);\r
-\r
-/******************************************************************************\r
- * vTracePortSave\r
- *\r
- * Saves the trace to a file on a target-side file system. The path is set in a \r
- * separate function, vTracePortSetOutFile, since the Win32 port may call\r
- * vTracePortSave in vTracePortEnd, if using WIN32_PORT_SAVE_WHEN_STOPPED.\r
- ******************************************************************************/\r
-void vTracePortSave(void);\r
-\r
-#else\r
-\r
-#define vTraceConsoleMessage(x)\r
-#define vTracePortSetOutFile(path)\r
-#define vTracePortSave(void)\r
-\r
-#endif\r
-\r
-#endif\r
/*******************************************************************************\r
- * FreeRTOS+Trace v2.3.0 Recorder Library\r
+ * Tracealyzer v2.6.0 Recorder Library\r
* Percepio AB, www.percepio.com\r
*\r
* trcConfig.h\r
* appropriate for your system, and if necessary adjust these. Most likely, you \r
* will need to adjust the NTask, NISR, NQueue, NMutex and NSemaphore values to \r
* reflect the number of such objects in your system. These may be \r
- * overapproximated, although larger values values implies more RAM usage.\r
+ * over-approximated, although larger values values implies more RAM usage.\r
*\r
* Terms of Use\r
* This software is copyright Percepio AB. The recorder library is free for\r
* use together with Percepio products. You may distribute the recorder library\r
- * in its original form, including modifications in trcPort.c and trcPort.h\r
+ * in its original form, including modifications in trcHardwarePort.c/.h\r
* given that these modification are clearly marked as your own modifications\r
* and documented in the initial comment section of these source files. \r
* This software is the intellectual property of Percepio AB and may not be \r
* damages, or the exclusion of implied warranties or limitations on how long an \r
* implied warranty may last, so the above limitations may not apply to you.\r
*\r
- * FreeRTOS+Trace is available as Free Edition and in two premium editions.\r
- * You may use the premium features during 30 days for evaluation.\r
- * Download FreeRTOS+Trace at http://www.percepio.com/products/downloads/\r
- *\r
- * Copyright Percepio AB, 2012.\r
+ * Copyright Percepio AB, 2013.\r
* www.percepio.com\r
******************************************************************************/\r
\r
* vTracePrintF may use multiple records depending on the number of data args.\r
******************************************************************************/\r
\r
- #define EVENT_BUFFER_SIZE 10000 /* Adjust wrt. to available RAM */\r
+#define EVENT_BUFFER_SIZE 10000 /* Adjust wrt. to available RAM */\r
+\r
+\r
+/*******************************************************************************\r
+ * USE_LINKER_PRAGMA\r
+ *\r
+ * Macro which should be defined as an integer value, default is 0.\r
+ *\r
+ * If this is 1, the header file "recorderdata_linker_pragma.h" is included just\r
+ * before the declaration of RecorderData (in trcBase.c), i.e., the trace data \r
+ * structure. This allows the user to specify a pragma with linker options. \r
+ *\r
+ * Example (for IAR Embedded Workbench and NXP LPC17xx):\r
+ * #pragma location="AHB_RAM_MEMORY"\r
+ * \r
+ * This example instructs the IAR linker to place RecorderData in another RAM \r
+ * bank, the AHB RAM. This can also be used for other compilers with a similar\r
+ * pragmas for linker options.\r
+ * \r
+ * Note that this only applies if using static allocation, see below.\r
+ ******************************************************************************/\r
+\r
+#define USE_LINKER_PRAGMA 0\r
+\r
\r
/*******************************************************************************\r
* SYMBOL_TABLE_SIZE\r
* stores User Events labels and names of deleted tasks, queues, or other kernel\r
* objects. Note that the names of active objects not stored here but in the \r
* Object Table. Thus, if you don't use User Events or delete any kernel \r
- * objects you set this to zero (0) to minimize RAM usage.\r
+ * objects you set this to a very low value, e.g. 4, but not zero (0) since \r
+ * this causes a declaration of a zero-sized array, for which the C compiler\r
+ * behavior is not standardized and may cause misaligned data.\r
******************************************************************************/\r
#define SYMBOL_TABLE_SIZE 1000\r
\r
+#if (SYMBOL_TABLE_SIZE == 0)\r
+#error "SYMBOL_TABLE_SIZE may not be zero!"\r
+#endif\r
+\r
+/*******************************************************************************\r
+ * USE_SEPARATE_USER_EVENT_BUFFER\r
+ *\r
+ * Macro which should be defined as an integer value.\r
+ * Default is zero (0).\r
+ *\r
+ * This enables and disables the use of the separate user event buffer.\r
+ *\r
+ * Note: When using the separate user event buffer, you may get an artificial\r
+ * task instance named "Unknown actor". This is added as a placeholder when the \r
+ * user event history is longer than the task scheduling history.\r
+ ******************************************************************************/\r
+#define USE_SEPARATE_USER_EVENT_BUFFER 0\r
+\r
+/*******************************************************************************\r
+ * USER_EVENT_BUFFER_SIZE\r
+ *\r
+ * Macro which should be defined as an integer value.\r
+ *\r
+ * This defines the capacity of the user event buffer, in number of slots.\r
+ * A single user event can use between 1 and X slots, depending on the data.\r
+ *\r
+ * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
+ ******************************************************************************/\r
+#define USER_EVENT_BUFFER_SIZE 500\r
+\r
+/*******************************************************************************\r
+ * USER_EVENT_CHANNELS\r
+ *\r
+ * Macro which should be defined as an integer value.\r
+ *\r
+ * This defines the number of allowed user event channels.\r
+ *\r
+ * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
+ ******************************************************************************/\r
+#define CHANNEL_FORMAT_PAIRS 32\r
+\r
/*******************************************************************************\r
* NTask, NISR, NQueue, NSemaphore, NMutex\r
*\r
*\r
* Using too small values will give an error message through the vTraceError\r
* routine, which makes the error message appear when opening the trace data\r
- * in FreeRTOS+Trace. If you are using the recorder status monitor task,\r
+ * in Tracealyzer. If you are using the recorder status monitor task,\r
* any error messages are displayed in console prints, assuming that the\r
* print macro has been defined properly (vConsolePrintMessage). \r
*\r
* It can be wise to start with very large values for these constants, \r
* unless you are very confident on these numbers. Then do a recording and\r
- * check the actual usage in FreeRTOS+Trace. This is shown by selecting\r
+ * check the actual usage in Tracealyzer. This is shown by selecting\r
* View -> Trace Details -> Resource Usage -> Object Table\r
* \r
- * NOTE 2: Remember to account for all tasks created by FreeRTOS, such as the \r
- * IDLE task, the FreeRTOS timer task, and any tasks created by other 3rd party \r
- * software components, such as communication stacks. The recorder also has an \r
- * optional monitor task to account for, if this is used.\r
+ * NOTE 2: Remember to account for all tasks and other objects created by \r
+ * the kernel, such as the IDLE task, any timer tasks, and any tasks created \r
+ * by other 3rd party software components, such as communication stacks.\r
* Moreover, one task slot is used to indicate "(startup)", i.e., a fictive \r
- * task that represent the time before the FreeRTOS scheduler starts. \r
+ * task that represent the time before the scheduler starts. \r
* NTask should thus be at least 2-3 slots larger than your application task count.\r
*\r
- * NOTE 3: The FreeRTOS timer task creates a Queue, that should be accounted \r
- * for in NQueue.\r
******************************************************************************/\r
#define NTask 15\r
#define NISR 4\r
#define NQueue 10\r
#define NSemaphore 10\r
#define NMutex 5\r
+#define NTimer 10\r
+#define NEventGroup 1\r
\r
/* Maximum object name length for each class (includes zero termination) */\r
#define NameLenTask configMAX_TASK_NAME_LEN\r
#define NameLenQueue 15\r
#define NameLenSemaphore 15\r
#define NameLenMutex 15\r
+#define NameLenTimer 15\r
+#define NameLenEventGroup 15\r
\r
/******************************************************************************\r
* TRACE_DESCRIPTION\r
*\r
* Macro which should be defined as a string.\r
*\r
- * This string is stored in the trace and displayed in FreeRTOS+Trace. Can be\r
+ * This string is stored in the trace and displayed in Tracealyzer. Can be\r
* used to store, e.g., system version or build date. This is also used to store\r
* internal error messages from the recorder, which if occurs overwrites the\r
* value defined here. This may be maximum 256 chars.\r
* CONFIGURATION REGARDING WHAT CODE/FEATURES TO INCLUDE\r
*****************************************************************************/\r
\r
+/******************************************************************************\r
+ * USE_TRACE_ASSERT\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1). \r
+ * Default is 0.\r
+ *\r
+ * If this is one (1), the TRACE_ASSERT macro will verify that a condition is \r
+ * true. If the condition is false, vTraceError() will be called.\r
+ *****************************************************************************/\r
+#define USE_TRACE_ASSERT 1\r
+\r
/******************************************************************************\r
* INCLUDE_FLOAT_SUPPORT\r
*\r
* Note: vTracePrintF can still be used with integer and string arguments in\r
* either case.\r
*****************************************************************************/\r
-#define INCLUDE_FLOAT_SUPPORT 1\r
+#define INCLUDE_FLOAT_SUPPORT 0\r
\r
/******************************************************************************\r
* INCLUDE_USER_EVENTS\r
* much faster than a printf and can therefore be used in timing critical code.\r
* See vTraceUserEvent() and vTracePrintF() in trcUser.h\r
* \r
- * Note that FreeRTOS+Trace Standard Edition or Professional Edition is required\r
- * for User Events, they are not displayed in FreeRTOS+Trace Free Edition.\r
+ * Note that User Events are not displayed in FreeRTOS+Trace Free Edition.\r
*****************************************************************************/\r
#define INCLUDE_USER_EVENTS 1\r
\r
*****************************************************************************/\r
#define INCLUDE_READY_EVENTS 1\r
\r
+/*****************************************************************************\r
+ * INCLUDE_NEW_TIME_EVENTS\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1). \r
+ * Default is 0.\r
+ *\r
+ * If this is zero (1), events will be generated whenever the os clock is\r
+ * increased.\r
+ *****************************************************************************/\r
+#define INCLUDE_NEW_TIME_EVENTS 0\r
+\r
/*****************************************************************************\r
* INCLUDE_ISR_TRACING\r
*\r
* Default is 1.\r
*\r
* If this is zero (0), the code for recording Interrupt Service Routines is \r
- * excluded to reduce code size. Note, recording ISRs require that you insert\r
- * calls to vTraceStoreISRBegin and vTraceStoreISREnd in your interrupt handlers.\r
- * There is no automatic recording of ISRs like for task scheduling, since \r
- * FreeRTOS does not have a central interrupt dispatcher.\r
+ * excluded to reduce code size.\r
+ * \r
+ * Note, if the kernel has no central interrupt dispatcher, recording ISRs \r
+ * require that you insert calls to vTraceStoreISRBegin and vTraceStoreISREnd \r
+ * in your interrupt handlers.\r
*****************************************************************************/\r
#define INCLUDE_ISR_TRACING 1\r
\r
* Default is 1.\r
*\r
* This must be enabled (1) if tasks, queues or other \r
- * traced kernel objects are deleted at runtime, e.g., using vTaskDelete or \r
- * vQueueDelete. If no deletes are made, this can be set to 0 in order to\r
- * exclude the delete-handling code. \r
+ * traced kernel objects are deleted at runtime. If no deletes are made, this \r
+ * can be set to 0 in order to exclude the delete-handling code.\r
*****************************************************************************/\r
#ifdef INCLUDE_OBJECT_DELETE\r
#undef INCLUDE_OBJECT_DELETE\r
\r
#define INCLUDE_OBJECT_DELETE 1\r
\r
+/******************************************************************************\r
+ * INCLUDE_MEMMANG_EVENTS\r
+ * \r
+ * Macro which should be defined as either zero (0) or one (1). \r
+ * Default is 1.\r
+ *\r
+ * This controls if malloc and free calls should be traced. Set this to zero to\r
+ * exclude malloc/free calls from the tracing.\r
+ *****************************************************************************/\r
+#define INCLUDE_MEMMANG_EVENTS 0\r
+\r
/******************************************************************************\r
* CONFIGURATION RELATED TO BEHAVIOR\r
*****************************************************************************/\r
\r
/******************************************************************************\r
- * RECORDER_STORE_MODE\r
+ * TRACE_RECORDER_STORE_MODE\r
*\r
* Macro which should be defined as one of:\r
- * - STORE_MODE_RING_BUFFER\r
- * - STORE_MODE_STOP_WHEN_FULL\r
- * Default is STORE_MODE_RING_BUFFER.\r
- *\r
- * With RECORDER_STORE_MODE set to STORE_MODE_RING_BUFFER, the events are stored\r
- * in a ring buffer, i.e., where the oldest events are overwritten when the\r
- * buffer becomes full. This allows you to get the last events leading up to an\r
- * interesting state, e.g., an error, without having a large trace buffer for\r
- * string the whole run since startup. In this mode, the recorder can run\r
+ * - TRACE_STORE_MODE_RING_BUFFER\r
+ * - TRACE_STORE_MODE_STOP_WHEN_FULL\r
+ * Default is TRACE_STORE_MODE_RING_BUFFER.\r
+ *\r
+ * With TRACE_RECORDER_STORE_MODE set to TRACE_STORE_MODE_RING_BUFFER, the events are \r
+ * stored in a ring buffer, i.e., where the oldest events are overwritten when \r
+ * the buffer becomes full. This allows you to get the last events leading up \r
+ * to an interesting state, e.g., an error, without having a large trace buffer\r
+ * for string the whole run since startup. In this mode, the recorder can run\r
* "forever" as the buffer never gets full, i.e., in the sense that it always\r
* has room for more events.\r
*\r
- * To fetch the trace in mode STORE_MODE_RING_BUFFER, you need to first halt the\r
+ * To fetch the trace in mode TRACE_STORE_MODE_RING_BUFFER, you need to first halt the\r
* system using your debugger and then do a RAM dump, or to explicitly stop the\r
* recorder using vTraceStop() and then store/upload the trace data using a\r
- * FreeRTOS task that you need to provide yourself. The trace data is found in\r
- * the struct RecorderData, initialized in trcBase.c.\r
+ * task that you need to provide yourself. The trace data is found in the struct\r
+ * RecorderData, initialized in trcBase.c.\r
*\r
* Note that, if you upload the trace using a RAM dump, i.e., when the system is \r
* halted on a breakpoint or by a debugger command, there is no need to stop the \r
* recorder first.\r
*\r
- * When RECORDER_STORE_MODE is STORE_MODE_STOP_WHEN_FULL, the recording is\r
+ * When TRACE_RECORDER_STORE_MODE is TRACE_STORE_MODE_STOP_WHEN_FULL, the recording is\r
* stopped when the buffer becomes full. When the recorder stops itself this way\r
* vTracePortEnd() is called which allows for custom actions, such as triggering\r
* a task that stores the trace buffer, i.e., in case taking a RAM dump\r
* saves the trace to file directly, but this is not recommended in a real-time\r
* system since the scheduler is blocked during the processing of vTracePortEnd.\r
*****************************************************************************/\r
-#ifndef WIN32\r
-#define RECORDER_STORE_MODE STORE_MODE_RING_BUFFER\r
-#else\r
-/* Default in the Win32 demo */\r
-#define RECORDER_STORE_MODE STORE_MODE_STOP_WHEN_FULL\r
-#endif\r
+\r
+#define TRACE_RECORDER_STORE_MODE TRACE_STORE_MODE_RING_BUFFER\r
\r
/******************************************************************************\r
* STOP_AFTER_N_EVENTS\r
*\r
* For tasks with "infinite" main loops (non-terminating tasks), the concept\r
* of a task instance has no clear definition, it is an application-specific\r
- * thing. FreeRTOS+Trace allows you to define Instance Finish Events (IFEs),\r
+ * thing. Tracealyzer allows you to define Instance Finish Events (IFEs),\r
* which marks the point in a cyclic task when the "task instance" ends.\r
* The IFE is a blocking kernel call, typically in the main loop of a task\r
* which typically reads a message queue, waits for a semaphore or performs\r
* an explicit delay.\r
*\r
- * If USE_IMPLICIT_IFE_RULES is one (1), the following FreeRTOS kernel calls\r
- * are considered by default to be IFEs (Implicit IFEs):\r
- * - vTaskDelay\r
- * - vTaskDelayUntil\r
- * - vTaskSuspend\r
- * - xQueueReceive (blocking cases only)\r
- * - xSemaphoreTake (blocking cases only)\r
+ * If USE_IMPLICIT_IFE_RULES is one (1), the kernel macros (trcKernelPort.h)\r
+ * will define what kernel calls are considered by default to be IFEs.\r
*\r
- * However, Implicit IFEs only applies to blocking kernel calls. If an\r
- * xQueueReceive reads a message without blocking, it does not create a new\r
+ * However, Implicit IFEs only applies to blocking kernel calls. If a\r
+ * service reads a message without blocking, it does not create a new\r
* instance since no blocking occurred.\r
*\r
- * Moreover, the actual IFE might sometimes be another blocking call such as\r
- * xQueueSend or xSemaphoreGive. We therefore allow for user-defined\r
- * Explicit IFEs by calling\r
+ * Moreover, the actual IFE might sometimes be another blocking call. We \r
+ * therefore allow for user-defined Explicit IFEs by calling\r
*\r
* vTraceTaskInstanceIsFinished()\r
*\r
* additional event but instead stores the service code and object handle\r
* of the IFE call as properties of the task.\r
*\r
- * If using Explicit IFEs and the task also calls an Implicit IFE like\r
- * vTaskDelay, this may result in additional incorrect task instances.\r
+ * If using Explicit IFEs and the task also calls an Implicit IFE, this may \r
+ * result in additional incorrect task instances.\r
* This is solved by disabling the Implicit IFEs for the task, by adding\r
* a call to\r
* \r
*****************************************************************************/\r
#define USE_IMPLICIT_IFE_RULES 1\r
\r
+\r
/******************************************************************************\r
- * INCLUDE_SAVE_TO_FILE\r
+ * USE_16BIT_OBJECT_HANDLES\r
*\r
* Macro which should be defined as either zero (0) or one (1).\r
* Default is 0.\r
*\r
- * If enabled (1), the recorder will include code for saving the trace\r
- * to a local file system.\r
- ******************************************************************************/\r
-#ifdef WIN32\r
- #define INCLUDE_SAVE_TO_FILE 1\r
-#else\r
- #define INCLUDE_SAVE_TO_FILE 0\r
-#endif\r
-\r
-/******************************************************************************\r
- * TRACE_PROGRESS_MONITOR_TASK_PRIORITY\r
- *\r
- * Macro which sets the priority of the "recorder status monitor" task.\r
- *\r
- * This task, vTraceMonitorTask in trcUser.c, periodically writes\r
- * the recorder status using the vTraceConsoleMessage macro, which is to\r
- * be mapped to your console "printf" routine. The task is named TraceMon but \r
- * is intentionally excluded from the demo trace.\r
+ * If set to 0 (zero), the recorder uses 8-bit handles to identify kernel \r
+ * objects such as tasks and queues. This limits the supported number of\r
+ * concurrently active objects to 255 of each type (object class).\r
*\r
- * Default is tskIDLE_PRIORITY + 1\r
- * Note that if your system constantly has a high CPU load from high-priority \r
- * tasks, this might not be get a chance to execute.\r
+ * If set to 1 (one), the recorder uses 16-bit handles to identify kernel \r
+ * objects such as tasks and queues. This limits the supported number of\r
+ * concurrent objects to 65535 of each type (object class). However, since the\r
+ * object property table is limited to 64 KB, the practical limit is about\r
+ * 3000 objects in total. \r
* \r
- * See vTraceMonitorTask in trcUser.c\r
+ * NOTE: An object with a high ID (> 255) will generate an extra event \r
+ * (= 4 byte) in the event buffer. \r
+ * \r
+ * NOTE: Some internal tables in the recorder gets larger when using 16-bit \r
+ * handles. The additional RAM usage is 5-10 byte plus 1 byte per kernel object\r
+ *, i.e., task, queue, semaphore, mutex, etc.\r
*****************************************************************************/\r
-#define TRACE_PROGRESS_MONITOR_TASK_PRIORITY (tskIDLE_PRIORITY + 1)\r
+#define USE_16BIT_OBJECT_HANDLES 0\r
\r
-/******************************************************************************\r
- * TRACE_PROGRESS_MONITOR_TASK_STACKSIZE\r
- *\r
- * Macro which sets the stack size of the "recorder status monitor" task.\r
- *\r
- * This task, vTraceMonitorTask in trcUser.c, periodically writes\r
- * the recorder status using the vTraceConsoleMessage macro, which is to\r
- * be mapped to your console "printf" routine. The task is intentionally \r
- * excluded from the demo trace.\r
- *\r
- * See vTraceMonitorTask in trcUser.c\r
- *****************************************************************************/\r
-#define TRACE_PROGRESS_MONITOR_TASK_STACKSIZE 500\r
+/****** Port Name ******************** Code ** Official ** OS Platform ******\r
+* PORT_APPLICATION_DEFINED -2 - - \r
+* PORT_NOT_SET -1 - - \r
+* PORT_HWIndependent 0 Yes Any \r
+* PORT_Win32 1 Yes FreeRTOS Win32\r
+* PORT_Atmel_AT91SAM7 2 No Any \r
+* PORT_Atmel_UC3A0 3 No Any \r
+* PORT_ARM_CortexM 4 Yes Any \r
+* PORT_Renesas_RX600 5 Yes Any \r
+* PORT_Microchip_dsPIC_AND_PIC24 6 Yes Any \r
+* PORT_TEXAS_INSTRUMENTS_TMS570 7 No Any \r
+* PORT_TEXAS_INSTRUMENTS_MSP430 8 No Any \r
+* PORT_MICROCHIP_PIC32 9 No Any \r
+* PORT_XILINX_PPC405 10 No FreeRTOS \r
+* PORT_XILINX_PPC440 11 No FreeRTOS \r
+* PORT_XILINX_MICROBLAZE 12 No Any \r
+* PORT_NXP_LPC210X 13 No Any \r
+*****************************************************************************/\r
+#define SELECTED_PORT PORT_ARM_CortexM\r
\r
-/******************************************************************************\r
- * TRACE_PROGRESS_MONITOR_TASK_PERIOD\r
- *\r
- * Macro which sets the period of the "recorder status monitor" task.\r
- *\r
- * This task, vTraceMonitorTask in trcUser.c, periodically writes\r
- * the recorder status using the vTraceConsoleMessage macro, which is to\r
- * be mapped to your console "printf" routine. The task is named TraceMon but \r
- * is intentionally excluded from the demo trace.\r
- *\r
- * Default is 1000 FreeRTOS ticks (typically 1 second). On the Windows port, a \r
- * lower value is suggested since the Windows port runs very slowly, often 20-40\r
- * times slower than the simulated FreeRTOS time.\r
- *\r
- * See vTraceMonitorTask in trcUser.c\r
- *****************************************************************************/\r
-#ifdef WIN32\r
- #define TRACE_PROGRESS_MONITOR_TASK_PERIOD 100\r
-#else\r
- #define TRACE_PROGRESS_MONITOR_TASK_PERIOD 1000\r
+#if (SELECTED_PORT == PORT_NOT_SET)\r
+#error "You need to define SELECTED_PORT here!"\r
#endif\r
\r
/******************************************************************************\r
- * TEAM_LICENSE_CODE\r
- *\r
- * Macro which defines a string - the team license code.\r
- * If no team license is available, this should be an empty string "".\r
- * This should be maximum 32 chars, including zero-termination.\r
- *****************************************************************************/\r
-#define TEAM_LICENSE_CODE ""\r
+* USE_PRIMASK_CS (for Cortex M devices only)\r
+*\r
+* An integer constant that selects between two options for the critical\r
+* sections of the recorder library.\r
+ *\r
+* 0: The default FreeRTOS critical section (BASEPRI) - default setting\r
+* 1: Always disable ALL interrupts (using PRIMASK)\r
+ *\r
+* Option 0 uses the standard FreeRTOS macros for critical sections.\r
+* However, on Cortex-M devices they only disable interrupts with priorities \r
+* below a certain configurable level, while higher priority ISRs remain active.\r
+* Such high-priority ISRs may not use the recorder functions in this mode.\r
+*\r
+* Option 1 allows you to safely call the recorder from any ISR, independent of \r
+* the interrupt priority. This mode may however cause higher IRQ latencies\r
+* (some microseconds) since ALL configurable interrupts are disabled during \r
+* the recorder's critical sections in this mode, using the PRIMASK register.\r
+ ******************************************************************************/\r
+#define USE_PRIMASK_CS 0\r
+\r
+/******************************************************************************\r
+* HEAP_SIZE_BELOW_16M\r
+*\r
+* An integer constant that can be used to reduce the buffer usage of memory\r
+* allocation events (malloc/free). This value should be 1 if the heap size is \r
+* below 16 MB (2^24 byte), and you can live with addresses truncated to the \r
+* lower 24 bit. Otherwise set it to 0 to get the full 32-bit addresses.\r
+******************************************************************************/\r
+#define HEAP_SIZE_BELOW_16M 0\r
\r
#endif\r
\r