armink / CmBacktrace

Advanced fault backtrace library for ARM Cortex-M series MCU | ARM Cortex-M 系列 MCU 错误追踪库
MIT License
1.7k stars 660 forks source link

using error code instead of the long desc strings; #73

Closed shiyj closed 1 year ago

shiyj commented 1 year ago

using error code instead of the long desc strings,by doing this, the flash usage can reduce 1488 B:

using English

#define CMB_PRINT_LANGUAGE CMB_PRINT_LANGUAGE_ENGLISH
Memory region         Used Size  Region Size  %age Used
          CCMRAM:          0 GB        64 KB      0.00%
             RAM:       65520 B       120 KB     53.32%
           FLASH:      137000 B         1 MB     13.07%

using error code

#define CMB_PRINT_LANGUAGE CMB_PRINT_LANGUAGE_ERROR_CODE
Memory region         Used Size  Region Size  %age Used
          CCMRAM:          0 GB        64 KB      0.00%
             RAM:       65520 B       120 KB     53.32%
           FLASH:      135512 B         1 MB     12.92%
armink commented 1 year ago

这么 1K 多数据量不要节省了吧,工具的易用性也挺重要的

shiyj commented 1 year ago

好的,那是否保留CMB_PRINT_LANGUAGE_CUSTOM让使用者自定义自己的显示方式?

armink commented 1 year ago

可以的哈

shiyj commented 1 year ago

可以的哈

已更新代码