Skip to content

Flashing M5 Atom echo includes many warnings #86

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

Open
Mariusthvdb opened this issue Mar 18, 2025 · 7 comments
Open

Flashing M5 Atom echo includes many warnings #86

Mariusthvdb opened this issue Mar 18, 2025 · 7 comments
Labels

Comments

@Mariusthvdb
Copy link

Mariusthvdb commented Mar 18, 2025

first of all the version gets a trigger about

WARNING The selected ESP-IDF framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.

but, after installing https://github.com/esphome/wake-word-voice-assistants/blob/main/m5stack-atom-echo/m5stack-atom-echo.yaml continues, these are logged

In file included from components/esp-tflite-micro/tensorflow/lite/micro/kernels/lstm_eval.cc:25:
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h: In lambda function:
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:151:34: warning: declaration of 'const tflite::ArithmeticParams& params' shadows a parameter [-Wshadow]
          const uint8_t input2_val) {
                                  ^
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:126:56: note: shadowed declaration is here
 inline void BroadcastMul6DSlow(const ArithmeticParams& params,
                                ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h: In lambda function:
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:210:28: warning: declaration of 'const tflite::ArithmeticParams& params' shadows a parameter [-Wshadow]
          const T input2_val) {
                            ^
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:171:44: note: shadowed declaration is here
 BroadcastMul6DSlow(const ArithmeticParams& params,
                    ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h: In lambda function:
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:250:46: warning: declaration of 'const tflite::ArithmeticParams& params' shadows a parameter [-Wshadow]
          const std::complex<float> input2_val) {
                                              ^
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:221:56: note: shadowed declaration is here
 inline void BroadcastMul6DSlow(const ArithmeticParams& params,
                                ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Compiling .pioenvs/m5stack-atom-echo/components/esp-tflite-micro/tensorflow/lite/micro/kernels/lstm_eval_common.o
Compiling .pioenvs/m5stack-atom-echo/components/esp-tflite-micro/tensorflow/lite/micro/kernels/maximum_minimum.o
Compiling .pioenvs/m5stack-atom-echo/components/esp-tflite-micro/tensorflow/lite/micro/kernels/micro_tensor_utils.o
Compiling .pioenvs/m5stack-atom-echo/components/esp-tflite-micro/tensorflow/lite/micro/kernels/mirror_pad.o
Compiling .pioenvs/m5stack-atom-echo/components/esp-tflite-micro/tensorflow/lite/micro/kernels/mul_common.o
In file included from components/esp-tflite-micro/tensorflow/lite/micro/kernels/mul_common.cc:19:
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h: In lambda function:
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:151:34: warning: declaration of 'const tflite::ArithmeticParams& params' shadows a parameter [-Wshadow]
          const uint8_t input2_val) {
                                  ^
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:126:56: note: shadowed declaration is here
 inline void BroadcastMul6DSlow(const ArithmeticParams& params,
                                ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h: In lambda function:
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:210:28: warning: declaration of 'const tflite::ArithmeticParams& params' shadows a parameter [-Wshadow]
          const T input2_val) {
                            ^
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:171:44: note: shadowed declaration is here
 BroadcastMul6DSlow(const ArithmeticParams& params,
                    ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h: In lambda function:
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:250:46: warning: declaration of 'const tflite::ArithmeticParams& params' shadows a parameter [-Wshadow]
          const std::complex<float> input2_val) {
                                              ^
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:221:56: note: shadowed declaration is here
 inline void BroadcastMul6DSlow(const ArithmeticParams& params,
                                ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h: In instantiation of 'typename std::enable_if<((! tflite::is_small_integer<T>::value) || enable_for_short_integers), void>::type tflite::reference_ops::BroadcastMul6DSlow(const tflite::ArithmeticParams&, const tflite::RuntimeShape&, const T*, const tflite::RuntimeShape&, const T*, const tflite::RuntimeShape&, T*) [with T = int; bool enable_for_short_integers = false; typename std::enable_if<((! tflite::is_small_integer<T>::value) || enable_for_short_integers), void>::type = void]':
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:260:28:   required from 'void tflite::reference_ops::BroadcastMul4DSlow(const tflite::ArithmeticParams&, const tflite::RuntimeShape&, const T*, const tflite::RuntimeShape&, const T*, const tflite::RuntimeShape&, T*) [with T = int]'
components/esp-tflite-micro/tensorflow/lite/micro/kernels/mul_common.cc:147:56:   required from here
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:206:34: warning: declaration of 'const tflite::ArithmeticParams& params' shadows a parameter [-Wshadow]
   BroadcastMulRecursiveDimensions(
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
       params, 0, input1_data, input2_data, output_data, &input1_offset,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       &input2_offset, &output_offset, desc1, desc2, extended_output_shape_dims,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       [](const ArithmeticParams& params, const T input1_val,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          const T input2_val) {
          ~~~~~~~~~~~~~~~~~~~~~    
         T output_activation_min;
         ~~~~~~~~~~~~~~~~~~~~~~~~  
         T output_activation_max;
         ~~~~~~~~~~~~~~~~~~~~~~~~  
         GetActivationParams(params, &output_activation_min,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             &output_activation_max);
                             ~~~~~~~~~~~~~~~~~~~~~~~~
         return ActivationFunctionWithMinMax<T>(input1_val * input2_val,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                output_activation_min,
                                                ~~~~~~~~~~~~~~~~~~~~~~
                                                output_activation_max);
                                                ~~~~~~~~~~~~~~~~~~~~~~~
       });
       ~~                          
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:171:44: note: shadowed declaration is here
 BroadcastMul6DSlow(const ArithmeticParams& params,
                    ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h: In instantiation of 'typename std::enable_if<((! tflite::is_small_integer<T>::value) || enable_for_short_integers), void>::type tflite::reference_ops::BroadcastMul6DSlow(const tflite::ArithmeticParams&, const tflite::RuntimeShape&, const T*, const tflite::RuntimeShape&, const T*, const tflite::RuntimeShape&, T*) [with T = float; bool enable_for_short_integers = false; typename std::enable_if<((! tflite::is_small_integer<T>::value) || enable_for_short_integers), void>::type = void]':
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:260:28:   required from 'void tflite::reference_ops::BroadcastMul4DSlow(const tflite::ArithmeticParams&, const tflite::RuntimeShape&, const T*, const tflite::RuntimeShape&, const T*, const tflite::RuntimeShape&, T*) [with T = float]'
components/esp-tflite-micro/tensorflow/lite/micro/kernels/mul_common.cc:202:52:   required from here
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:206:34: warning: declaration of 'const tflite::ArithmeticParams& params' shadows a parameter [-Wshadow]
   BroadcastMulRecursiveDimensions(
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
       params, 0, input1_data, input2_data, output_data, &input1_offset,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       &input2_offset, &output_offset, desc1, desc2, extended_output_shape_dims,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       [](const ArithmeticParams& params, const T input1_val,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          const T input2_val) {
          ~~~~~~~~~~~~~~~~~~~~~    
         T output_activation_min;
         ~~~~~~~~~~~~~~~~~~~~~~~~  
         T output_activation_max;
         ~~~~~~~~~~~~~~~~~~~~~~~~  
         GetActivationParams(params, &output_activation_min,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             &output_activation_max);
                             ~~~~~~~~~~~~~~~~~~~~~~~~
         return ActivationFunctionWithMinMax<T>(input1_val * input2_val,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                output_activation_min,
                                                ~~~~~~~~~~~~~~~~~~~~~~
                                                output_activation_max);
                                                ~~~~~~~~~~~~~~~~~~~~~~~
       });
       ~~                          
components/esp-tflite-micro/tensorflow/lite/kernels/internal/reference/mul.h:171:44: note: shadowed declaration is here
 BroadcastMul6DSlow(const ArithmeticParams& params,
                    ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

logs_m5stack-atom-echo-a82d10_run.txt

@Mariusthvdb Mariusthvdb changed the title Flashing M% Atom echo includes many warnings Flashing M5 Atom echo includes many warnings Mar 18, 2025
@jesserockz
Copy link
Member

The IDF version is set to 4 as I believe the microphone does not work on 5 yet. There is a PR in progress.

The other warnings come from the tflite lib which we cannot do anything about.

@edurenye
Copy link

Is this one (espressif/esp-idf#13900) the issue with the microphone?

@Mariusthvdb
Copy link
Author

besides all this technical considerations, why was the move made in the first place for this device? we never had these loggings before.

The m5 Echo seems not powerful enough to be a serious voice assist agent anyways, so why burden it with all these more complex options.

(I've had to add a Disabled on the wake word selector in the firmware manual because it just isnt up to the task)

the output now is worse than in the older firmware, so progress here is making us discard the device completely, where before, it was a nice tool to play around with.

Honestly, imho, bring down the options for this device... the Echo is not a full fledged wake word voice assistant, and we shouldnt treat it like that either.

@edurenye
Copy link

In my humble opinion, the problem is not the firmware, the speaker was not working before and is not working now, because the speaker has awful quality.

That is why I use it as a full fledge wake word voice assistant but have disabled the speaker and use an external speaker, and it works perfectly now.
I was wondering about the 'esp-idf' to be able to set a different 'vad_threshold', but it works fine without changing it.

In this post, there is an explanation on how to set it up this way: https://community.home-assistant.io/t/esphome-voice-assistant-speech-output-to-home-assistant-media-player/588337/37

@Mariusthvdb
Copy link
Author

I can see why/how that could work for you.
We each have our use case

I won’t be using the Echo with an external speaker.

However what remains is that the current software for this device throws these errors while the former didn’t.

I can’t see what benefit would be had from it, given the device specs are as they are.

@edurenye
Copy link

I guess there could be the option to have two different versions of the firmware, a full version and a slim version, that would be the best solution.

But yes, the warning and errors should be fixed in any case.

Isn't it possible to switch back to using an older version of the firmware?

Copy link

As there has been no activity on this issue for 30 days, I am marking it as stale. If you think this is a mistake, please comment below and I will remove the stale label.

@github-actions github-actions bot added the stale label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants