arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.24k stars 4.82k forks source link

Confict warning in xsnss_53_sml.ino #21411

Closed HofeBY closed 6 months ago

HofeBY commented 6 months ago

PROBLEM DESCRIPTION

Compiling for tasmota32 & tasmota32c3 & tasmota32c6 & tasmota32s3:

|-- Wire @ 2.0.0
|-- XPT2046_Touchscreen
Building in release mode
Compiling .pio\build\tasmota32\src\tasmota.ino.cpp.o
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:2741:40: warning: ignoring attribute 'section (".iram1.91")' because it conflicts with previous 'section (".iram1.7")' [-Wattributes]
 2741 | void IRAM_ATTR SML_CounterIsr(void *arg) {
      |                                        ^
D:/Tasmota/tasmota/tasmota.ino:5094:16: note: previous declaration here
Linking .pio\build\tasmota32\firmware.elf
lto-wrapper.exe: warning: using serial compilation of 30 LTRANS jobs
lto-wrapper.exe: note: see the '-flto' option documentation for more information

Compiling for tasmota32c2:

Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\AudioOutputSTDIO.cpp.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\AudioOutputSerialWAV.cpp.o' from cache
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:2741:40: warning: ignoring attribute 'section (".iram1.27")' because it conflicts with previous 'section (".iram1.5")' [-Wattributes]
 2741 | void IRAM_ATTR SML_CounterIsr(void *arg) {
      |                                        ^
D:/Tasmota/tasmota/tasmota.ino:5094:16: note: previous declaration here
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\AudioOutputULP.cpp.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\driver\SinglePinI2SDriver.cpp.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\bitmath.c.o' from cache
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino: In function 'void SML_Init()':
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:3471:22: error: 'TWAI_TIMING_CONFIG_25KBITS' was not declared in this scope
 3471 |           t_config = TWAI_TIMING_CONFIG_25KBITS();
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\bitreader.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\cpu.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\crc.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\fixed.c.o' from cache
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:3474:22: error: 'TWAI_TIMING_CONFIG_50KBITS' was not declared in this scope
 3474 |           t_config = TWAI_TIMING_CONFIG_50KBITS();
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\float.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\format.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\lpc.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\md5.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\memory.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\stream_decoder.c.o' from cache
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:3477:22: error: 'TWAI_TIMING_CONFIG_100KBITS' was not declared in this scope
 3477 |           t_config = TWAI_TIMING_CONFIG_100KBITS();
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libflac\window.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\aacdec.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\aactabs.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\bitstream.c.o' from cache
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:3480:22: error: 'TWAI_TIMING_CONFIG_125KBITS' was not declared in this scope
 3480 |           t_config = TWAI_TIMING_CONFIG_125KBITS();
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\buffers.c.o' from cache

Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\dct4.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\decelmnt.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\dequant.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\fft.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\filefmt.c.o' from cache
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:3483:22: error: 'TWAI_TIMING_CONFIG_250KBITS' was not declared in this scope
 3483 |           t_config = TWAI_TIMING_CONFIG_250KBITS();
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\huffman.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\hufftabs.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\imdct.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\noiseless.c.o' from cache
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:3486:22: error: 'TWAI_TIMING_CONFIG_500KBITS' was not declared in this scope
 3486 |           t_config = TWAI_TIMING_CONFIG_500KBITS();
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\pns.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbr.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrfft.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrfreq.c.o' from cache
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:3489:22: error: 'TWAI_TIMING_CONFIG_800KBITS' was not declared in this scope
 3489 |           t_config = TWAI_TIMING_CONFIG_800KBITS();
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrhfadj.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrhfgen.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrhuff.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrimdct.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrmath.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrqmf.c.o' from cache
D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:3492:22: error: 'TWAI_TIMING_CONFIG_1MBITS' was not declared in this scope
 3492 |           t_config = TWAI_TIMING_CONFIG_1MBITS();
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrside.c.o' from cache
Retrieved `.pio\build\tasmota32c2\lib8b6\ESP8266Audio\libhelix-aac\sbrtabs.c.o' from cache
*** [.pio\build\tasmota32c2\src\tasmota.ino.cpp.o] Error 1
================================================================================================ [FAILED] Took 56.58 seconds ================================================================================================
Environment    Status    Duration
-------------  --------  ------------
tasmota32c2    FAILED    00:00:56.579
=========================================================================================== 1 failed, 0 succeeded in 00:00:56.579 ===========================================================================================
 *  The terminal process "C:\Users\Station\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'tasmota32c2'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:

TO REPRODUCE

Fresh installed Visual Studio Code V1.89.1 on Windows 10 Tasmota dev 14.0.0.1 Compiling for several types of ESP written above CompilerLog

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

Jason2866 commented 6 months ago

C2 needs the setting NO_USE_SML_CANBUS since there is no CAN BUS support from the MCU. The Audio libs needs to be added to the lib ignore section for the C2. With this setup scripting does work to compile with the C2.

Jason2866 commented 6 months ago

@gemu2015 Please have a look to fix the warning

/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:2741:40: warning: ignoring attribute 'section (".iram1.27")' because it conflicts with previous 'section (".iram1.5")' [-Wattributes]
 2741 | void IRAM_ATTR SML_CounterIsr(void *arg) {
      |                                        ^
/tasmota/tasmota.ino:5094:16: note: previous declaration here
HofeBY commented 6 months ago

C2 needs the setting NO_USE_SML_CANBUS since there is no CAN BUS support from the MCU. The Audio libs needs to be added to the lib ignore section for the C2. With this setup scripting does work to compile with the C2.

OK. Updating files from #21407 to my active source

I also add

if defined ESP32-C2

define NO_USE_SML_CANBUS

endif

to file user_config_override.h

Files tasmota32c2(.factory).bin are now being compiled but still with warnings.

These warnings in CompilerLog now are here:

Building in release mode Compiling .pio\build\tasmota32c2\src\tasmota.ino.cpp.o Compiling .pio\build\tasmota32c2\lib78f\WiFiHelper\WiFiHelper_ESP32.cpp.o D:/Tasmota/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino:2741:40: warning: ignoring attribute 'section (".iram1.27")' because it conflicts with previous 'section (".iram1.5")' [-Wattributes] 2741 | void IRAM_ATTR SML_CounterIsr(void *arg) { | ^ D:/Tasmota/tasmota/tasmota.ino:5094:16: note: previous declaration here Compiling .pio\build\tasmota32c2\lib664\default\be_modtab.c.o Archiving .pio\build\tasmota32c2\lib78f\libWiFiHelper.a

...

Creating esp32c2 image... Merged 2 ELF sections Successfully created esp32c2 image. esp32_create_combined_bin([".pio\build\tasmota32c2\firmware.bin"], [".pio\build\tasmota32c2\firmware.elf"]) Read partitions from partitions/esp32_partition_app2880k_fs320k.csv //# Name, Type, SubType, Offset, Size, Flags nvs data nvs 0x9000 0x5000 otadata data ota 0xe000 0x2000 safeboot app factory 0x10000 0xD0000 app0 app ota_0 0xE0000 0x2D0000 spiffs data spiffs 0x3B0000 0x50000 Creating filesystem with content: No files added -> will NOT create littlefs.bin and NOT overwrite fs partition! safeboot binary already in place. Offset | File

arendst commented 6 months ago

@gemu2015 warning just fixed.

HofeBY commented 6 months ago

Thx at Support Team.

21411 installed.

Compiler warnings are fixed.