diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-02-16 14:08:44 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-02-16 14:08:44 +0000 |
commit | e9990f73ef2625764f7cc12210ce5704ebfcdaa2 (patch) | |
tree | de980372545b0fde648a6dd016b54f5b69fe1240 /demos/SPC5 | |
parent | a739e4e7abaf487e57647788fc93ca5e11727bbb (diff) | |
download | ChibiOS-e9990f73ef2625764f7cc12210ce5704ebfcdaa2.tar.gz ChibiOS-e9990f73ef2625764f7cc12210ce5704ebfcdaa2.tar.bz2 ChibiOS-e9990f73ef2625764f7cc12210ce5704ebfcdaa2.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8905 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/SPC5')
-rw-r--r-- | demos/SPC5/NIL-SPC560D-EVB/Makefile | 2 | ||||
-rw-r--r-- | demos/SPC5/NIL-SPC560D-EVB/chconf.h | 274 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC560B-EVB/Makefile | 6 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC560B-EVB/chconf.h | 44 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC560D-EVB/Makefile | 2 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC560P-EVB/Makefile | 6 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC560P-EVB/chconf.h | 44 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC563M-EVB/Makefile | 6 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC563M-EVB/chconf.h | 44 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC564A-EVB/Makefile | 6 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC564A-EVB/chconf.h | 44 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC56EC-EVB/Makefile | 6 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC56EC-EVB/chconf.h | 44 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC56EL-EVB/Makefile | 6 | ||||
-rw-r--r-- | demos/SPC5/RT-SPC56EL-EVB/chconf.h | 44 |
15 files changed, 516 insertions, 62 deletions
diff --git a/demos/SPC5/NIL-SPC560D-EVB/Makefile b/demos/SPC5/NIL-SPC560D-EVB/Makefile index 810804d03..79707db73 100644 --- a/demos/SPC5/NIL-SPC560D-EVB/Makefile +++ b/demos/SPC5/NIL-SPC560D-EVB/Makefile @@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC560Dxx/platform.mk include $(CHIBIOS)/os/hal/osal/nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk
-include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/port.mk
+include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/port.mk
# Other files (optional).
include $(CHIBIOS)/test/nil/test.mk
diff --git a/demos/SPC5/NIL-SPC560D-EVB/chconf.h b/demos/SPC5/NIL-SPC560D-EVB/chconf.h new file mode 100644 index 000000000..234705f7e --- /dev/null +++ b/demos/SPC5/NIL-SPC560D-EVB/chconf.h @@ -0,0 +1,274 @@ +/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef _CHCONF_H_
+#define _CHCONF_H_
+
+#define _CHIBIOS_NIL_CONF_
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Number of user threads in the application.
+ * @note This number is not inclusive of the idle thread which is
+ * Implicitly handled.
+ */
+#define CH_CFG_NUM_THREADS 3
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name System timer settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#define CH_CFG_ST_RESOLUTION 32
+
+/**
+ * @brief System tick frequency.
+ * @note This value together with the @p CH_CFG_ST_RESOLUTION
+ * option defines the maximum amount of time allowed for
+ * timeouts.
+ */
+#define CH_CFG_ST_FREQUENCY 1000
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+#define CH_CFG_ST_TIMEDELTA 0
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_SEMAPHORES TRUE
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note Feature not currently implemented.
+ * @note The default is @p FALSE.
+ */
+#define CH_CFG_USE_MUTEXES FALSE
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_EVENTS TRUE
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+#define CH_CFG_USE_MAILBOXES TRUE
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MEMCORE TRUE
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_HEAP TRUE
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MEMPOOLS TRUE
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+#define CH_CFG_MEMCORE_SIZE 0
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note Feature not currently implemented.
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_STATISTICS FALSE
+
+/**
+ * @brief Debug option, system state check.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_SYSTEM_STATE_CHECK TRUE
+
+/**
+ * @brief Debug option, parameters checks.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_ENABLE_CHECKS TRUE
+
+/**
+ * @brief System assertions.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_ENABLE_ASSERTS TRUE
+
+/**
+ * @brief Stack check.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_ENABLE_STACK_CHECK TRUE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System initialization hook.
+ */
+#if !defined(CH_CFG_SYSTEM_INIT_HOOK) || defined(__DOXYGEN__)
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+}
+#endif
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+#define CH_CFG_THREAD_EXT_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ */
+#define CH_CFG_THREAD_EXT_INIT_HOOK(tr) { \
+ /* Add custom threads initialization code here.*/ \
+}
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+#define CH_CFG_IDLE_ENTER_HOOK() { \
+}
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+#define CH_CFG_IDLE_LEAVE_HOOK() { \
+}
+
+/**
+ * @brief System halt hook.
+ */
+#if !defined(CH_CFG_SYSTEM_HALT_HOOK) || defined(__DOXYGEN__)
+#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
+}
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in nilcore.h). */
+/*===========================================================================*/
+
+#endif /* _CHCONF_H_ */
+
+/** @} */
diff --git a/demos/SPC5/RT-SPC560B-EVB/Makefile b/demos/SPC5/RT-SPC560B-EVB/Makefile index 0a4379ab2..172c5cfea 100644 --- a/demos/SPC5/RT-SPC560B-EVB/Makefile +++ b/demos/SPC5/RT-SPC560B-EVB/Makefile @@ -83,7 +83,7 @@ PROJECT = ch # Imported source files and paths
CHIBIOS = ../../..
# Startup files.
-include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/startup_spc560bxx.mk
+include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/startup_spc560bxx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC560B/board.mk
@@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC560Bxx/platform.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/mk/port.mk
+include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/port.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
@@ -184,5 +184,5 @@ ULIBS = # End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/ports/e200/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/demos/SPC5/RT-SPC560B-EVB/chconf.h b/demos/SPC5/RT-SPC560B-EVB/chconf.h index f6244ad4b..e49bdc2a2 100644 --- a/demos/SPC5/RT-SPC560B-EVB/chconf.h +++ b/demos/SPC5/RT-SPC560B-EVB/chconf.h @@ -28,6 +28,8 @@ #ifndef _CHCONF_H_
#define _CHCONF_H_
+#define _CHIBIOS_RT_CONF_
+
/*===========================================================================*/
/**
* @name System timers settings
@@ -360,9 +362,16 @@ * @details If enabled then the context switch circular trace buffer is
* activated.
*
- * @note The default is @p FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_NONE.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_NONE
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_NONE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -395,7 +404,7 @@ * @note This debug option is not currently compatible with the
* tickless mode.
*/
-#define CH_DBG_THREADS_PROFILING FALSE
+#define CH_DBG_THREADS_PROFILING TRUE
/** @} */
@@ -427,10 +436,6 @@ /**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
- *
- * @note It is inserted into lock zone.
- * @note It is also invoked when the threads simply return in order to
- * terminate.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
@@ -445,12 +450,27 @@ }
/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -460,6 +480,7 @@ * @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -488,6 +509,15 @@ /* System halt code here.*/ \
}
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
/** @} */
/*===========================================================================*/
diff --git a/demos/SPC5/RT-SPC560D-EVB/Makefile b/demos/SPC5/RT-SPC560D-EVB/Makefile index e887acb15..efc09d1b8 100644 --- a/demos/SPC5/RT-SPC560D-EVB/Makefile +++ b/demos/SPC5/RT-SPC560D-EVB/Makefile @@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC560Dxx/platform.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/port.mk
+include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/port.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
diff --git a/demos/SPC5/RT-SPC560P-EVB/Makefile b/demos/SPC5/RT-SPC560P-EVB/Makefile index 65fef8db3..324411796 100644 --- a/demos/SPC5/RT-SPC560P-EVB/Makefile +++ b/demos/SPC5/RT-SPC560P-EVB/Makefile @@ -83,7 +83,7 @@ PROJECT = ch # Imported source files and paths
CHIBIOS = ../../..
# Startup files.
-include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/startup_spc560pxx.mk
+include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/startup_spc560pxx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC560P/board.mk
@@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC560Pxx/platform.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/mk/port.mk
+include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/port.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
@@ -184,5 +184,5 @@ ULIBS = # End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/ports/e200/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/demos/SPC5/RT-SPC560P-EVB/chconf.h b/demos/SPC5/RT-SPC560P-EVB/chconf.h index f6244ad4b..e49bdc2a2 100644 --- a/demos/SPC5/RT-SPC560P-EVB/chconf.h +++ b/demos/SPC5/RT-SPC560P-EVB/chconf.h @@ -28,6 +28,8 @@ #ifndef _CHCONF_H_
#define _CHCONF_H_
+#define _CHIBIOS_RT_CONF_
+
/*===========================================================================*/
/**
* @name System timers settings
@@ -360,9 +362,16 @@ * @details If enabled then the context switch circular trace buffer is
* activated.
*
- * @note The default is @p FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_NONE.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_NONE
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_NONE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -395,7 +404,7 @@ * @note This debug option is not currently compatible with the
* tickless mode.
*/
-#define CH_DBG_THREADS_PROFILING FALSE
+#define CH_DBG_THREADS_PROFILING TRUE
/** @} */
@@ -427,10 +436,6 @@ /**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
- *
- * @note It is inserted into lock zone.
- * @note It is also invoked when the threads simply return in order to
- * terminate.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
@@ -445,12 +450,27 @@ }
/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -460,6 +480,7 @@ * @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -488,6 +509,15 @@ /* System halt code here.*/ \
}
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
/** @} */
/*===========================================================================*/
diff --git a/demos/SPC5/RT-SPC563M-EVB/Makefile b/demos/SPC5/RT-SPC563M-EVB/Makefile index a83b1fd89..d9caf5cf8 100644 --- a/demos/SPC5/RT-SPC563M-EVB/Makefile +++ b/demos/SPC5/RT-SPC563M-EVB/Makefile @@ -83,7 +83,7 @@ PROJECT = ch # Imported source files and paths
CHIBIOS = ../../..
# Startup files.
-include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/startup_spc563mxx.mk
+include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/startup_spc563mxx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC563M/board.mk
@@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC563Mxx/platform.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/mk/port.mk
+include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/port.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
@@ -184,5 +184,5 @@ ULIBS = # End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/ports/e200/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/demos/SPC5/RT-SPC563M-EVB/chconf.h b/demos/SPC5/RT-SPC563M-EVB/chconf.h index f6244ad4b..e49bdc2a2 100644 --- a/demos/SPC5/RT-SPC563M-EVB/chconf.h +++ b/demos/SPC5/RT-SPC563M-EVB/chconf.h @@ -28,6 +28,8 @@ #ifndef _CHCONF_H_
#define _CHCONF_H_
+#define _CHIBIOS_RT_CONF_
+
/*===========================================================================*/
/**
* @name System timers settings
@@ -360,9 +362,16 @@ * @details If enabled then the context switch circular trace buffer is
* activated.
*
- * @note The default is @p FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_NONE.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_NONE
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_NONE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -395,7 +404,7 @@ * @note This debug option is not currently compatible with the
* tickless mode.
*/
-#define CH_DBG_THREADS_PROFILING FALSE
+#define CH_DBG_THREADS_PROFILING TRUE
/** @} */
@@ -427,10 +436,6 @@ /**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
- *
- * @note It is inserted into lock zone.
- * @note It is also invoked when the threads simply return in order to
- * terminate.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
@@ -445,12 +450,27 @@ }
/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -460,6 +480,7 @@ * @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -488,6 +509,15 @@ /* System halt code here.*/ \
}
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
/** @} */
/*===========================================================================*/
diff --git a/demos/SPC5/RT-SPC564A-EVB/Makefile b/demos/SPC5/RT-SPC564A-EVB/Makefile index 552d0b747..43349cde5 100644 --- a/demos/SPC5/RT-SPC564A-EVB/Makefile +++ b/demos/SPC5/RT-SPC564A-EVB/Makefile @@ -83,7 +83,7 @@ PROJECT = ch # Imported source files and paths
CHIBIOS = ../../..
# Startup files.
-include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/startup_spc564axx.mk
+include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/startup_spc564axx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC564A/board.mk
@@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC564Axx/platform.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/mk/port.mk
+include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/port.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
@@ -184,5 +184,5 @@ ULIBS = # End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/ports/e200/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/demos/SPC5/RT-SPC564A-EVB/chconf.h b/demos/SPC5/RT-SPC564A-EVB/chconf.h index f6244ad4b..e49bdc2a2 100644 --- a/demos/SPC5/RT-SPC564A-EVB/chconf.h +++ b/demos/SPC5/RT-SPC564A-EVB/chconf.h @@ -28,6 +28,8 @@ #ifndef _CHCONF_H_
#define _CHCONF_H_
+#define _CHIBIOS_RT_CONF_
+
/*===========================================================================*/
/**
* @name System timers settings
@@ -360,9 +362,16 @@ * @details If enabled then the context switch circular trace buffer is
* activated.
*
- * @note The default is @p FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_NONE.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_NONE
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_NONE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -395,7 +404,7 @@ * @note This debug option is not currently compatible with the
* tickless mode.
*/
-#define CH_DBG_THREADS_PROFILING FALSE
+#define CH_DBG_THREADS_PROFILING TRUE
/** @} */
@@ -427,10 +436,6 @@ /**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
- *
- * @note It is inserted into lock zone.
- * @note It is also invoked when the threads simply return in order to
- * terminate.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
@@ -445,12 +450,27 @@ }
/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -460,6 +480,7 @@ * @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -488,6 +509,15 @@ /* System halt code here.*/ \
}
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
/** @} */
/*===========================================================================*/
diff --git a/demos/SPC5/RT-SPC56EC-EVB/Makefile b/demos/SPC5/RT-SPC56EC-EVB/Makefile index bacf31add..edb9063a2 100644 --- a/demos/SPC5/RT-SPC56EC-EVB/Makefile +++ b/demos/SPC5/RT-SPC56EC-EVB/Makefile @@ -83,7 +83,7 @@ PROJECT = ch # Imported source files and paths
CHIBIOS = ../../..
# Startup files.
-include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/startup_spc56ecxx.mk
+include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/startup_spc56ecxx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC56EC/board.mk
@@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC56ECxx/platform.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/mk/port.mk
+include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/port.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
@@ -184,5 +184,5 @@ ULIBS = # End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/ports/e200/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/demos/SPC5/RT-SPC56EC-EVB/chconf.h b/demos/SPC5/RT-SPC56EC-EVB/chconf.h index f6244ad4b..e49bdc2a2 100644 --- a/demos/SPC5/RT-SPC56EC-EVB/chconf.h +++ b/demos/SPC5/RT-SPC56EC-EVB/chconf.h @@ -28,6 +28,8 @@ #ifndef _CHCONF_H_
#define _CHCONF_H_
+#define _CHIBIOS_RT_CONF_
+
/*===========================================================================*/
/**
* @name System timers settings
@@ -360,9 +362,16 @@ * @details If enabled then the context switch circular trace buffer is
* activated.
*
- * @note The default is @p FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_NONE.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_NONE
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_NONE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -395,7 +404,7 @@ * @note This debug option is not currently compatible with the
* tickless mode.
*/
-#define CH_DBG_THREADS_PROFILING FALSE
+#define CH_DBG_THREADS_PROFILING TRUE
/** @} */
@@ -427,10 +436,6 @@ /**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
- *
- * @note It is inserted into lock zone.
- * @note It is also invoked when the threads simply return in order to
- * terminate.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
@@ -445,12 +450,27 @@ }
/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -460,6 +480,7 @@ * @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -488,6 +509,15 @@ /* System halt code here.*/ \
}
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
/** @} */
/*===========================================================================*/
diff --git a/demos/SPC5/RT-SPC56EL-EVB/Makefile b/demos/SPC5/RT-SPC56EL-EVB/Makefile index 615fd8fc4..67f82a43f 100644 --- a/demos/SPC5/RT-SPC56EL-EVB/Makefile +++ b/demos/SPC5/RT-SPC56EL-EVB/Makefile @@ -83,7 +83,7 @@ PROJECT = ch # Imported source files and paths
CHIBIOS = ../../..
# Startup files.
-include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/startup_spc56elxx.mk
+include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/startup_spc56elxx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC56EL/board.mk
@@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC56ELxx/platform.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/mk/port.mk
+include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/port.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
@@ -184,5 +184,5 @@ ULIBS = # End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/ports/e200/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/demos/SPC5/RT-SPC56EL-EVB/chconf.h b/demos/SPC5/RT-SPC56EL-EVB/chconf.h index f6244ad4b..e49bdc2a2 100644 --- a/demos/SPC5/RT-SPC56EL-EVB/chconf.h +++ b/demos/SPC5/RT-SPC56EL-EVB/chconf.h @@ -28,6 +28,8 @@ #ifndef _CHCONF_H_
#define _CHCONF_H_
+#define _CHIBIOS_RT_CONF_
+
/*===========================================================================*/
/**
* @name System timers settings
@@ -360,9 +362,16 @@ * @details If enabled then the context switch circular trace buffer is
* activated.
*
- * @note The default is @p FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_NONE.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_NONE
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_NONE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -395,7 +404,7 @@ * @note This debug option is not currently compatible with the
* tickless mode.
*/
-#define CH_DBG_THREADS_PROFILING FALSE
+#define CH_DBG_THREADS_PROFILING TRUE
/** @} */
@@ -427,10 +436,6 @@ /**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
- *
- * @note It is inserted into lock zone.
- * @note It is also invoked when the threads simply return in order to
- * terminate.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
@@ -445,12 +450,27 @@ }
/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -460,6 +480,7 @@ * @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -488,6 +509,15 @@ /* System halt code here.*/ \
}
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
/** @} */
/*===========================================================================*/
|