compiler.h 836 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * define start/end address of ro data.
  3. */
  4. #ifndef __COMPILER_H__
  5. #define __COMPILER_H__
  6. #if defined(__ESP8266__)
  7. extern char _irom0_text_start;
  8. extern char _irom0_text_end;
  9. #define RODATA_START_ADDRESS (&_irom0_text_start)
  10. #define RODATA_END_ADDRESS (&_irom0_text_end)
  11. #elif defined(__ESP32__)
  12. #define RODATA_START_ADDRESS ((char*)0x3F400000)
  13. #define RODATA_END_ADDRESS ((char*)0x3F800000)
  14. #else // other compilers
  15. /* Firstly, modify rodata's start/end address. Then, comment the line below */
  16. #error "Please modify RODATA_START_ADDRESS and RODATA_END_ADDRESS below."
  17. /* Perhaps you can use start/end address of flash */
  18. #define RODATA_START_ADDRESS ((char*)0x40200000)
  19. #define RODATA_END_ADDRESS ((char*)0x40280000)
  20. #endif
  21. #endif // __COMPILER_H__