-
Notifications
You must be signed in to change notification settings - Fork 113
feat: add rt-thread sever exmples #113
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
base: main
Are you sure you want to change the base?
Conversation
LINK rtthread.elf
Memory region Used Size Region Size %age Used
arm-none-eabi-objcopy -O binary rtthread.elf rtthread.bin
arm-none-eabi-size rtthread.elf
text data bss dec hex filename
589851 35024 95200 720075 afccb rtthread.elf
scons: done building targets.
Verifying symbols...
60042ee0 T UDSClientInit
60045270 T UDSClientPoll
60044c60 T UDSCtrlDTCSetting
6004aaec T UDSErrIsNRC
6004a10c T UDSErrToStr
6004a8d0 T UDSEventToStr
6004b1dc T UDSISOTpCInit
6004a078 T UDSMillis
6004a090 T UDSSecurityAccessLevelIsReserved
60043a78 T UDSSendBytes
60043c14 T UDSSendCommCtrl
60043cb4 T UDSSendCommCtrlWithNodeID
60043b90 T UDSSendDiagSessCtrl
60043b0c T UDSSendECUReset
60044b4c T UDSSendIOControl
60043e30 T UDSSendRDBI
60044210 T UDSSendRequestDownload
60044838 T UDSSendRequestFileTransfer
60044760 T UDSSendRequestTransferExit
60044398 T UDSSendRequestUpload
600440b4 T UDSSendRoutineCtrl
60044dc4 T UDSSendSecurityAccess
60043db8 T UDSSendTesterPresent
60044520 T UDSSendTransferData
60044644 T UDSSendTransferDataStream
60043fa8 T UDSSendWDBI
60049ae0 T UDSServerInit
60049bd4 T UDSServerPoll
60042e74 t UDSTimeAfter
6004a048 T UDSTpPoll
6004a000 T UDSTpRecv
60049fb8 T UDSTpSend
6004530c T UDSUnpackRDBIResponse
60045120 T UDSUnpackRequestDownloadResponse
60045508 T UDSUnpackRequestFileTransferResponse
60045028 T UDSUnpackRoutineControlResponse
60044f60 T UDSUnpackSecurityAccessResponse
60042eb4 t UDS_LogSDUDummy
6004adf4 T UDS_LogSDUInternal
6004ad80 T UDS_LogWrite
6008dc08 T __fsym_uds_example
6009affc R __fsym_uds_example_desc
6009aff0 R __fsym_uds_example_name
6004ccb0 t uds_example
6004c95c t uds_start
6004cba4 t uds_stop
6004c830 t uds_task_entry
600bc090 b uds_task_tid
✅ Verification Passed: UDS/ISO14229 symbols found in binary!
2025-12-04T00:59:49.4807472Z Found no defects in iso14229.c
2025-12-04T00:59:49.4808772Z [MEDIUM] /home/runner/work/iso14229/iso14229/iso14229.c:3225:13: format string is not a string literal [clang-diagnostic-format-nonliteral]
2025-12-04T00:59:49.4809539Z vprintf(format, list);
2025-12-04T00:59:49.4809824Z ^
2025-12-04T00:59:49.4810111Z Report hash: 0d9c727d5c99316c48bfd66c79aaad3e
2025-12-04T00:59:49.4810460Z Steps:
2025-12-04T00:59:49.4810771Z 1, iso14229.c:3225:13: format string is not a string literal
2025-12-04T00:59:49.4811128Z
2025-12-04T00:59:49.4811875Z Found 1 defect(s) in iso14229.c |
|
driftregion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sticking with this. Please make the attached changes.
ac395c5 to
303b43a
Compare
|
|
#if UDS_SYS == UDS_SYS_RTT
#ifdef UDS_RTTHREAD_ULOG_ENABLED
#define DBG_TAG "UDS.core"
#if (UDS_LOG_LEVEL >= UDS_LOG_DEBUG)
#define DBG_LVL LOG_LVL_DBG
#elif (UDS_LOG_LEVEL == UDS_LOG_INFO)
#define DBG_LVL LOG_LVL_INFO
#elif (UDS_LOG_LEVEL == UDS_LOG_WARN)
#define DBG_LVL LOG_LVL_WARNING
#elif (UDS_LOG_LEVEL == UDS_LOG_ERROR)
#define DBG_LVL LOG_LVL_ERROR
#else
#define DBG_LVL LOG_LVL_ASSERT
#endif
#include <rtdbg.h>
#endif
#endif
#if UDS_LOG_LEVEL > UDS_LOG_NONE
void UDS_LogWrite(UDS_LogLevel_t level, const char *tag, const char *format, ...) {
va_list list;
(void)level;
(void)tag;
va_start(list, format);
#if UDS_SYS == UDS_SYS_RTT
#ifdef UDS_RTTHREAD_ULOG_ENABLED
ulog_voutput(DBG_LVL, DBG_TAG, RT_TRUE, RT_NULL, 0, 0, 0, format, list);
#else
char log_buf[UDS_RTTHREAD_LOG_BUFFER_SIZE];
rt_vsnprintf(log_buf, sizeof(log_buf), format, list);
rt_kprintf("%s", log_buf);
#endif
#else
vprintf(format, list);
#endif
va_end(list);
}
void UDS_LogSDUInternal(UDS_LogLevel_t level, const char *tag, const uint8_t *buffer,
size_t buff_len, UDSSDU_t *info) {
(void)info;
#if UDS_SYS == UDS_SYS_RTT && defined(UDS_RTTHREAD_ULOG_ENABLED)
ulog_hexdump(tag, 16, (rt_uint8_t *)buffer, buff_len);
#else
for (unsigned i = 0; i < buff_len; i++) {
UDS_LogWrite(level, tag, "%02x ", buffer[i]);
}
UDS_LogWrite(level, tag, "\n");
#endif
}
#endi
|



No description provided.