244 #error "Don't know how to place inline assembly for DMB"
245 #else
246 #define RTT__DMB()
247 #endif
248#endif
249
250#ifndef SEGGER_RTT_CPU_CACHE_LINE_SIZE
251 #define SEGGER_RTT_CPU_CACHE_LINE_SIZE (0) // On most target systems where RTT is used, we do not have a CPU cache, therefore 0 is a good default here
252#endif
253
254#ifndef SEGGER_RTT_UNCACHED_OFF
255 #if SEGGER_RTT_CPU_CACHE_LINE_SIZE
256 #error "SEGGER_RTT_UNCACHED_OFF must be defined when setting SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0"
257 #else
258 #define SEGGER_RTT_UNCACHED_OFF (0)
259 #endif
260#endif
261#if RTT_USE_ASM
262 #if SEGGER_RTT_CPU_CACHE_LINE_SIZE
263 #error "RTT_USE_ASM is not available if SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0"
264 #endif
265#endif
266
267#ifndef SEGGER_RTT_ASM // defined when SEGGER_RTT.h is included from assembly file
305constchar* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4"
306char* pBuffer; // Pointer to start of buffer
307unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty.
308unsigned WrOff; // Position of next item to be written by either target.
309volatileunsigned RdOff; // Position of next item to be read by host. Must be volatile since it may be modified by host.
310unsigned Flags; // Contains configuration flags. Flags[31:24] are used for validity check and must be zero. Flags[23:2] are reserved for future use. Flags[1:0] = RTT operating mode.
318constchar* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4"
319char* pBuffer; // Pointer to start of buffer
320unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty.
321volatileunsigned WrOff; // Position of next item to be written by host. Must be volatile since it may be modified by host.
322unsigned RdOff; // Position of next item to be read by target (down-buffer).
323unsigned Flags; // Contains configuration flags. Flags[31:24] are used for validity check and must be zero. Flags[23:2] are reserved for future use. Flags[1:0] = RTT operating mode.
406#define SEGGER_RTT_HASDATA_UP(n) (((SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[n] + SEGGER_RTT_UNCACHED_OFF))->WrOff - ((SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[n] + SEGGER_RTT_UNCACHED_OFF))->RdOff) // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly