kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/release_build' into 'master'
Release build related fixes - Fix (non-)inlining issue with `spi_flash_guards_` functions in release mode - Fix assert-related warnings generated in release mode by changing assert definition Fixes https://github.com/espressif/esp-idf/issues/233 See merge request !428pull/264/head
commit
ce8ec337eb
|
@ -11,7 +11,7 @@ extern "C" {
|
|||
#undef assert
|
||||
|
||||
#ifdef NDEBUG /* required by ANSI standard */
|
||||
# define assert(__e) ((void)0)
|
||||
# define assert(__e) ((void) sizeof(__e))
|
||||
#else
|
||||
# define assert(__e) ((__e) ? (void)0 : __assert_func (__FILE__, __LINE__, \
|
||||
__ASSERT_FUNC, #__e))
|
||||
|
|
|
@ -163,8 +163,10 @@ esp_err_t PageManager::requestNewPage()
|
|||
return err;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
assert(usedEntries == newPage->getUsedEntryCount());
|
||||
|
||||
#endif
|
||||
|
||||
mPageList.erase(maxErasedItemsPageIt);
|
||||
mFreePageList.push_back(erasedPage);
|
||||
|
||||
|
|
|
@ -103,16 +103,18 @@ SpiFlashOpResult IRAM_ATTR spi_flash_unlock()
|
|||
return SPI_FLASH_RESULT_OK;
|
||||
}
|
||||
|
||||
static inline void spi_flash_guard_start()
|
||||
static inline void IRAM_ATTR spi_flash_guard_start()
|
||||
{
|
||||
if (s_flash_guard_ops)
|
||||
if (s_flash_guard_ops) {
|
||||
s_flash_guard_ops->start();
|
||||
}
|
||||
}
|
||||
|
||||
static inline void spi_flash_guard_end()
|
||||
static inline void IRAM_ATTR spi_flash_guard_end()
|
||||
{
|
||||
if (s_flash_guard_ops)
|
||||
if (s_flash_guard_ops) {
|
||||
s_flash_guard_ops->end();
|
||||
}
|
||||
}
|
||||
|
||||
esp_err_t IRAM_ATTR spi_flash_erase_sector(size_t sec)
|
||||
|
|
Ładowanie…
Reference in New Issue