wrapper.c 641 B

123456789101112131415161718192021222324
  1. /*
  2. * SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: CC0-1.0
  5. */
  6. #include "esp_log.h"
  7. static const char *TAG = "boot-wrapper";
  8. /**
  9. * Declare the following symbol in order to have access to the original function implementation
  10. */
  11. extern void __real_bootloader_print_banner(void);
  12. /**
  13. * Extend the bootloader's print banner function.
  14. */
  15. void __wrap_bootloader_print_banner(void)
  16. {
  17. /* Let's first let the original code run */
  18. __real_bootloader_print_banner();
  19. /* and then extend it by printing another message */
  20. ESP_LOGI(TAG, "message from a bootloader wrapper");
  21. }