Added GC persistence to the ch_debug object (ex ch_root).

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4732 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2012-10-03 13:52:13 +00:00
parent 8579b5559c
commit c17f03701a
3 changed files with 7 additions and 3 deletions

View File

@ -55,7 +55,7 @@ typedef struct {
uint8_t cf_off_preempt; /**< @brief Offset of @p p_preempt uint8_t cf_off_preempt; /**< @brief Offset of @p p_preempt
field. */ field. */
uint8_t cf_off_time; /**< @brief Offset of @p p_time field. */ uint8_t cf_off_time; /**< @brief Offset of @p p_time field. */
} chroot_t; } chdebug_t;
/** /**
* @name Macro Functions * @name Macro Functions
@ -116,6 +116,7 @@ typedef struct {
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern volatile ROMCONST chdebug_t ch_debug;
Thread *chRegFirstThread(void); Thread *chRegFirstThread(void);
Thread *chRegNextThread(Thread *tp); Thread *chRegNextThread(Thread *tp);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -56,9 +56,9 @@
/* /*
* OS signature in ROM plus debug-related information. * OS signature in ROM plus debug-related information.
*/ */
ROMCONST chroot_t ch_root = { volatile ROMCONST chdebug_t ch_debug = {
"CHRT", "CHRT",
(uint8_t)sizeof (chroot_t), (uint8_t)sizeof (chdebug_t),
(uint8_t)0, (uint8_t)0,
(uint16_t)((CH_KERNEL_MAJOR << 11) | (uint16_t)((CH_KERNEL_MAJOR << 11) |
(CH_KERNEL_MINOR << 6) | (CH_KERNEL_MINOR << 6) |

View File

@ -83,6 +83,9 @@ void chSysInit(void) {
port_init(); port_init();
_scheduler_init(); _scheduler_init();
_vt_init(); _vt_init();
#if CH_USE_REGISTRY
(void)&ch_debug;
#endif
#if CH_USE_MEMCORE #if CH_USE_MEMCORE
_core_init(); _core_init();
#endif #endif