Browse Source

core: cpu: fix check for DEVELHELP

dev/timer
Oleg Hahm 7 years ago
parent
commit
49917a5797
  1. 2
      core/include/debug.h
  2. 4
      core/lifo.c
  3. 4
      core/msg.c
  4. 4
      core/panic.c
  5. 2
      cpu/arm7_common/panic.c
  6. 2
      cpu/cortexm_common/panic.c
  7. 2
      cpu/lpc2387/periph/gpio.c
  8. 2
      cpu/msp430-common/panic.c
  9. 2
      cpu/native/irq_cpu.c
  10. 2
      cpu/native/panic.c

2
core/include/debug.h

@ -54,7 +54,7 @@ extern "C" {
* information to stdout after verifying the stack is big enough. If `DEVELHELP`
* is not set, this check is not performed. (CPU exception may occur)
*/
#if DEVELHELP
#ifdef DEVELHELP
#include "cpu_conf.h"
#define DEBUG_PRINT(...) \
do { \

4
core/lifo.c

@ -41,7 +41,7 @@ void lifo_insert(int *array, int i)
int index = i + 1;
#if DEVELHELP
#ifdef DEVELHELP
if ((array[index] != -1) && (array[0] != -1)) {
LOG_WARNING("lifo_insert: overwriting array[%i] == %i with %i\n\n\n\t\tThe lifo is broken now.\n\n\n", index, array[index], array[0]);
}
@ -60,7 +60,7 @@ int lifo_get(int *array)
array[0] = array[head + 1];
}
#if DEVELHELP
#ifdef DEVELHELP
/* make sure a double insert does not result in an infinite
* resource of values */
array[head+1] = -1;

4
core/msg.c

@ -77,7 +77,7 @@ int msg_try_send(msg_t *m, kernel_pid_t target_pid)
static int _msg_send(msg_t *m, kernel_pid_t target_pid, bool block, unsigned state)
{
#if DEVELHELP
#ifdef DEVELHELP
if (!pid_is_valid(target_pid)) {
DEBUG("msg_send(): target_pid is invalid, continuing anyways\n");
}
@ -179,7 +179,7 @@ int msg_send_to_self(msg_t *m)
int msg_send_int(msg_t *m, kernel_pid_t target_pid)
{
#if DEVELHELP
#ifdef DEVELHELP
if (!pid_is_valid(target_pid)) {
DEBUG("msg_send(): target_pid is invalid, continuing anyways\n");
}

4
core/panic.c

@ -31,7 +31,7 @@
#include "panic.h"
#include "arch/panic_arch.h"
#if DEVELHELP && defined MODULE_PS
#if defined(DEVELHELP) && defined(MODULE_PS)
#include "ps.h"
#endif
@ -55,7 +55,7 @@ NORETURN void core_panic(core_panic_t crash_code, const char *message)
cpu_print_last_instruction();
}
#endif
#if DEVELHELP
#ifdef DEVELHELP
#ifdef MODULE_PS
ps();
puts("");

2
cpu/arm7_common/panic.c

@ -21,7 +21,7 @@
void panic_arch(void)
{
#if DEVELHELP
#ifdef DEVELHELP
/* enter infinite loop, into deepest possible sleep mode */
while (1) {
lpm_set(LPM_OFF);

2
cpu/cortexm_common/panic.c

@ -23,7 +23,7 @@
void panic_arch(void)
{
#if DEVELHELP
#ifdef DEVELHELP
/* The bkpt instruction will signal to the debugger to break here. */
__ASM("bkpt #0");
/* enter infinite loop, into deepest possible sleep mode */

2
cpu/lpc2387/periph/gpio.c

@ -116,7 +116,7 @@ int gpio_init_int(gpio_t pin, gpio_pp_t pullup, gpio_flank_t flank,
}
if (_state_index == 0xff) {
#if DEVELHELP
#ifdef DEVELHELP
puts("lpc2387: gpio: warning: no free gpio callback state!");
#endif
return -1;

2
cpu/msp430-common/panic.c

@ -24,7 +24,7 @@ void panic_arch(void)
{
/* disable watchdog and all possible sources of interrupts */
WDTCTL = WDTPW | WDTHOLD;
#if DEVELHELP
#ifdef DEVELHELP
/* enter infinite loop, into deepest possible sleep mode */
while (1) {
lpm_set(LPM_OFF);

2
cpu/native/irq_cpu.c

@ -170,7 +170,7 @@ unsigned enableIRQ(void)
unsigned int prev_state;
if (_native_in_isr == 1) {
#if DEVELHELP
#ifdef DEVELHELP
real_write(STDERR_FILENO, "enableIRQ + _native_in_isr\n", 27);
#else
DEBUG("enableIRQ + _native_in_isr\n");

2
cpu/native/panic.c

@ -25,7 +25,7 @@
void panic_arch(void)
{
#if DEVELHELP
#ifdef DEVELHELP
/* since we're atop an Unix-like platform,
just use the (developer-)friendly core-dump feature */
kill(_native_pid, SIGTRAP);

Loading…
Cancel
Save