Skip to content

Commit

Permalink
fix 8266 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Staars committed Aug 11, 2023
1 parent 2e17b0e commit 7cafe4e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
4 changes: 0 additions & 4 deletions pio-tools/add_c_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@

# General options that are passed to the C++ compiler
env.Append(CXXFLAGS=["-Wno-volatile"])

# Pass flashmode at build time to macro
tasmota_flash_mode = "-DCONFIG_TASMOTA_FLASHMODE_" + (env.BoardConfig().get("build.flash_mode", "dio")).upper()
env.Append(CXXFLAGS=[tasmota_flash_mode])
5 changes: 5 additions & 0 deletions pio-tools/pre_source_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ def FindInoNodes(env):
)

env.AddMethod(FindInoNodes)

# Pass flashmode at build time to macro
tasmota_flash_mode = "-DCONFIG_TASMOTA_FLASHMODE_" + (env.BoardConfig().get("build.flash_mode", "dio")).upper()
env.Append(CXXFLAGS=[tasmota_flash_mode])
print(tasmota_flash_mode)
34 changes: 17 additions & 17 deletions tasmota/include/tasmota_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,23 @@ String EthernetMacAddress(void);

#include "include/tasmota_configurations.h" // Preconfigured configurations

/*-------------------------------------------------------------------------------------------*\
* ESP8266 and ESP32 build time definitions
\*-------------------------------------------------------------------------------------------*/

// created in pio-tools/pre_source_dir.py
#if defined(CONFIG_TASMOTA_FLASHMODE_QIO)
#define D_TASMOTA_FLASHMODE "QIO"
#elif defined(CONFIG_TASMOTA_FLASHMODE_QOUT)
#define D_TASMOTA_FLASHMODE "QOUT"
#elif defined(CONFIG_TASMOTA_FLASHMODE_DIO)
#define D_TASMOTA_FLASHMODE "DIO"
#elif defined(CONFIG_TASMOTA_FLASHMODE_DOUT)
#define D_TASMOTA_FLASHMODE "DOUT"
#else
#error "Please add missing flashmode definition in the lines above!" // could be upcoming octal modes
#endif // value check of CONFIG_TASMOTA_FLASHMODE

/*********************************************************************************************\
* ESP8266 specific parameters
\*********************************************************************************************/
Expand Down Expand Up @@ -119,23 +136,6 @@ String EthernetMacAddress(void);
* End ESP32 specific parameters
\*-------------------------------------------------------------------------------------------*/

/*-------------------------------------------------------------------------------------------*\
* ESP32 build time definitions
\*-------------------------------------------------------------------------------------------*/

// created in pio-tools/add_c_flags.py
#if defined(CONFIG_TASMOTA_FLASHMODE_QIO)
#define D_TASMOTA_FLASHMODE "QIO"
#elif defined(CONFIG_TASMOTA_FLASHMODE_QOUT)
#define D_TASMOTA_FLASHMODE "QOUT"
#elif defined(CONFIG_TASMOTA_FLASHMODE_DIO)
#define D_TASMOTA_FLASHMODE "DIO"
#elif defined(CONFIG_TASMOTA_FLASHMODE_DOUT)
#define D_TASMOTA_FLASHMODE "DOUT"
#else
#error "Please add missing flashmode definition in the lines above!" // could be upcoming octal modes
#endif // value check of CONFIG_TASMOTA_FLASHMODE

/*-------------------------------------------------------------------------------------------*\
* Start ESP32-C32 specific parameters - disable features not present in ESP32-C3
\*-------------------------------------------------------------------------------------------*/
Expand Down

0 comments on commit 7cafe4e

Please # to comment.