Skip to content

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

Closed
@robertorojosil

Description

@robertorojosil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions