- Rename `assets` and `config` partitions to `system` and `data` - Change partition type from `spiffs` to `fat`, so we can have sub-directories - Fix crash when doing WiFi scan: Increased system event task size to 3kB. - Free up IRAM on ESP32 (it was required for the Core2, but I also freed up the same amount for Yellow Board) - Introduced `Paths` objects that can be retrieved by `AppContext` and `ServiceContext`. Apps and services now have their own relative paths. Assets were re-arranged into the correct paths. - Rename simulator window title to "Tactility" - Refactored statusbar widget so it persists icon paths properly (it kept a const char* reference, but didn't copy it, so it crashed when the related std::string was destroyed) - Created `Partitions.h` to expose some useful variables - Moved USB config in various `sdkconfig` (it was part of the "default" section, but it shouldn't be) - Updated domain name
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
#ifdef ESP_TARGET
|
|
|
|
#include "QrUrl.h"
|
|
|
|
#include "kernel/PanicHandler.h"
|
|
#include "Log.h"
|
|
|
|
#include <sstream>
|
|
#include <esp_cpu_utils.h>
|
|
|
|
std::string getUrlFromCrashData() {
|
|
auto* crash_data = getRtcCrashData();
|
|
auto* stack_buffer = (uint32_t*) malloc(crash_data->callstackLength * 2 * sizeof(uint32_t));
|
|
for (int i = 0; i < crash_data->callstackLength; ++i) {
|
|
const CallstackFrame&frame = crash_data->callstack[i];
|
|
uint32_t pc = esp_cpu_process_stack_pc(frame.pc);
|
|
#if CRASH_DATA_INCLUDES_SP
|
|
uint32_t sp = frame.sp;
|
|
#endif
|
|
stack_buffer[i * 2] = pc;
|
|
#if CRASH_DATA_INCLUDES_SP
|
|
stack_buffer[(i * 2) + 1] = sp;
|
|
#endif
|
|
}
|
|
|
|
std::stringstream stream;
|
|
|
|
stream << "https://oops.tactility.one";
|
|
stream << "?v=" << TT_VERSION; // Version
|
|
stream << "&a=" << CONFIG_IDF_TARGET; // Architecture
|
|
stream << "&s="; // Stacktrace
|
|
|
|
for (int i = crash_data->callstackLength - 1; i >= 0; --i) {
|
|
uint32_t pc = stack_buffer[(i * 2)];
|
|
stream << std::hex << pc;
|
|
#if CRASH_DATA_INCLUDES_SP
|
|
uint32_t sp = stack_buffer[(i * 2) + 1];
|
|
stream << std::hex << sp;
|
|
#endif
|
|
}
|
|
|
|
free(stack_buffer);
|
|
|
|
return stream.str();
|
|
}
|
|
|
|
#endif
|