Skip to content

Commit 8b8b969

Browse files
committed
update segger rtt to fix cast align
1 parent 05969d2 commit 8b8b969

File tree

6 files changed

+545
-31
lines changed

6 files changed

+545
-31
lines changed

hw/bsp/mcx/boards/mcxn947brk/board.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function(update_board TARGET)
1010
CPU_MCXN947VDF_cm33_core0
1111
# port 1 is highspeed
1212
BOARD_TUD_RHPORT=1
13+
BOARD_TUD_MAX_SPEED=OPT_MODE_HIGH_SPEED
1314
)
1415
target_sources(${TARGET} PUBLIC
1516
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/clock_config.c

hw/bsp/mcx/boards/mcxn947brk/board.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ PORT ?= 1
44

55
CFLAGS += -DCPU_MCXN947VDF_cm33_core0
66

7-
JLINK_DEVICE = LPC55S69
8-
PYOCD_TARGET = LPC55S69
7+
JLINK_DEVICE = MCXN947_M33_0
8+
PYOCD_TARGET = MCXN947
99

1010
# flash using pyocd
11-
flash: flash-pyocd
11+
flash: flash-jlink

hw/bsp/mcx/family.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
1414
set(CMAKE_SYSTEM_PROCESSOR cortex-m33 CACHE INTERNAL "System Processor")
1515
set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
1616

17-
set(FAMILY_MCUS LPC55XX CACHE INTERNAL "")
17+
set(FAMILY_MCUS MCXN9 CACHE INTERNAL "")
1818

1919
# enable LTO if supported
2020
include(CheckIPOSupported)

lib/SEGGER_RTT/RTT/SEGGER_RTT.c

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static unsigned char _ActiveTerminal;
306306
#define INIT() \
307307
do { \
308308
volatile SEGGER_RTT_CB* pRTTCBInit; \
309-
pRTTCBInit = (volatile SEGGER_RTT_CB*)((char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); \
309+
pRTTCBInit = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); \
310310
if (pRTTCBInit->acID[0] != 'S') { \
311311
_DoInit(); \
312312
} \
@@ -319,7 +319,7 @@ static void _DoInit(void) {
319319
//
320320
// Initialize control block
321321
//
322-
p = (volatile SEGGER_RTT_CB*)((char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access control block uncached so that nothing in the cache ever becomes dirty and all changes are visible in HW directly
322+
p = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access control block uncached so that nothing in the cache ever becomes dirty and all changes are visible in HW directly
323323
memset((SEGGER_RTT_CB*)p, 0, sizeof(_SEGGER_RTT)); // Make sure that the RTT CB is always zero initialized.
324324
p->MaxNumUpBuffers = SEGGER_RTT_MAX_NUM_UP_BUFFERS;
325325
p->MaxNumDownBuffers = SEGGER_RTT_MAX_NUM_DOWN_BUFFERS;
@@ -581,7 +581,7 @@ unsigned SEGGER_RTT_ReadUpBufferNoLock(unsigned BufferIndex, void* pData, unsign
581581
volatile char* pSrc;
582582

583583
INIT();
584-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
584+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
585585
pBuffer = (unsigned char*)pData;
586586
RdOff = pRing->RdOff;
587587
WrOff = pRing->WrOff;
@@ -673,7 +673,7 @@ unsigned SEGGER_RTT_ReadNoLock(unsigned BufferIndex, void* pData, unsigned Buffe
673673
volatile char* pSrc;
674674
//
675675
INIT();
676-
pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
676+
pRing = (SEGGER_RTT_BUFFER_DOWN*)((uintptr_t)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
677677
pBuffer = (unsigned char*)pData;
678678
RdOff = pRing->RdOff;
679679
WrOff = pRing->WrOff;
@@ -840,7 +840,7 @@ void SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const void* pBuff
840840
// Get "to-host" ring buffer and copy some elements into local variables.
841841
//
842842
pData = (const char *)pBuffer;
843-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
843+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
844844
//
845845
// Check if we will overwrite data and need to adjust the RdOff.
846846
//
@@ -1033,7 +1033,7 @@ unsigned SEGGER_RTT_WriteDownBufferNoLock(unsigned BufferIndex, const void* pBuf
10331033
// It is save to cast that to a "to-host" buffer. Up and Down buffer differ in volatility of offsets that might be modified by J-Link.
10341034
//
10351035
pData = (const char *)pBuffer;
1036-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1036+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
10371037
//
10381038
// How we output depends upon the mode...
10391039
//
@@ -1107,7 +1107,7 @@ unsigned SEGGER_RTT_WriteNoLock(unsigned BufferIndex, const void* pBuffer, unsig
11071107
// Get "to-host" ring buffer.
11081108
//
11091109
pData = (const char *)pBuffer;
1110-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1110+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
11111111
//
11121112
// How we output depends upon the mode...
11131113
//
@@ -1271,7 +1271,7 @@ unsigned SEGGER_RTT_PutCharSkipNoLock(unsigned BufferIndex, char c) {
12711271
//
12721272
// Get "to-host" ring buffer.
12731273
//
1274-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1274+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
12751275
//
12761276
// Get write position and handle wrap-around if necessary
12771277
//
@@ -1326,7 +1326,7 @@ unsigned SEGGER_RTT_PutCharSkip(unsigned BufferIndex, char c) {
13261326
//
13271327
// Get "to-host" ring buffer.
13281328
//
1329-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1329+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
13301330
//
13311331
// Get write position and handle wrap-around if necessary
13321332
//
@@ -1385,7 +1385,7 @@ unsigned SEGGER_RTT_PutChar(unsigned BufferIndex, char c) {
13851385
//
13861386
// Get "to-host" ring buffer.
13871387
//
1388-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1388+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
13891389
//
13901390
// Get write position and handle wrap-around if necessary
13911391
//
@@ -1492,7 +1492,7 @@ int SEGGER_RTT_HasKey(void) {
14921492
int r;
14931493

14941494
INIT();
1495-
pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1495+
pRing = (SEGGER_RTT_BUFFER_DOWN*)((uintptr_t)&_SEGGER_RTT.aDown[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
14961496
RdOff = pRing->RdOff;
14971497
if (RdOff != pRing->WrOff) {
14981498
r = 1;
@@ -1518,7 +1518,7 @@ unsigned SEGGER_RTT_HasData(unsigned BufferIndex) {
15181518
SEGGER_RTT_BUFFER_DOWN* pRing;
15191519
unsigned v;
15201520

1521-
pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1521+
pRing = (SEGGER_RTT_BUFFER_DOWN*)((uintptr_t)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
15221522
v = pRing->WrOff;
15231523
return v - pRing->RdOff;
15241524
}
@@ -1539,7 +1539,7 @@ unsigned SEGGER_RTT_HasDataUp(unsigned BufferIndex) {
15391539
SEGGER_RTT_BUFFER_UP* pRing;
15401540
unsigned v;
15411541

1542-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1542+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
15431543
v = pRing->RdOff;
15441544
return pRing->WrOff - v;
15451545
}
@@ -1570,7 +1570,7 @@ int SEGGER_RTT_AllocDownBuffer(const char* sName, void* pBuffer, unsigned Buffer
15701570

15711571
INIT();
15721572
SEGGER_RTT_LOCK();
1573-
pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1573+
pRTTCB = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
15741574
BufferIndex = 0;
15751575
do {
15761576
if (pRTTCB->aDown[BufferIndex].pBuffer == NULL) {
@@ -1619,7 +1619,7 @@ int SEGGER_RTT_AllocUpBuffer(const char* sName, void* pBuffer, unsigned BufferSi
16191619

16201620
INIT();
16211621
SEGGER_RTT_LOCK();
1622-
pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1622+
pRTTCB = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
16231623
BufferIndex = 0;
16241624
do {
16251625
if (pRTTCB->aUp[BufferIndex].pBuffer == NULL) {
@@ -1674,7 +1674,7 @@ int SEGGER_RTT_ConfigUpBuffer(unsigned BufferIndex, const char* sName, void* pBu
16741674
volatile SEGGER_RTT_BUFFER_UP* pUp;
16751675

16761676
INIT();
1677-
pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1677+
pRTTCB = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
16781678
if (BufferIndex < SEGGER_RTT_MAX_NUM_UP_BUFFERS) {
16791679
SEGGER_RTT_LOCK();
16801680
pUp = &pRTTCB->aUp[BufferIndex];
@@ -1726,7 +1726,7 @@ int SEGGER_RTT_ConfigDownBuffer(unsigned BufferIndex, const char* sName, void* p
17261726
volatile SEGGER_RTT_BUFFER_DOWN* pDown;
17271727

17281728
INIT();
1729-
pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1729+
pRTTCB = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
17301730
if (BufferIndex < SEGGER_RTT_MAX_NUM_DOWN_BUFFERS) {
17311731
SEGGER_RTT_LOCK();
17321732
pDown = &pRTTCB->aDown[BufferIndex];
@@ -1769,7 +1769,7 @@ int SEGGER_RTT_SetNameUpBuffer(unsigned BufferIndex, const char* sName) {
17691769
volatile SEGGER_RTT_BUFFER_UP* pUp;
17701770

17711771
INIT();
1772-
pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1772+
pRTTCB = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
17731773
if (BufferIndex < SEGGER_RTT_MAX_NUM_UP_BUFFERS) {
17741774
SEGGER_RTT_LOCK();
17751775
pUp = &pRTTCB->aUp[BufferIndex];
@@ -1804,7 +1804,7 @@ int SEGGER_RTT_SetNameDownBuffer(unsigned BufferIndex, const char* sName) {
18041804
volatile SEGGER_RTT_BUFFER_DOWN* pDown;
18051805

18061806
INIT();
1807-
pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1807+
pRTTCB = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
18081808
if (BufferIndex < SEGGER_RTT_MAX_NUM_DOWN_BUFFERS) {
18091809
SEGGER_RTT_LOCK();
18101810
pDown = &pRTTCB->aDown[BufferIndex];
@@ -1840,7 +1840,7 @@ int SEGGER_RTT_SetFlagsUpBuffer(unsigned BufferIndex, unsigned Flags) {
18401840
volatile SEGGER_RTT_BUFFER_UP* pUp;
18411841

18421842
INIT();
1843-
pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1843+
pRTTCB = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
18441844
if (BufferIndex < SEGGER_RTT_MAX_NUM_UP_BUFFERS) {
18451845
SEGGER_RTT_LOCK();
18461846
pUp = &pRTTCB->aUp[BufferIndex];
@@ -1876,7 +1876,7 @@ int SEGGER_RTT_SetFlagsDownBuffer(unsigned BufferIndex, unsigned Flags) {
18761876
volatile SEGGER_RTT_BUFFER_DOWN* pDown;
18771877

18781878
INIT();
1879-
pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1879+
pRTTCB = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
18801880
if (BufferIndex < SEGGER_RTT_MAX_NUM_DOWN_BUFFERS) {
18811881
SEGGER_RTT_LOCK();
18821882
pDown = &pRTTCB->aDown[BufferIndex];
@@ -1930,7 +1930,7 @@ int SEGGER_RTT_SetTerminal (unsigned char TerminalId) {
19301930
ac[0] = 0xFFu;
19311931
if (TerminalId < sizeof(_aTerminalId)) { // We only support a certain number of channels
19321932
ac[1] = _aTerminalId[TerminalId];
1933-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1933+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
19341934
SEGGER_RTT_LOCK(); // Lock to make sure that no other task is writing into buffer, while we are and number of free bytes in buffer does not change downwards after checking and before writing
19351935
if ((pRing->Flags & SEGGER_RTT_MODE_MASK) == SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL) {
19361936
_ActiveTerminal = TerminalId;
@@ -1982,7 +1982,7 @@ int SEGGER_RTT_TerminalOut (unsigned char TerminalId, const char* s) {
19821982
//
19831983
// Get "to-host" ring buffer.
19841984
//
1985-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
1985+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
19861986
//
19871987
// Need to be able to change terminal, write data, change back.
19881988
// Compute the fixed and variable sizes.
@@ -2059,7 +2059,7 @@ int SEGGER_RTT_TerminalOut (unsigned char TerminalId, const char* s) {
20592059
unsigned SEGGER_RTT_GetAvailWriteSpace (unsigned BufferIndex) {
20602060
SEGGER_RTT_BUFFER_UP* pRing;
20612061

2062-
pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
2062+
pRing = (SEGGER_RTT_BUFFER_UP*)((uintptr_t)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
20632063
return _GetAvailWriteSpace(pRing);
20642064
}
20652065

@@ -2086,7 +2086,7 @@ unsigned SEGGER_RTT_GetBytesInBuffer(unsigned BufferIndex) {
20862086
// Avoid warnings regarding volatile access order. It's not a problem
20872087
// in this case, but dampen compiler enthusiasm.
20882088
//
2089-
pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
2089+
pRTTCB = (volatile SEGGER_RTT_CB*)((uintptr_t)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
20902090
RdOff = pRTTCB->aUp[BufferIndex].RdOff;
20912091
WrOff = pRTTCB->aUp[BufferIndex].WrOff;
20922092
if (RdOff <= WrOff) {

0 commit comments

Comments
 (0)