Skip to content

Conversation

@wdfk-prog
Copy link

No description provided.

@wdfk-prog
Copy link
Author

  • I have successfully completed the construction workflow of RTT and made necessary modifications to the related issues.
  • I don't know why the calculation shows that the CI cannot be automatically triggered in your warehouse. You can check that my warehouse's CI is functioning properly.

https://github.com/wdfk-prog/iso14229/actions/runs/19914345653/job/57089838925

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!
  • However, there is a scanning issue here. I don't think it's my problem.
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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 4, 2025

Copy link
Owner

@driftregion driftregion left a 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.

@wdfk-prog wdfk-prog force-pushed the main branch 2 times, most recently from ac395c5 to 303b43a Compare January 20, 2026 07:32
@sonarqubecloud
Copy link

@wdfk-prog
Copy link
Author

@wdfk-prog
Copy link
Author

#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
  • This modification appears somewhat unappealing. Should a __WEAK defined function be implemented? Or would it be better to write this function specifically for this RTT?

@wdfk-prog
Copy link
Author

@driftregion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants