git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8903 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
b786bd2fbc
commit
50f9e505e5
|
@ -112,7 +112,7 @@ PROJECT = ch
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../../..
|
||||||
# Startup files.
|
# Startup files.
|
||||||
include $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/mk/startup_lpc214x.mk
|
include $(CHIBIOS)/os/common/startup/ARM/compilers/GCC/mk/startup_lpc214x.mk
|
||||||
# HAL-OSAL files (optional).
|
# HAL-OSAL files (optional).
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/hal/ports/LPC/LPC214x/platform.mk
|
include $(CHIBIOS)/os/hal/ports/LPC/LPC214x/platform.mk
|
||||||
|
@ -120,7 +120,7 @@ include $(CHIBIOS)/os/hal/boards/OLIMEX_LPC_P2148/board.mk
|
||||||
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
|
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
|
||||||
# RTOS files (optional).
|
# RTOS files (optional).
|
||||||
include $(CHIBIOS)/os/rt/rt.mk
|
include $(CHIBIOS)/os/rt/rt.mk
|
||||||
include $(CHIBIOS)/os/rt/ports/ARM/compilers/GCC/mk/port_generic.mk
|
include $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/mk/port_generic.mk
|
||||||
# Other files (optional).
|
# Other files (optional).
|
||||||
include $(CHIBIOS)/test/rt/test.mk
|
include $(CHIBIOS)/test/rt/test.mk
|
||||||
|
|
||||||
|
@ -236,5 +236,5 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
RULESPATH = $(CHIBIOS)/os/common/ports/ARM/compilers/GCC
|
RULESPATH = $(CHIBIOS)/os/common/startup/ARM/compilers/GCC
|
||||||
include $(RULESPATH)/rules.mk
|
include $(RULESPATH)/rules.mk
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#ifndef _CHCONF_H_
|
#ifndef _CHCONF_H_
|
||||||
#define _CHCONF_H_
|
#define _CHCONF_H_
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/**
|
/**
|
||||||
* @name System timers settings
|
* @name System timers settings
|
||||||
|
@ -190,6 +192,7 @@
|
||||||
* memory footprint.
|
* memory footprint.
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
*/
|
*/
|
||||||
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
|
||||||
|
@ -359,9 +362,16 @@
|
||||||
* @details If enabled then the context switch circular trace buffer is
|
* @details If enabled then the context switch circular trace buffer is
|
||||||
* activated.
|
* activated.
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p CH_DBG_TRACE_MASK_NONE.
|
||||||
*/
|
*/
|
||||||
#define CH_DBG_ENABLE_TRACE FALSE
|
#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_TRACE_BUFFER_SIZE 128
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Debug option, stack checks.
|
* @brief Debug option, stack checks.
|
||||||
|
@ -426,10 +436,6 @@
|
||||||
/**
|
/**
|
||||||
* @brief Threads finalization hook.
|
* @brief Threads finalization hook.
|
||||||
* @details User finalization code added to the @p chThdExit() API.
|
* @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) { \
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
/* Add threads finalization code here.*/ \
|
/* Add threads finalization code here.*/ \
|
||||||
|
@ -443,6 +449,20 @@
|
||||||
/* Context switch code here.*/ \
|
/* Context switch code here.*/ \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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.
|
* @brief Idle thread enter hook.
|
||||||
* @note This hook is invoked within a critical zone, no OS functions
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
@ -450,6 +470,7 @@
|
||||||
* @note This macro can be used to activate a power saving mode.
|
* @note This macro can be used to activate a power saving mode.
|
||||||
*/
|
*/
|
||||||
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||||
|
/* Idle-enter code here.*/ \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -459,6 +480,7 @@
|
||||||
* @note This macro can be used to deactivate a power saving mode.
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
*/
|
*/
|
||||||
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -487,6 +509,15 @@
|
||||||
/* System halt code here.*/ \
|
/* 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.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -82,35 +82,41 @@ PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../../..
|
||||||
|
# Startup files.
|
||||||
|
include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/startup_spc560dxx.mk
|
||||||
|
# HAL-OSAL files (optional).
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC560D/board.mk
|
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC560D/board.mk
|
||||||
include $(CHIBIOS)/os/hal/ports/SPC5/SPC560Dxx/platform.mk
|
include $(CHIBIOS)/os/hal/ports/SPC5/SPC560Dxx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/osal/nil/osal.mk
|
include $(CHIBIOS)/os/hal/osal/nil/osal.mk
|
||||||
|
# RTOS files (optional).
|
||||||
include $(CHIBIOS)/os/nil/nil.mk
|
include $(CHIBIOS)/os/nil/nil.mk
|
||||||
include $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/mk/port_spc560dxx.mk
|
include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/port.mk
|
||||||
|
# Other files (optional).
|
||||||
include $(CHIBIOS)/test/nil/test.mk
|
include $(CHIBIOS)/test/nil/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/SPC560D40.ld
|
LDSCRIPT= $(STARTUPLD)/SPC560D40.ld
|
||||||
|
|
||||||
# C sources here.
|
# C sources here.
|
||||||
CSRC = $(PORTSRC) \
|
CSRC = $(STARTUPSRC) \
|
||||||
$(KERNSRC) \
|
$(KERNSRC) \
|
||||||
$(TESTSRC) \
|
$(PORTSRC) \
|
||||||
$(HALSRC) \
|
|
||||||
$(OSALSRC) \
|
$(OSALSRC) \
|
||||||
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
|
$(TESTSRC) \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources here.
|
# C++ sources here.
|
||||||
CPPSRC =
|
CPPSRC =
|
||||||
|
|
||||||
# List ASM source files here
|
# List ASM source files here
|
||||||
ASMSRC = $(PORTASM)
|
ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
|
||||||
|
|
||||||
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
|
INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
|
||||||
$(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
|
$(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
|
||||||
$(CHIBIOS)/os/various
|
$(CHIBIOS)/os/various
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -175,5 +181,5 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
RULESPATH = $(CHIBIOS)/os/common/ports/e200/compilers/GCC
|
RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GCC
|
||||||
include $(RULESPATH)/rules.mk
|
include $(RULESPATH)/rules.mk
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "nil.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "ch_test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ PROJECT = ch
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../../..
|
||||||
# Startup files.
|
# Startup files.
|
||||||
include $(CHIBIOS)/os/common/ports/e200/compilers/GCC/mk/startup_spc560dxx.mk
|
include $(CHIBIOS)/os/common/startup/e200/compilers/GCC/mk/startup_spc560dxx.mk
|
||||||
# HAL-OSAL files (optional).
|
# HAL-OSAL files (optional).
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC560D/board.mk
|
include $(CHIBIOS)/os/hal/boards/ST_EVB_SPC560D/board.mk
|
||||||
|
@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC560Dxx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
|
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
|
||||||
# RTOS files (optional).
|
# RTOS files (optional).
|
||||||
include $(CHIBIOS)/os/rt/rt.mk
|
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).
|
# Other files (optional).
|
||||||
include $(CHIBIOS)/test/rt/test.mk
|
include $(CHIBIOS)/test/rt/test.mk
|
||||||
|
|
||||||
|
@ -184,5 +184,5 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
RULESPATH = $(CHIBIOS)/os/common/ports/e200/compilers/GCC
|
RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GCC
|
||||||
include $(RULESPATH)/rules.mk
|
include $(RULESPATH)/rules.mk
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#ifndef _CHCONF_H_
|
#ifndef _CHCONF_H_
|
||||||
#define _CHCONF_H_
|
#define _CHCONF_H_
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/**
|
/**
|
||||||
* @name System timers settings
|
* @name System timers settings
|
||||||
|
@ -360,9 +362,16 @@
|
||||||
* @details If enabled then the context switch circular trace buffer is
|
* @details If enabled then the context switch circular trace buffer is
|
||||||
* activated.
|
* activated.
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p CH_DBG_TRACE_MASK_NONE.
|
||||||
*/
|
*/
|
||||||
#define CH_DBG_ENABLE_TRACE FALSE
|
#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_TRACE_BUFFER_SIZE 128
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Debug option, stack checks.
|
* @brief Debug option, stack checks.
|
||||||
|
@ -395,7 +404,7 @@
|
||||||
* @note This debug option is not currently compatible with the
|
* @note This debug option is not currently compatible with the
|
||||||
* tickless mode.
|
* tickless mode.
|
||||||
*/
|
*/
|
||||||
#define CH_DBG_THREADS_PROFILING FALSE
|
#define CH_DBG_THREADS_PROFILING TRUE
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -427,10 +436,6 @@
|
||||||
/**
|
/**
|
||||||
* @brief Threads finalization hook.
|
* @brief Threads finalization hook.
|
||||||
* @details User finalization code added to the @p chThdExit() API.
|
* @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) { \
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
/* Add threads finalization code here.*/ \
|
/* Add threads finalization code here.*/ \
|
||||||
|
@ -444,6 +449,20 @@
|
||||||
/* Context switch code here.*/ \
|
/* Context switch code here.*/ \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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.
|
* @brief Idle thread enter hook.
|
||||||
* @note This hook is invoked within a critical zone, no OS functions
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
@ -451,6 +470,7 @@
|
||||||
* @note This macro can be used to activate a power saving mode.
|
* @note This macro can be used to activate a power saving mode.
|
||||||
*/
|
*/
|
||||||
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
#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.
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
*/
|
*/
|
||||||
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -488,6 +509,15 @@
|
||||||
/* System halt code here.*/ \
|
/* 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.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -24,17 +24,18 @@
|
||||||
#define TEST_WA_SIZE THD_WORKING_AREA_SIZE(256)
|
#define TEST_WA_SIZE THD_WORKING_AREA_SIZE(256)
|
||||||
|
|
||||||
static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) {
|
static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
size_t n, size;
|
size_t n, size, largest;
|
||||||
|
|
||||||
(void)argv;
|
(void)argv;
|
||||||
if (argc > 0) {
|
if (argc > 0) {
|
||||||
chprintf(chp, "Usage: mem\r\n");
|
chprintf(chp, "Usage: mem\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
n = chHeapStatus(NULL, &size);
|
n = chHeapStatus(NULL, &size, &largest);
|
||||||
chprintf(chp, "core free memory : %u bytes\r\n", chCoreGetStatusX());
|
chprintf(chp, "core free memory : %u bytes\r\n", chCoreGetStatusX());
|
||||||
chprintf(chp, "heap fragments : %u\r\n", n);
|
chprintf(chp, "heap fragments : %u\r\n", n);
|
||||||
chprintf(chp, "heap free total : %u bytes\r\n", size);
|
chprintf(chp, "heap free total : %u bytes\r\n", size);
|
||||||
|
chprintf(chp, "heap free largest: %u bytes\r\n", largest);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
|
static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
|
@ -49,10 +50,9 @@ static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
chprintf(chp, " addr stack prio refs state time\r\n");
|
chprintf(chp, " addr stack prio refs state time\r\n");
|
||||||
tp = chRegFirstThread();
|
tp = chRegFirstThread();
|
||||||
do {
|
do {
|
||||||
chprintf(chp, "%08lx %08lx %4lu %4lu %9s\r\n",
|
chprintf(chp, "%08lx %08lx %4lu %9s\r\n",
|
||||||
(uint32_t)tp, (uint32_t)tp->p_ctx.sp,
|
(uint32_t)tp, (uint32_t)tp->ctx.sp,
|
||||||
(uint32_t)tp->p_prio, (uint32_t)(tp->p_refs - 1),
|
(uint32_t)tp->prio, states[tp->state]);
|
||||||
states[tp->p_state]);
|
|
||||||
tp = chRegNextThread(tp);
|
tp = chRegNextThread(tp);
|
||||||
} while (tp != NULL);
|
} while (tp != NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ PROJECT = ch
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../../..
|
||||||
# Startup files.
|
# Startup files.
|
||||||
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk
|
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk
|
||||||
# HAL-OSAL files (optional).
|
# HAL-OSAL files (optional).
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk
|
include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk
|
||||||
|
@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/boards/ST_NUCLEO_F030R8/board.mk
|
||||||
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
|
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
|
||||||
# RTOS files (optional).
|
# RTOS files (optional).
|
||||||
include $(CHIBIOS)/os/rt/rt.mk
|
include $(CHIBIOS)/os/rt/rt.mk
|
||||||
include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk
|
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk
|
||||||
# Other files (optional).
|
# Other files (optional).
|
||||||
include $(CHIBIOS)/test/rt/test.mk
|
include $(CHIBIOS)/test/rt/test.mk
|
||||||
|
|
||||||
|
@ -207,5 +207,5 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
|
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
|
||||||
include $(RULESPATH)/rules.mk
|
include $(RULESPATH)/rules.mk
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#ifndef _CHCONF_H_
|
#ifndef _CHCONF_H_
|
||||||
#define _CHCONF_H_
|
#define _CHCONF_H_
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/**
|
/**
|
||||||
* @name System timers settings
|
* @name System timers settings
|
||||||
|
@ -360,9 +362,16 @@
|
||||||
* @details If enabled then the context switch circular trace buffer is
|
* @details If enabled then the context switch circular trace buffer is
|
||||||
* activated.
|
* activated.
|
||||||
*
|
*
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p CH_DBG_TRACE_MASK_NONE.
|
||||||
*/
|
*/
|
||||||
#define CH_DBG_ENABLE_TRACE FALSE
|
#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_TRACE_BUFFER_SIZE 128
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Debug option, stack checks.
|
* @brief Debug option, stack checks.
|
||||||
|
@ -427,10 +436,6 @@
|
||||||
/**
|
/**
|
||||||
* @brief Threads finalization hook.
|
* @brief Threads finalization hook.
|
||||||
* @details User finalization code added to the @p chThdExit() API.
|
* @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) { \
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
/* Add threads finalization code here.*/ \
|
/* Add threads finalization code here.*/ \
|
||||||
|
@ -444,6 +449,20 @@
|
||||||
/* Context switch code here.*/ \
|
/* Context switch code here.*/ \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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.
|
* @brief Idle thread enter hook.
|
||||||
* @note This hook is invoked within a critical zone, no OS functions
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
@ -451,6 +470,7 @@
|
||||||
* @note This macro can be used to activate a power saving mode.
|
* @note This macro can be used to activate a power saving mode.
|
||||||
*/
|
*/
|
||||||
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
#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.
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
*/
|
*/
|
||||||
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -488,6 +509,15 @@
|
||||||
/* System halt code here.*/ \
|
/* 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.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
|
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RT-STM32F030R8-NUCLEO"/>
|
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RT-STM32F030R8-NUCLEO"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.1984968159"/>
|
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.2077824274"/>
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
<listEntry value="/RT-STM32F030R8-NUCLEO"/>
|
<listEntry value="/RT-STM32F030R8-NUCLEO"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
|
|
|
@ -112,32 +112,6 @@
|
||||||
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
|
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
|
||||||
#define STM32_ADC_ADC123_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
#define STM32_ADC_ADC123_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||||
|
|
||||||
/*
|
|
||||||
* CAN driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_CAN_USE_CAN1 FALSE
|
|
||||||
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
|
|
||||||
|
|
||||||
/*
|
|
||||||
* GPT driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_GPT_USE_TIM1 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM2 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM3 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM4 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM5 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM6 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM7 FALSE
|
|
||||||
#define STM32_GPT_USE_TIM8 FALSE
|
|
||||||
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
|
|
||||||
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SDC driver system settings.
|
* SDC driver system settings.
|
||||||
*/
|
*/
|
||||||
|
@ -168,16 +142,6 @@
|
||||||
#define STM32_ST_IRQ_PRIORITY 8
|
#define STM32_ST_IRQ_PRIORITY 8
|
||||||
#define STM32_ST_USE_TIMER 2
|
#define STM32_ST_USE_TIMER 2
|
||||||
|
|
||||||
/*
|
|
||||||
* USB driver system settings.
|
|
||||||
*/
|
|
||||||
#define STM32_USB_USE_OTG1 FALSE
|
|
||||||
#define STM32_USB_OTG1_IRQ_PRIORITY 14
|
|
||||||
#define STM32_USB_OTG1_RX_FIFO_SIZE 512
|
|
||||||
#define STM32_USB_OTG_THREAD_PRIO LOWPRIO
|
|
||||||
#define STM32_USB_OTG_THREAD_STACK_SIZE 128
|
|
||||||
#define STM32_USB_OTGFIFO_FILL_BASEPRI 0
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* WDG driver system settings.
|
* WDG driver system settings.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue