1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core: cpu: fix check for DEVELHELP

This commit is contained in:
Oleg Hahm 2015-09-12 12:43:15 +02:00
parent f3245cecac
commit 49917a5797
10 changed files with 13 additions and 13 deletions

View File

@ -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 { \

View File

@ -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;

View File

@ -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");
}

View File

@ -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("");

View File

@ -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);

View File

@ -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 */

View File

@ -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;

View File

@ -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);

View File

@ -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");

View File

@ -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);