more adaptions for ESP32-compatibility of BearSSL

This commit is contained in:
Staars 2020-10-20 14:50:13 +02:00
parent 4e7e6ce7d3
commit 414e5f382c
2 changed files with 11 additions and 3 deletions

View File

@ -14,6 +14,7 @@
extern "C" { extern "C" {
#endif #endif
#ifndef ESP32
#ifndef ICACHE_RODATA_ATTR #ifndef ICACHE_RODATA_ATTR
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text"))) #define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
#endif #endif
@ -29,6 +30,7 @@ extern "C" {
// Place each progmem object into its own named section, avoiding conflicts // Place each progmem object into its own named section, avoiding conflicts
#define PROGMEM __attribute__((section( "\".irom.text." __FILE__ "." __STRINGIZE(__LINE__) "." __STRINGIZE(__COUNTER__) "\""))) #define PROGMEM __attribute__((section( "\".irom.text." __FILE__ "." __STRINGIZE(__LINE__) "." __STRINGIZE(__COUNTER__) "\"")))
#endif #endif
#endif //ESP32
#ifndef PGM_P #ifndef PGM_P
#define PGM_P const char * #define PGM_P const char *
#endif #endif

View File

@ -7,13 +7,19 @@
#define __ets__ #define __ets__
#endif #endif
#ifndef ESP32
#ifndef ICACHE_FLASH #ifndef ICACHE_FLASH
#define ICACHE_FLASH #define ICACHE_FLASH
#endif #endif
#else
#ifndef ESP8266 #ifndef PROGMEM
#define ESP8266 #define PROGMEM
#endif #endif
#endif
// #ifndef ESP8266
// #define ESP8266
// #endif
#ifndef BR_SLOW_MUL15 #ifndef BR_SLOW_MUL15
#define BR_SLOW_MUL15 1 // shrinks EC code by 8.5k #define BR_SLOW_MUL15 1 // shrinks EC code by 8.5k