Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confict warning in xsnss_53_sml.ino #21411

Closed
5 of 14 tasks
HofeBY opened this issue May 15, 2024 · 5 comments
Closed
5 of 14 tasks

Confict warning in xsnss_53_sml.ino #21411

HofeBY opened this issue May 15, 2024 · 5 comments

Comments

@HofeBY
Copy link

HofeBY commented May 15, 2024

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!

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in discussions
  • Searched the problem in the docs
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): AZ Delivery dev Kit C V4 & ESP32C6
  • Tasmota binary firmware version number used: dev 14.0.0.1 14.05.2024
    • Pre-compiled
    • Self-compiled
  • Flashing tools used: OTA
  • Provide the output of command: Backlog Template; Module; GPIO 255:
  Configuration output here:

  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  Rules output here:

  • Provide the output of this command: Status 0:
  STATUS 0 output here:

  • Set weblog to 4 and then, when you experience your issue, provide the output of the Console log:
  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
Copy link
Collaborator

Jason2866 commented May 15, 2024

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
Copy link
Collaborator

Jason2866 commented May 15, 2024

@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
Copy link
Author

HofeBY commented May 15, 2024

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

  • 0x0000 | D:\Tasmota.pio\build\tasmota32c2\bootloader.bin
  • 0x8000 | D:\Tasmota.pio\build\tasmota32c2\partitions.bin
  • 0xe000 | C:\Users\Station.platformio\packages\framework-arduinoespressif32\tools\partitions\boot_app0.bin
  • 0x10000 | D:\Tasmota\variants/tasmota\tasmota32c2-safeboot.bin
  • 0xe0000 | D:\Tasmota.pio\build\tasmota32c2/firmware.bin
    esptool.py v4.7.2
    SHA digest in image updated
    Wrote 0x2d4ca0 bytes to file D:\Tasmota.pio\build\tasmota32c2/firmware.factory.bin, ready to flash to offset 0x0
    bin_map_copy([".pio\build\tasmota32c2\firmware.bin"], [".pio\build\tasmota32c2\firmware.elf"])
    map_gzip([".pio\build\tasmota32c2\firmware.bin"], [".pio\build\tasmota32c2\firmware.elf"])
    firm_metrics([".pio\build\tasmota32c2\firmware.bin"], [".pio\build\tasmota32c2\firmware.elf"])
    C:\Users\Station.platformio\penv\Scripts\python.exe -m tasmota_metrics "D:\Tasmota\firmware.map"
    Traceback (most recent call last):
    File "", line 198, in _run_module_as_main
    File "", line 88, in run_code
    File "C:\Users\Station.platformio\penv\Lib\site-packages\tasmota_metrics_main
    .py", line 4, in
    main()
    File "C:\Users\Station.platformio\penv\Lib\site-packages\tasmota_metrics\core.py", line 508, in main
    detected_target, segments, sections = load_map_data(args.map_file)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Station.platformio\penv\Lib\site-packages\tasmota_metrics\core.py", line 237, in load_map_data
    detected_chip = detect_target_chip(map_file)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Station.platformio\penv\Lib\site-packages\tasmota_metrics\core.py", line 307, in detect_target_chip
    raise RuntimeError('Target not detected')
    RuntimeError: Target not detected
    *** Error 1
    == [SUCCESS] Took 138.19 seconds ==
    Environment Status Duration

tasmota32c2 SUCCESS 00:02:18.190
== 1 succeeded in 00:02:18.190 ==

  • Terminal will be reused by tasks, press any key to close it.

arendst added a commit that referenced this issue May 15, 2024
@arendst
Copy link
Owner

arendst commented May 15, 2024

@gemu2015 warning just fixed.

@HofeBY
Copy link
Author

HofeBY commented May 15, 2024

Thx at Support Team.

#21411 installed.
Compiler warnings are fixed.

@HofeBY HofeBY closed this as completed May 15, 2024
Jason2866 added a commit to Jason2866/Tasmota that referenced this issue May 17, 2024
* Update changelogs

* Fix compile warning (arendst#21411)

* Remove non IDF5 code

* Enabled watchdog for ESP32 and variants (arendst#21414)

* Drop support of old insecure fingerprint algorithm (deprecated since v8.4.0) (arendst#21416)

* Revert "Enabled watchdog for ESP32 and variants (arendst#21414)" (arendst#21417)

This reverts commit e4ea62c.

* Update changelogs

* Fix Domoticz re-subscribe on MQTT reconnect. Regression from v13.4.0.3 (arendst#21281)

* embed solidify external Berry files from url

* typo

* clang install in gitpod Dockerfile

* clang install with sudo

* try python3.12

* try BLE in var globs

* solidify first

* use full workspace for clang

---------

Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com>
Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Co-authored-by: Staars <baars@klinikum-brandenburg.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants