From 414e5f382c3be207ad7446497e2ad3b520b45ca0 Mon Sep 17 00:00:00 2001 From: Staars Date: Tue, 20 Oct 2020 14:50:13 +0200 Subject: [PATCH] more adaptions for ESP32-compatibility of BearSSL --- lib/bearssl-esp8266/src/pgmspace_bearssl.h | 2 ++ lib/bearssl-esp8266/src/t_bearssl_tasmota_config.h | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/bearssl-esp8266/src/pgmspace_bearssl.h b/lib/bearssl-esp8266/src/pgmspace_bearssl.h index e616ffe2e..cb3ef8a2a 100644 --- a/lib/bearssl-esp8266/src/pgmspace_bearssl.h +++ b/lib/bearssl-esp8266/src/pgmspace_bearssl.h @@ -14,6 +14,7 @@ extern "C" { #endif +#ifndef ESP32 #ifndef ICACHE_RODATA_ATTR #define ICACHE_RODATA_ATTR __attribute__((section(".irom.text"))) #endif @@ -29,6 +30,7 @@ extern "C" { // Place each progmem object into its own named section, avoiding conflicts #define PROGMEM __attribute__((section( "\".irom.text." __FILE__ "." __STRINGIZE(__LINE__) "." __STRINGIZE(__COUNTER__) "\""))) #endif +#endif //ESP32 #ifndef PGM_P #define PGM_P const char * #endif diff --git a/lib/bearssl-esp8266/src/t_bearssl_tasmota_config.h b/lib/bearssl-esp8266/src/t_bearssl_tasmota_config.h index 732cdf9e6..312e3d94f 100644 --- a/lib/bearssl-esp8266/src/t_bearssl_tasmota_config.h +++ b/lib/bearssl-esp8266/src/t_bearssl_tasmota_config.h @@ -7,13 +7,19 @@ #define __ets__ #endif +#ifndef ESP32 #ifndef ICACHE_FLASH #define ICACHE_FLASH #endif - -#ifndef ESP8266 -#define ESP8266 +#else +#ifndef PROGMEM +#define PROGMEM #endif +#endif + +// #ifndef ESP8266 +// #define ESP8266 +// #endif #ifndef BR_SLOW_MUL15 #define BR_SLOW_MUL15 1 // shrinks EC code by 8.5k