mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Clean DEBUG macro
Change-Id: I5acf266d565045468c6fba19b1ca493773ae78bc
This commit is contained in:
4
Makefile
4
Makefile
@@ -24,10 +24,6 @@ SFLAGS += -Wall
|
||||
# Flags - Header dependency tracking
|
||||
SFLAGS += -MD -MP
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
SFLAGS += -DDEBUG=1
|
||||
endif
|
||||
|
||||
# Language-specific flags
|
||||
CFLAGS = -std=c99
|
||||
CXXFLAGS = -std=c++11 -fno-exceptions -fno-rtti -fno-threadsafe-statics
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
PLATFORM ?= device
|
||||
VERBOSE ?= 0
|
||||
DEBUG ?= 1
|
||||
DEBUG ?= 0
|
||||
|
||||
# Do not edit below this
|
||||
|
||||
@@ -18,5 +18,6 @@ include build/toolchain.$(TOOLCHAIN).mak
|
||||
OS_WITH_ONBOARDING_APP ?= 1
|
||||
OS_WITH_SOFTWARE_UPDATE_PROMPT ?= 1
|
||||
|
||||
SFLAGS += -DDEBUG=$(DEBUG)
|
||||
SFLAGS += -DOS_WITH_ONBOARDING_APP=$(OS_WITH_ONBOARDING_APP)
|
||||
SFLAGS += -DOS_WITH_SOFTWARE_UPDATE_PROMPT=$(OS_WITH_SOFTWARE_UPDATE_PROMPT)
|
||||
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
static constexpr Event Special(int i) { return Event(4*PageSize+i); }
|
||||
|
||||
constexpr Event(int i) : m_id(i){} // TODO: Assert here that i>=0 && i<255
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
uint8_t id() const { return m_id; }
|
||||
const char * name() const;
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,7 @@ extern "C" {
|
||||
}
|
||||
|
||||
void abort() {
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
while (1) {
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -130,7 +130,7 @@ bool Event::isDefined() const {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
|
||||
static constexpr const char * s_nameForEvent[255] = {
|
||||
// Plain
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "private/macros.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
#define assert(e) ((void) ((e) ? ((void)0) : __assert(#e, __FILE__, __LINE__)))
|
||||
#else
|
||||
#define assert(e) ((void)0)
|
||||
|
||||
Reference in New Issue
Block a user