diff --git a/os/kernel/include/chregistry.h b/os/kernel/include/chregistry.h index dc9fe4225..0669dc43f 100644 --- a/os/kernel/include/chregistry.h +++ b/os/kernel/include/chregistry.h @@ -55,7 +55,7 @@ typedef struct { uint8_t cf_off_preempt; /**< @brief Offset of @p p_preempt field. */ uint8_t cf_off_time; /**< @brief Offset of @p p_time field. */ -} chroot_t; +} chdebug_t; /** * @name Macro Functions @@ -116,6 +116,7 @@ typedef struct { #ifdef __cplusplus extern "C" { #endif + extern volatile ROMCONST chdebug_t ch_debug; Thread *chRegFirstThread(void); Thread *chRegNextThread(Thread *tp); #ifdef __cplusplus diff --git a/os/kernel/src/chregistry.c b/os/kernel/src/chregistry.c index 971133457..976e3a51a 100644 --- a/os/kernel/src/chregistry.c +++ b/os/kernel/src/chregistry.c @@ -56,9 +56,9 @@ /* * OS signature in ROM plus debug-related information. */ -ROMCONST chroot_t ch_root = { +volatile ROMCONST chdebug_t ch_debug = { "CHRT", - (uint8_t)sizeof (chroot_t), + (uint8_t)sizeof (chdebug_t), (uint8_t)0, (uint16_t)((CH_KERNEL_MAJOR << 11) | (CH_KERNEL_MINOR << 6) | diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c index 9a7be60ee..10987f56d 100644 --- a/os/kernel/src/chsys.c +++ b/os/kernel/src/chsys.c @@ -83,6 +83,9 @@ void chSysInit(void) { port_init(); _scheduler_init(); _vt_init(); +#if CH_USE_REGISTRY + (void)&ch_debug; +#endif #if CH_USE_MEMCORE _core_init(); #endif