[[unlikely]]
This commit is contained in:
parent
b7a1edec81
commit
cbe5eaca18
3 changed files with 7 additions and 4 deletions
|
@ -17,8 +17,8 @@ board_build.filesystem = littlefs
|
|||
lib_deps = greiman/SdFat@^2.1.2
|
||||
adafruit/Adafruit NeoPixel
|
||||
bblanchon/ArduinoJson@^6.19.4
|
||||
build_flags = -std=gnu++17 -DESP32=1 -ggdb3 -D_GLIBCXX_USE_C99
|
||||
build_unflags = -std=gnu++11
|
||||
build_flags = -std=gnu++2a -DESP32=1 -ggdb3 -D_GLIBCXX_USE_C99
|
||||
build_unflags = -std=gnu++11 -std=gnu++17
|
||||
extra_scripts = pre:prepare.py
|
||||
|
||||
[env:SHA2017-badge]
|
||||
|
@ -32,6 +32,6 @@ board_build.filesystem = littlefs
|
|||
lib_deps = greiman/SdFat@^2.1.2
|
||||
adafruit/Adafruit NeoPixel
|
||||
bblanchon/ArduinoJson@^6.19.4
|
||||
build_flags = -std=gnu++17 -DESP32=1 -DSHA2017 -ggdb3 -D_GLIBCXX_USE_C99 -ISHAdisplay/Arduino/libraries/epd2in9-badge -ISHAdisplay/Arduino/libraries/epdpaint -ISHAdisplay/components/epaper-29-dke
|
||||
build_unflags = -std=gnu++11
|
||||
build_flags = -std=gnu++2a -DESP32=1 -DSHA2017 -ggdb3 -D_GLIBCXX_USE_C99 -ISHAdisplay/Arduino/libraries/epd2in9-badge -ISHAdisplay/Arduino/libraries/epdpaint -ISHAdisplay/components/epaper-29-dke
|
||||
build_unflags = -std=gnu++11 -std=gnu++17
|
||||
upload_protocol = esptool
|
||||
|
|
2
bus.cpp
2
bus.cpp
|
@ -626,6 +626,7 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c
|
|||
uint32_t io_base = get_io_base();
|
||||
bool is_io = m_offset >= io_base;
|
||||
|
||||
[[unlikely]]
|
||||
if (trap_on_failure) {
|
||||
{
|
||||
auto rc = get_trap_action(run_mode, d, apf, is_write);
|
||||
|
@ -673,6 +674,7 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c
|
|||
}
|
||||
}
|
||||
|
||||
[[unlikely]]
|
||||
if (m_offset >= n_pages * 8192l && !is_io) {
|
||||
DOLOG(debug, !peek_only, "bus::calculate_physical_address %o >= %o", m_offset, n_pages * 8192l);
|
||||
DOLOG(debug, false, "TRAP(04) (throw 6) on address %06o", a);
|
||||
|
|
1
log.h
1
log.h
|
@ -24,6 +24,7 @@ void dolog(const log_level_t ll, const char *fmt, ...);
|
|||
#define DOLOG(ll, always, fmt, ...) do { \
|
||||
extern log_level_t log_level_file, log_level_screen; \
|
||||
\
|
||||
[[unlikely]] \
|
||||
if (always || ll <= log_level_file || ll <= log_level_screen) \
|
||||
dolog(ll, fmt, ##__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
|
Loading…
Add table
Reference in a new issue