mirror of https://github.com/ARMmbed/mbed-os.git
Add more information to error url to enhance error analytics
parent
9ca15a77e1
commit
f10ed4b286
|
@ -25,6 +25,7 @@
|
||||||
#include "platform/mbed_error_hist.h"
|
#include "platform/mbed_error_hist.h"
|
||||||
#include "platform/mbed_interface.h"
|
#include "platform/mbed_interface.h"
|
||||||
#include "platform/mbed_power_mgmt.h"
|
#include "platform/mbed_power_mgmt.h"
|
||||||
|
#include "platform/mbed_stats.h"
|
||||||
#ifdef MBED_CONF_RTOS_PRESENT
|
#ifdef MBED_CONF_RTOS_PRESENT
|
||||||
#include "rtx_os.h"
|
#include "rtx_os.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -454,6 +455,8 @@ static void print_threads_info(const osRtxThread_t *threads)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
#define GET_TARGET_NAME_STR(tgt_name) #tgt_name
|
||||||
|
#define GET_TARGET_NAME(tgt_name) GET_TARGET_NAME_STR(tgt_name)
|
||||||
static void print_error_report(const mbed_error_ctx *ctx, const char *error_msg, const char *error_filename, int error_line)
|
static void print_error_report(const mbed_error_ctx *ctx, const char *error_msg, const char *error_filename, int error_line)
|
||||||
{
|
{
|
||||||
int error_code = MBED_GET_ERROR_CODE(ctx->error_status);
|
int error_code = MBED_GET_ERROR_CODE(ctx->error_status);
|
||||||
|
@ -539,11 +542,18 @@ static void print_error_report(const mbed_error_ctx *ctx, const char *error_msg,
|
||||||
mbed_error_printf("\nDelay:");
|
mbed_error_printf("\nDelay:");
|
||||||
print_threads_info(osRtxInfo.thread.delay_list);
|
print_threads_info(osRtxInfo.thread.delay_list);
|
||||||
#endif
|
#endif
|
||||||
mbed_error_printf(MBED_CONF_PLATFORM_ERROR_DECODE_HTTP_URL_STR, ctx->error_status);
|
#if !defined(MBED_SYS_STATS_ENABLED)
|
||||||
|
mbed_error_printf("\nFor more info, visit: https://mbed.com/s/error?error=0x%08X&tgt=" GET_TARGET_NAME(TARGET_NAME), ctx->error_status);
|
||||||
|
#else
|
||||||
|
mbed_stats_sys_t sys_stats;
|
||||||
|
mbed_stats_sys_get(&sys_stats);
|
||||||
|
mbed_error_printf("\nFor more info, visit: https://mbed.com/s/error?error=0x%08X&osver=%d&core=0x%08X&comp=%d&ver=%d&tgt=" GET_TARGET_NAME(TARGET_NAME), ctx->error_status, sys_stats.os_version, sys_stats.cpu_id, sys_stats.compiler_id, sys_stats.compiler_version);
|
||||||
|
#endif
|
||||||
mbed_error_printf("\n-- MbedOS Error Info --\n");
|
mbed_error_printf("\n-- MbedOS Error Info --\n");
|
||||||
}
|
}
|
||||||
#endif //ifndef NDEBUG
|
#endif //ifndef NDEBUG
|
||||||
|
|
||||||
|
|
||||||
#if MBED_CONF_PLATFORM_ERROR_HIST_ENABLED
|
#if MBED_CONF_PLATFORM_ERROR_HIST_ENABLED
|
||||||
//Retrieve the error context from error log at the specified index
|
//Retrieve the error context from error log at the specified index
|
||||||
mbed_error_status_t mbed_get_error_hist_info(int index, mbed_error_ctx *error_info)
|
mbed_error_status_t mbed_get_error_hist_info(int index, mbed_error_ctx *error_info)
|
||||||
|
|
|
@ -108,11 +108,6 @@
|
||||||
"value": null
|
"value": null
|
||||||
},
|
},
|
||||||
|
|
||||||
"error-decode-http-url-str": {
|
|
||||||
"help": "HTTP URL string for ARM Mbed-OS Error Decode microsite",
|
|
||||||
"value": "\"\\nFor more info, visit: https://armmbed.github.io/mbedos-error/?error=0x%08X\""
|
|
||||||
},
|
|
||||||
|
|
||||||
"cthunk_count_max": {
|
"cthunk_count_max": {
|
||||||
"help": "The maximum CThunk objects used at the same time. This must be greater than 0 and less 256",
|
"help": "The maximum CThunk objects used at the same time. This must be greater than 0 and less 256",
|
||||||
"value": 8
|
"value": 8
|
||||||
|
|
|
@ -201,6 +201,8 @@ class mbedToolchain:
|
||||||
if MBED_ORG_USER:
|
if MBED_ORG_USER:
|
||||||
self.cxx_symbols.append('MBED_USERNAME=' + MBED_ORG_USER)
|
self.cxx_symbols.append('MBED_USERNAME=' + MBED_ORG_USER)
|
||||||
|
|
||||||
|
# Add target's name
|
||||||
|
self.cxx_symbols += ["TARGET_NAME=" + self.target.name]
|
||||||
# Add target's symbols
|
# Add target's symbols
|
||||||
self.cxx_symbols += self.target.macros
|
self.cxx_symbols += self.target.macros
|
||||||
# Add target's hardware
|
# Add target's hardware
|
||||||
|
|
Loading…
Reference in New Issue