Skip to content

Problem stack size SET_LOOP_TASK_STACK_SIZE(12*1024); #8391

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

Closed
1 task done
robertorojosil opened this issue Jul 9, 2023 · 3 comments
Closed
1 task done

Problem stack size SET_LOOP_TASK_STACK_SIZE(12*1024); #8391

robertorojosil opened this issue Jul 9, 2023 · 3 comments
Labels
Type: Question Only question

Comments

@robertorojosil
Copy link

robertorojosil commented Jul 9, 2023

Board

ESP32 Wrover Module

Device Description

ESP32 board connected to LoRa module

Hardware Configuration

GPIO conected between ESP32 and LoRa

Version

v1.0.6

IDE Name

Arduino IDE

Operating System

Windows 11

Flash frequency

40MHz

PSRAM enabled

yes

Upload speed

115200

Description

Hello, good morning everyone,

I was developing my program in Arduino and when running my program I got the following errors:
Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception)
Debug exception reason: Stack canary watchpoint triggered (loopTask)
After a search on the internet, most users agreed on the problem of the stack and the increase of its size, so I added the command: SET_LOOP_TASK_STACK_SIZE( 16*1024 );

This was done by researching here:
#6025
https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/ArduinoStackSize/ArduinoStackSize.ino
https://github.com/espressif/arduino-esp32/pull/6025/files/301f93d9ae2c6e22a7c35993559b580403e07b77
#7824

However when I added the command and compiled, I got this error:
Compilation error: expected constructor, destructor, or type conversion before '((' token

I compile with the ESP32 Wrober module support board, and all the ESP32 libraries are added as I saw in various tutorials. I attach the code in case it might help.

If anyone knows why this error occurs and what I should change I would be very grateful.

Thanks and best regards

Sketch

#include <SPI.h>
#include <LoRa.h>
#include <Arduino.h>

//define the pins used by the transceiver module
#define ssl 5
#define rst 14
#define dio0 2

SET_LOOP_TASK_STACK_SIZE(12*1024);

void setup() {

}


void loop() {
  
}

Debug Message

Compilation error: expected constructor, destructor, or type conversion before '(' token

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@robertorojosil robertorojosil added the Status: Awaiting triage Issue is waiting for triage label Jul 9, 2023
@lbernstone
Copy link
Contributor

This was never supported in 1.0.6. If you want to change the stack size in 1.0.6, your best bet is to change main.cpp.

@robertorojosil
Copy link
Author

I found the error, I take this opportunity to tell you here.

Apparently, and looking at the screenshot you gave me of the examples, it seemed that a part of the ESP32 library was missing. I uninstalled it and reinstalled it but the examples were still missing.

So I decided to uninstall everything I had about Arduino on the computer, reboot it and reinstall it again. And once everything was installed again, the function was there and everything worked correctly.

So nothing, thank you very much to all who helped and I leave this here in case someone has the same error in the future.

@mrengineer7777 mrengineer7777 added Type: Question Only question and removed Status: Awaiting triage Issue is waiting for triage labels Jul 9, 2023
@mrengineer7777
Copy link
Collaborator

Closing as completed. Thanks @lbernstone for the assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Only question
Projects
None yet
Development

No branches or pull requests

3 participants