Compiler warning

SpenZerX
Posts: 41
Joined: Thu Apr 16, 2015 9:30 pm
Location: Germany
Contact:

Compiler warning

Postby SpenZerX » Tue Nov 24, 2015 1:02 am

Hi,

my compiler throws out warnings. I need to fix that manually whenever i download a new sdk version.


LOG:
In file included from /opt/Espressif/ESP8266_SDK/include/ets_sys.h:12:0,
from driver/i2c_master.c:11:
driver/i2c_master.c: In function 'i2c_master_gpio_init':
/opt/Espressif/ESP8266_SDK/include/eagle_soc.h:249:38: error: suggest parentheses around arithmetic in operand of '|' [-Werror=parentheses]
& (~(PERIPHS_IO_MUX_FUNC<<PERIPHS_IO_MUX_FUNC_S)) \
^
/opt/Espressif/ESP8266_SDK/include/eagle_soc.h:50:98: note: in definition of macro 'WRITE_PERI_REG'
#define WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)ETS_UNCACHED_ADDR(addr))) = (uint32_t)(val)
^
driver/i2c_master.c:108:5: note: in expansion of macro 'PIN_FUNC_SELECT'
PIN_FUNC_SELECT(I2C_MASTER_SDA_MUX, I2C_MASTER_SDA_FUNC);
^
/opt/Espressif/ESP8266_SDK/include/eagle_soc.h:249:38: error: suggest parentheses around arithmetic in operand of '|' [-Werror=parentheses]
& (~(PERIPHS_IO_MUX_FUNC<<PERIPHS_IO_MUX_FUNC_S)) \
^
/opt/Espressif/ESP8266_SDK/include/eagle_soc.h:50:98: note: in definition of macro 'WRITE_PERI_REG'
#define WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)ETS_UNCACHED_ADDR(addr))) = (uint32_t)(val)
^
driver/i2c_master.c:109:5: note: in expansion of macro 'PIN_FUNC_SELECT'
PIN_FUNC_SELECT(I2C_MASTER_SCL_MUX, I2C_MASTER_SCL_FUNC);
^
cc1: all warnings being treated as errors




NOK SOURCE: (from eagle_soc.h)

#define PIN_PULLUP_DIS(PIN_NAME) CLEAR_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLUP)
#define PIN_PULLUP_EN(PIN_NAME) SET_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLUP)

#define PIN_FUNC_SELECT(PIN_NAME, FUNC) do { \
WRITE_PERI_REG(PIN_NAME, \
READ_PERI_REG(PIN_NAME) \
& (~(PERIPHS_IO_MUX_FUNC<<PERIPHS_IO_MUX_FUNC_S)) \
|( (((FUNC&BIT2)<<2)|(FUNC&0x3))<<PERIPHS_IO_MUX_FUNC_S) ); \
} while (0)




CORRECTED SOURCE: (from eagle_soc.h) ADDED ( )

#define PIN_PULLUP_DIS(PIN_NAME) CLEAR_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLUP)
#define PIN_PULLUP_EN(PIN_NAME) SET_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLUP)

#define PIN_FUNC_SELECT(PIN_NAME, FUNC) do { \
WRITE_PERI_REG(PIN_NAME, \
( READ_PERI_REG(PIN_NAME) \
& (~(PERIPHS_IO_MUX_FUNC<<PERIPHS_IO_MUX_FUNC_S)) )\
|( (((FUNC&BIT2)<<2)|(FUNC&0x3))<<PERIPHS_IO_MUX_FUNC_S) ); \
} while (0)

ESP_Faye
Posts: 1642
Joined: Mon Oct 27, 2014 11:08 am

Re: Compiler warning

Postby ESP_Faye » Mon Nov 30, 2015 5:02 pm

Hi,

Here is our compile environment, we offered a VirtualBox to set up it on windows PC.

Or you can refer to https://github.com/pfalcon/esp-open-sdk to set up a compile environment on Linux PC.

And we will also optimize it in next SDK.

Thanks for your interest in ESP8266 !

User avatar
rudi
Posts: 197
Joined: Fri Oct 24, 2014 7:55 pm

Re: Compiler warning

Postby rudi » Tue Dec 01, 2015 5:55 am

Espressif_Faye wrote:Here is our compile environment, we offered a VirtualBox to set up it on windows PC.

Or you can refer to https://github.com/pfalcon/esp-open-sdk to set up a compile environment on Linux PC.

prev post was edit:
changed link to: https://github.com/pfalcon/esp-open-sdk



Hi Faye,
i am unsure , you ment. to "the most wanted" ESP32 SDK ;-)
(this is fun)


btw:
yes, the setup for a compile env. is best descr. in the ESP32 SDK git.
txs for this!

we can use the same Virtual Box we use for ESP8266 for the ESP32 SDK?
can you answere this asap? because we install system for ESP32 SDK next time on extra System, so i ask for Linux User Group ..

best wishes
rudi ;-)

edit 02 DEZ 2015:
thanks for edit the link ;-)
btw, i have a try in the ESP8266 VM to install the ESP32 Toolchain you ment.
http://esp32.com/viewtopic.php?f=2&t=21

-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Who is online

Users browsing this forum: No registered users and 1 guest