Skip to content

Commit

Permalink
Disabled ISR runtime stats collection for updater builds (flipperdevi…
Browse files Browse the repository at this point in the history
…ces#3791)

* furi: disabled runtime stats collection for updater builds
* added comment for potential space saving optimization

Co-authored-by: あく <[email protected]>
  • Loading branch information
hedger and skotopes authored Jul 16, 2024
1 parent 3191996 commit 79d82da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions targets/f7/furi_hal/furi_hal_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@

#define FURI_HAL_INTERRUPT_DEFAULT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 5)

#ifdef FURI_RAM_EXEC
#define FURI_HAL_INTERRUPT_ACCOUNT_START()
#define FURI_HAL_INTERRUPT_ACCOUNT_END()
#else
#define FURI_HAL_INTERRUPT_ACCOUNT_START() const uint32_t _isr_start = DWT->CYCCNT;
#define FURI_HAL_INTERRUPT_ACCOUNT_END() \
const uint32_t _time_in_isr = DWT->CYCCNT - _isr_start; \
furi_hal_interrupt.counter_time_in_isr_total += _time_in_isr;
#endif

typedef struct {
FuriHalInterruptISR isr;
Expand Down Expand Up @@ -372,6 +377,7 @@ void LPUART1_IRQHandler(void) {
furi_hal_interrupt_call(FuriHalInterruptIdLpUart1);
}

// Potential space-saver for updater build
const char* furi_hal_interrupt_get_name(uint8_t exception_number) {
int32_t id = (int32_t)exception_number - 16;

Expand Down

0 comments on commit 79d82da

Please sign in to comment.