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

OOM debug option: simplify its management and make it compatible with arduino-1.9beta #4357

Merged
merged 3 commits into from
Mar 16, 2018

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Feb 13, 2018

The gcc option -include "..." is broken with arduino-1.9 and was finally not mandatory for oom debug anywhere in its final version.
Tested with arduino 1.8 and 1.9.

This simple sketch

#include <ESP8266WiFi.h>

void setup()
{
  Serial.begin(115200);
  Serial.setDebugOutput(true);

  Serial.println(ESP.getFreeHeap());
  Serial.println((int)malloc(ESP.getFreeHeap() - 300), HEX);
  Serial.println(ESP.getFreeHeap());
  Serial.println((int)malloc(400), HEX);
  Serial.println(ESP.getFreeHeap());

  WiFi.begin("open", "");
}

void loop()
{
}

still shows:

16:05:21.670 -> 46792
16:05:21.670 -> 3FFF0944
16:05:21.670 -> 280
16:05:21.670 -> :oom(400)@/home/gauchard/dev/proj/arduino/oom/oom.ino:11
16:05:21.670 -> 0
16:05:21.670 -> 280
16:05:21.670 -> :oom(1176)@user_interface.c:2248
16:05:21.670 -> :oom(1176)@user_interface.c:2248
16:05:21.670 -> :oom(1176)@user_interface.c:2438
16:05:23.792 -> scandone
16:05:23.792 -> state: 0 -> 2 (b0)
16:05:23.825 -> state: 2 -> 3 (0)
16:05:23.825 -> :oom(208)@esf_buf.c:351
16:05:23.825 -> Fatal exception 29(StoreProhibitedCause):
...

@devyte
Copy link
Collaborator

devyte commented Feb 17, 2018

I don't feel competent to review this (I don't understand the code changes). However, if 1.9 solves the rebuild all issues, then all preparations to move to it are welcome!

@d-a-v d-a-v merged commit 732e22e into esp8266:master Mar 16, 2018
bryceschober pushed a commit to bryceschober/Arduino that referenced this pull request Apr 5, 2018
@electron1979
Copy link

electron1979 commented Sep 16, 2018

IDE 1.8.7 Stable seems to be fine, too.

@d-a-v d-a-v deleted the oom19 branch September 16, 2018 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants