Espressif8266 OOM docs wrong
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- documentation, embedded-iot
Hướng nghiên cứu
Mở phần Debug Level trên trang tài liệu Espressif8266 và so sánh ví dụ build_flags của phần này với báo cáo PlatformIO được liên kết. Nếu cần, hãy tái tạo cấu hình platformio.ini được hiển thị, sau đó cập nhật hướng dẫn để hướng dẫn về out-of-memory detector không gây ra lỗi biên dịch assembly; xác minh rằng ví dụ được ghi trong tài liệu vẫn có thể sử dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
https://docs.platformio.org/en/latest/platforms/espressif8266.html#debug-level says to basically add
build_flags =
-DDEBUG_ESP_PORT=Serial
-DDEBUG_ESP_OOM
-include "umm_malloc/umm_malloc_cfg.h"
to the platformio.ini of a Arduino-ESP8266 project to enable the out-of-memory detection system in the core.
However, the -include flags leads to a multitude of compile errors the moment an assembly file (cont.S) is compiled. Full platformio.ini of
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
monitor_speed = 74880
build_flags =
-DDEBUG_ESP_PORT=Serial
-DDEBUG_ESP_OOM
-include "umm_malloc/umm_malloc_cfg.h"
Results in
Compiling .pio\build\nodemcuv2\FrameworkArduino\cont.S.o
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h: Assembler messages:
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:22: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:23: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:26: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:27: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:30: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:31: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:34: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:35: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:38: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:39: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:42: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:43: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:46: Error: unknown opcode or format name 'typedef'
c:\users\max\.platformio\packages\[email protected]\xtensa-lx106-elf\include\machine\_default_types.h:47: Error: unknown opcode or format name 'typedef'
This header file is not assembly-file safe.
Removing the -include instruction allows for succesful compilation, and seemingly working OOM detection in a minimal example code
#include <Arduino.h>
void setup() {
delay(1000);
Serial.begin(74880);
Serial.println("Testing out-of-memory...");
}
void loop() {
Serial.println("Mallocing 5K.."); Serial.flush();
void* ptr = malloc(5 * 1024);
Serial.print("Alloced ptr "); Serial.println((unsigned int) ptr, HEX);
Serial.print("Now free: " );
Serial.println(ESP.getFreeHeap());
if(ptr == nullptr) {
Serial.println("malloc() returned NULL!! Ran out of memory");
delay(10000); //"halt"
}
}
with the last few lines of the output being
Now free: 712
Mallocing 5K..
:oom(5120)@main.cpp:11
Alloced ptr 0
which does not come from the sketch code but from the OOM detector.
The documentation should be corrected in regards for activating the out-of-memory detector, or any other features that can be enabled through umm_malloc_cfg.h.
- Ngôn ngữ chính
- Python
- Star
- 288
- Fork
- 361
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của platformio/platformio-docs
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
platformio/platformio-docs#409 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
platformio/platformio-docs#406 ·
-
SOS ENABLED HELMETĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
platformio/platformio-docs#398 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
platformio/platformio-docs#393 · 1 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
platformio/platformio-docs#390 ·
Tất cả issue của platformio/platformio-docs
Issue tương tự
-
docs(contributing): the two things that silently block a PRCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởavailable documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100
Nixitov/Riptide-Native#944 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
JTHCode/secretguard#24 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: middleware documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainer thường phản hồi trong vòng 1 ngày