Fixed simulator. Needs testing.

This commit is contained in:
Fabien Poussin 2017-03-24 01:59:14 +01:00
parent 270d3a263d
commit be581044a5
3 changed files with 13 additions and 9 deletions

3
.gitignore vendored
View File

@ -1,7 +1,8 @@
.svn*
.dep*
*.o.d
*.o
build/
Debug_EMS/
Release_EMS/
Debug/
Debug/

View File

@ -121,8 +121,8 @@ static void sayHello(void) {
*/
static void cmd_threads(void) {
#if CH_DBG_THREADS_PROFILING || defined(__DOXYGEN__)
static const char *states[] = { THD_STATE_NAMES };
Thread *tp;
static const char *states[] = { CH_STATE_NAMES };
thread_t *tp;
scheduleMsg(&logger, " addr stack prio refs state time");
tp = chRegFirstThread();

View File

@ -15,14 +15,17 @@
#include "histogram.h"
/**
* Unfortunately ChibiOS has two versions of methods for different
* contexts.
*/
#ifndef SIMULATOR
#define isLocked() (ch.dbg.lock_cnt > 0)
/**
* Unfortunately ChibiOS has two versions of methods for different
* contexts.
*/
#define isIsrContext() (ch.dbg.isr_cnt > 0)
#else
#define isLocked() (0)
#define isIsrContext() (0)
#endif
#ifdef __cplusplus
extern "C"