core: cpu: fix check for DEVELHELP
This commit is contained in:
parent
f3245cecac
commit
49917a5797
@ -54,7 +54,7 @@ extern "C" {
|
|||||||
* information to stdout after verifying the stack is big enough. If `DEVELHELP`
|
* information to stdout after verifying the stack is big enough. If `DEVELHELP`
|
||||||
* is not set, this check is not performed. (CPU exception may occur)
|
* is not set, this check is not performed. (CPU exception may occur)
|
||||||
*/
|
*/
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
#include "cpu_conf.h"
|
#include "cpu_conf.h"
|
||||||
#define DEBUG_PRINT(...) \
|
#define DEBUG_PRINT(...) \
|
||||||
do { \
|
do { \
|
||||||
|
|||||||
@ -41,7 +41,7 @@ void lifo_insert(int *array, int i)
|
|||||||
|
|
||||||
int index = i + 1;
|
int index = i + 1;
|
||||||
|
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
if ((array[index] != -1) && (array[0] != -1)) {
|
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]);
|
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];
|
array[0] = array[head + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
/* make sure a double insert does not result in an infinite
|
/* make sure a double insert does not result in an infinite
|
||||||
* resource of values */
|
* resource of values */
|
||||||
array[head+1] = -1;
|
array[head+1] = -1;
|
||||||
|
|||||||
@ -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)
|
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)) {
|
if (!pid_is_valid(target_pid)) {
|
||||||
DEBUG("msg_send(): target_pid is invalid, continuing anyways\n");
|
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)
|
int msg_send_int(msg_t *m, kernel_pid_t target_pid)
|
||||||
{
|
{
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
if (!pid_is_valid(target_pid)) {
|
if (!pid_is_valid(target_pid)) {
|
||||||
DEBUG("msg_send(): target_pid is invalid, continuing anyways\n");
|
DEBUG("msg_send(): target_pid is invalid, continuing anyways\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#include "panic.h"
|
#include "panic.h"
|
||||||
#include "arch/panic_arch.h"
|
#include "arch/panic_arch.h"
|
||||||
|
|
||||||
#if DEVELHELP && defined MODULE_PS
|
#if defined(DEVELHELP) && defined(MODULE_PS)
|
||||||
#include "ps.h"
|
#include "ps.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ NORETURN void core_panic(core_panic_t crash_code, const char *message)
|
|||||||
cpu_print_last_instruction();
|
cpu_print_last_instruction();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
#ifdef MODULE_PS
|
#ifdef MODULE_PS
|
||||||
ps();
|
ps();
|
||||||
puts("");
|
puts("");
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
void panic_arch(void)
|
void panic_arch(void)
|
||||||
{
|
{
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
/* enter infinite loop, into deepest possible sleep mode */
|
/* enter infinite loop, into deepest possible sleep mode */
|
||||||
while (1) {
|
while (1) {
|
||||||
lpm_set(LPM_OFF);
|
lpm_set(LPM_OFF);
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
void panic_arch(void)
|
void panic_arch(void)
|
||||||
{
|
{
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
/* The bkpt instruction will signal to the debugger to break here. */
|
/* The bkpt instruction will signal to the debugger to break here. */
|
||||||
__ASM("bkpt #0");
|
__ASM("bkpt #0");
|
||||||
/* enter infinite loop, into deepest possible sleep mode */
|
/* enter infinite loop, into deepest possible sleep mode */
|
||||||
|
|||||||
@ -116,7 +116,7 @@ int gpio_init_int(gpio_t pin, gpio_pp_t pullup, gpio_flank_t flank,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_state_index == 0xff) {
|
if (_state_index == 0xff) {
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
puts("lpc2387: gpio: warning: no free gpio callback state!");
|
puts("lpc2387: gpio: warning: no free gpio callback state!");
|
||||||
#endif
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ void panic_arch(void)
|
|||||||
{
|
{
|
||||||
/* disable watchdog and all possible sources of interrupts */
|
/* disable watchdog and all possible sources of interrupts */
|
||||||
WDTCTL = WDTPW | WDTHOLD;
|
WDTCTL = WDTPW | WDTHOLD;
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
/* enter infinite loop, into deepest possible sleep mode */
|
/* enter infinite loop, into deepest possible sleep mode */
|
||||||
while (1) {
|
while (1) {
|
||||||
lpm_set(LPM_OFF);
|
lpm_set(LPM_OFF);
|
||||||
|
|||||||
@ -170,7 +170,7 @@ unsigned enableIRQ(void)
|
|||||||
unsigned int prev_state;
|
unsigned int prev_state;
|
||||||
|
|
||||||
if (_native_in_isr == 1) {
|
if (_native_in_isr == 1) {
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
real_write(STDERR_FILENO, "enableIRQ + _native_in_isr\n", 27);
|
real_write(STDERR_FILENO, "enableIRQ + _native_in_isr\n", 27);
|
||||||
#else
|
#else
|
||||||
DEBUG("enableIRQ + _native_in_isr\n");
|
DEBUG("enableIRQ + _native_in_isr\n");
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
void panic_arch(void)
|
void panic_arch(void)
|
||||||
{
|
{
|
||||||
#if DEVELHELP
|
#ifdef DEVELHELP
|
||||||
/* since we're atop an Unix-like platform,
|
/* since we're atop an Unix-like platform,
|
||||||
just use the (developer-)friendly core-dump feature */
|
just use the (developer-)friendly core-dump feature */
|
||||||
kill(_native_pid, SIGTRAP);
|
kill(_native_pid, SIGTRAP);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user