Skip to content

Commit 8209eff

Browse files
committed
8.1.2
1 parent 802c57f commit 8209eff

File tree

5 files changed

+76
-82
lines changed

5 files changed

+76
-82
lines changed

qspy/include/qpc_qs.h

Lines changed: 40 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
//! @endcond
4747

4848
//============================================================================
49-
//! pre-defined QS record IDs (for QS_GLB_FILTER())
50-
enum QS_GlbPre {
49+
//! Pre-defined QS record IDs (for QS_GLB_FILTER())
50+
enum QS_GlbPredef {
5151
// [0] QS session (not maskable)
5252
QS_EMPTY, //!< QS record for cleanly starting a session
5353

@@ -199,10 +199,10 @@ enum QS_GlbPre {
199199
#define QS_USER4 ((enum_t)(QS_USER + 20))
200200

201201
// QS ID group offsets (for QS_LOC_FILTER())
202-
#define QS_ID_AO ((int_fast16_t)0)
203-
#define QS_ID_EP ((int_fast16_t)64)
204-
#define QS_ID_EQ ((int_fast16_t)80)
205-
#define QS_ID_AP ((int_fast16_t)96)
202+
#define QS_ID_AO ((uint_fast16_t)0)
203+
#define QS_ID_EP ((uint_fast16_t)64)
204+
#define QS_ID_EQ ((uint_fast16_t)80)
205+
#define QS_ID_AP ((uint_fast16_t)96)
206206

207207
// QS ID groups (for QS_LOC_FILTER())
208208
#define QS_IDS_ALL ((int_fast16_t)0xF0)
@@ -262,7 +262,9 @@ typedef void (* QSpyFunPtr )(void);
262262
#define QS_FLUSH() (QS_onFlush())
263263

264264
#define QS_BEGIN_ID(rec_, qsId_) \
265-
if (QS_fltCheck_((rec_) >> 5U, (uint32_t)1U << ((rec_) & 0x1FU), (qsId_))) { \
265+
if (QS_fltCheck_((uint32_t)(rec_) >> 5U, \
266+
(uint32_t)1U << ((uint32_t)(rec_) & 0x1FU), \
267+
(qsId_))) { \
266268
QS_CRIT_STAT \
267269
QS_CRIT_ENTRY(); \
268270
QS_beginRec_((uint_fast8_t)(rec_)); \
@@ -274,8 +276,8 @@ if (QS_fltCheck_((rec_) >> 5U, (uint32_t)1U << ((rec_) & 0x1FU), (qsId_))) { \
274276
}
275277

276278
#define QS_BEGIN_INCRIT(rec_, qsId_) \
277-
if (QS_fltCheck_((rec_) >> 5U, \
278-
(uint_fast32_t)1U << ((rec_) & 0x1FU), (qsId_))) \
279+
if (QS_fltCheck_((uint32_t)(rec_) >> 5U, \
280+
(uint_fast32_t)1U << ((uint32_t)(rec_) & 0x1FU), (qsId_))) \
279281
{ \
280282
QS_beginRec_((uint_fast8_t)(rec_)); \
281283
QS_TIME_PRE(); {
@@ -285,7 +287,8 @@ if (QS_fltCheck_((rec_) >> 5U, \
285287
}
286288

287289
#define QS_GLB_CHECK_(rec_) \
288-
(QS_glbCheck_((rec_) >> 5U, (uint_fast32_t)1U << ((rec_) & 0x1FU)))
290+
(QS_glbCheck_((uint32_t)(rec_) >> 5U, \
291+
(uint32_t)1U << ((uint32_t)(rec_) & 0x1FU)))
289292
#define QS_LOC_CHECK_(qsId_) (QS_locCheck_((qsId_)))
290293

291294
#ifndef QS_REC_DONE
@@ -411,18 +414,23 @@ if (QS_fltCheck_((rec_) >> 5U, \
411414
//============================================================================
412415
//! @class QS
413416
typedef struct {
414-
//! @cond INTERNAL
415-
uint8_t dummy;
416-
//! @endcond
417+
uint8_t *buf; //!< @private @memberof QS
418+
QSCtr end; //!< @private @memberof QS
419+
QSCtr head; //!< @private @memberof QS
420+
QSCtr tail; //!< @private @memberof QS
421+
QSCtr used; //!< @private @memberof QS
422+
uint8_t seq; //!< @private @memberof QS
423+
uint8_t chksum; //!< @private @memberof QS
424+
uint8_t critNest; //!< @private @memberof QS
425+
uint8_t flags; //!< @private @memberof QS
417426
} QS;
418427

419-
//! @cond INTERNAL
420-
421-
#if defined(QS_MEM_SYS) || defined(QS_MEM_APP)
422-
#error Memory isolation not supported in this QP edition, need SafeQP
423-
#endif
428+
//! @static @private @memberof QS
429+
extern QS QS_priv_;
424430

425431
//----------------------------------------------------------------------------
432+
//! @cond INTERNAL
433+
426434
//! @struct QS_Filter
427435
typedef struct {
428436
uint32_t glb[4];
@@ -432,22 +440,6 @@ typedef struct {
432440
//! @static @private @memberof QS
433441
extern QS_Filter QS_filt_;
434442

435-
//! @struct QS_Attr
436-
typedef struct {
437-
uint8_t *buf; //!< @private @memberof QS
438-
QSCtr end; //!< @private @memberof QS
439-
QSCtr head; //!< @private @memberof QS
440-
QSCtr tail; //!< @private @memberof QS
441-
QSCtr used; //!< @private @memberof QS
442-
uint8_t seq; //!< @private @memberof QS
443-
uint8_t chksum; //!< @private @memberof QS
444-
uint8_t critNest; //!< @private @memberof QS
445-
uint8_t flags; //!< @private @memberof QS
446-
} QS_Attr;
447-
448-
//! @static @private @memberof QS
449-
extern QS_Attr QS_priv_;
450-
451443
void QS_glbFilter_(int_fast16_t const filterSpec);
452444
void QS_locFilter_(int_fast16_t const filterSpec);
453445

@@ -512,6 +504,9 @@ void QS_assertion_pre_(char const * const module, int_t const id,
512504
#define QS_U64_FMT ((uint8_t)0xEU)
513505
#define QS_HEX_FMT ((uint8_t)0xFU)
514506

507+
//! @endcond
508+
//----------------------------------------------------------------------------
509+
515510
// @struct TProbe
516511
struct QS_TProbe {
517512
QSFun addr;
@@ -533,17 +528,11 @@ typedef struct {
533528

534529
extern QSTestAttr QS_tstPriv_;
535530

536-
void QS_test_pause_(void);
537-
uint32_t QS_getTestProbe_(QSpyFunPtr const api);
538-
539531
struct QS_RxAttr; // forward declaration
540532

541533
//! @static @private @memberof QS
542534
extern struct QS_RxAttr * const QS_rxPriv_;
543535

544-
//! @endcond
545-
//----------------------------------------------------------------------------
546-
547536
//! @static @public @memberof QS
548537
void QS_initBuf(
549538
uint8_t * const sto,
@@ -630,14 +619,12 @@ void QS_onCommand(
630619
uint32_t param2,
631620
uint32_t param3);
632621

633-
//! @cond INTERNAL
634622
typedef enum {
635623
QS_TARGET_NO_RESET,
636624
QS_TARGET_RESET
637625
} QS_ResetAction;
638626

639627
void QS_target_info_pre_(QS_ResetAction const act);
640-
//! @endcond
641628

642629
//============================================================================
643630
#ifdef Q_UTEST
@@ -661,6 +648,10 @@ void QS_onTestPost(
661648
//! @static @public @memberof QS
662649
void QS_onTestLoop(void);
663650

651+
void QS_test_pause_(void);
652+
653+
uint32_t QS_getTestProbe_(QSpyFunPtr const api);
654+
664655
//============================================================================
665656
// QP-stub for QUTest
666657
// NOTE: The QP-stub is needed for unit testing QP applications,
@@ -765,6 +756,13 @@ void QF_schedUnlock(QSchedStatus const prevCeil);
765756
#define QS_TEST_PROBE_ID(id_, code_)
766757
#define QS_TEST_PAUSE() ((void)0)
767758

759+
//----------------------------------------------------------------------------
760+
// memory protection facilities
761+
762+
#ifdef QF_MEM_ISOLATE
763+
#error Memory isolation not supported in this QP edition, need SafeQP
764+
#endif
765+
768766
#endif // Q_UTEST
769767

770768
#endif // QS_H_

qspy/include/qpc_qs_pkg.h

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,9 @@
2929
#define QS_PKG_H_
3030

3131
//============================================================================
32-
//! @cond INTERNAL
33-
34-
//! QS received record types (RX channel)
35-
typedef enum {
36-
QS_RX_INFO, //!< query Target info (ver, config, tstamp)
37-
QS_RX_COMMAND, //!< execute a user-defined command in the Target
38-
QS_RX_RESET, //!< reset the Target
39-
QS_RX_TICK, //!< call system clock tick in the Target
40-
QS_RX_PEEK, //!< peek Target memory
41-
QS_RX_POKE, //!< poke Target memory
42-
QS_RX_FILL, //!< fill Target memory
43-
QS_RX_TEST_SETUP, //!< test setup
44-
QS_RX_TEST_TEARDOWN, //!< test teardown
45-
QS_RX_TEST_PROBE, //!< set a Test-Probe in the Target
46-
QS_RX_GLB_FILTER, //!< set global filters in the Target
47-
QS_RX_LOC_FILTER, //!< set local filters in the Target
48-
QS_RX_AO_FILTER, //!< set local AO filter in the Target
49-
QS_RX_CURR_OBJ, //!< set the "current-object" in the Target
50-
QS_RX_TEST_CONTINUE, //!< continue a test after QS_TEST_PAUSE()
51-
QS_RX_QUERY_CURR, //!< query the "current object" in the Target
52-
QS_RX_EVENT, //!< inject an event to the Target
53-
} QS_RxRecords;
54-
55-
//----------------------------------------------------------------------------
56-
#define QS_FRAME ((uint8_t)0x7EU)
57-
#define QS_ESC ((uint8_t)0x7DU)
58-
#define QS_ESC_XOR ((uint8_t)0x20U)
59-
#define QS_GOOD_CHKSUM ((uint8_t)0xFFU)
60-
61-
//----------------------------------------------------------------------------
6232
#define QS_BEGIN_PRE(rec_, qsId_) \
63-
if (QS_fltCheck_((rec_)>>5U, (uint_fast32_t)1U << ((rec_) & 0x1FU), (qsId_)))\
33+
if (QS_fltCheck_((uint32_t)(rec_)>>5U, \
34+
(uint32_t)1U << ((uint32_t)(rec_) & 0x1FU), (qsId_))) \
6435
{ \
6536
QS_beginRec_((uint_fast8_t)(rec_));
6637

@@ -126,6 +97,33 @@ if (QS_fltCheck_((rec_)>>5U, (uint_fast32_t)1U << ((rec_) & 0x1FU), (qsId_)))\
12697
#define QS_TEC_PRE(ctr_) QS_u32_raw_((uint32_t)(ctr_))
12798
#endif
12899

100+
//----------------------------------------------------------------------------
101+
//! QS received record types (RX channel)
102+
typedef enum {
103+
QS_RX_INFO, //!< query Target info (ver, config, tstamp)
104+
QS_RX_COMMAND, //!< execute a user-defined command in the Target
105+
QS_RX_RESET, //!< reset the Target
106+
QS_RX_TICK, //!< call system clock tick in the Target
107+
QS_RX_PEEK, //!< peek Target memory
108+
QS_RX_POKE, //!< poke Target memory
109+
QS_RX_FILL, //!< fill Target memory
110+
QS_RX_TEST_SETUP, //!< test setup
111+
QS_RX_TEST_TEARDOWN, //!< test teardown
112+
QS_RX_TEST_PROBE, //!< set a Test-Probe in the Target
113+
QS_RX_GLB_FILTER, //!< set global filters in the Target
114+
QS_RX_LOC_FILTER, //!< set local filters in the Target
115+
QS_RX_AO_FILTER, //!< set local AO filter in the Target
116+
QS_RX_CURR_OBJ, //!< set the "current-object" in the Target
117+
QS_RX_TEST_CONTINUE, //!< continue a test after QS_TEST_PAUSE()
118+
QS_RX_QUERY_CURR, //!< query the "current object" in the Target
119+
QS_RX_EVENT, //!< inject an event to the Target
120+
} QS_RxRecords;
121+
122+
#define QS_FRAME ((uint8_t)0x7EU)
123+
#define QS_ESC ((uint8_t)0x7DU)
124+
#define QS_ESC_XOR ((uint8_t)0x20U)
125+
#define QS_GOOD_CHKSUM ((uint8_t)0xFFU)
126+
129127
//----------------------------------------------------------------------------
130128
#define QS_INSERT_BYTE_(b_) \
131129
buf[head] = (b_); \
@@ -147,6 +145,4 @@ if (QS_fltCheck_((rec_)>>5U, (uint_fast32_t)1U << ((rec_) & 0x1FU), (qsId_)))\
147145

148146
#define QS_PTR2UNIT_CAST(T_, ptr_) ((T_)(ptr_))
149147

150-
//! @endcond
151-
152148
#endif // QS_PKG_H_

qspy/include/qspy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef QSPY_H_
1919
#define QSPY_H_
2020

21-
#define QSPY_VER "8.1.1"
21+
#define QSPY_VER "8.1.2"
2222

2323
#ifdef __cplusplus
2424
extern "C" {
@@ -46,10 +46,10 @@ typedef struct {
4646
enum {
4747
QS_MIN_VERSION = 660, // minimum required version
4848
QS_RECORD_SIZE_MAX = 512, // max QS record size [bytes]
49-
QS_LINE_LEN_MAX = 8192, // max length of a QSPY line [chars]
49+
QS_LINE_LEN_MAX = 65528, // max length of a QSPY line [chars]
5050
QS_FNAME_LEN_MAX = 256, // max length of filenames [chars]
5151
QS_SEQ_LIST_LEN_MAX = 1024, // max length of the Seq list [chars]
52-
QS_DNAME_LEN_MAX = 64, // max dictionary name length [chars]
52+
QS_DNAME_LEN_MAX = 128, // max dictionary name length [chars]
5353
};
5454

5555
// pointer to the callback function for customized QS record parsing

qspy/source/qspy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ SigDictionary QSPY_sigDict;
5050
Dictionary QSPY_enumDict[8];
5151

5252
//============================================================================
53-
static DictEntry l_funSto[512];
54-
static DictEntry l_objSto[256];
53+
static DictEntry l_funSto[8192];
54+
static DictEntry l_objSto[2048];
5555
static DictEntry l_usrSto[128 + 1 - QS_USER];
56-
static SigDictEntry l_sigSto[512];
56+
static SigDictEntry l_sigSto[8192];
5757
static DictEntry l_enumSto[8][256];
5858

5959
//............................................................................

0 commit comments

Comments
 (0)