square / pylink

Python Library for device debugging/programming via J-Link
https://pylink.readthedocs.io/en/latest/
Other
350 stars 127 forks source link

rtt_write only working when I have JLink RTT viewer open #194

Closed carriegong closed 8 months ago

carriegong commented 8 months ago

I might have something set up wrong

jlink = pylink.JLink()
print("connecting to JLink...")
jlink.open()
print("connecting to NRF52840_XXAA...") 
jlink.set_tif(pylink.enums.JLinkInterfaces.SWD)
jlink.connect("NRF52840_XXAA") # need to change this if we change the board we are working with
print("connected, starting RTT...")
jlink.rtt_start()

but my script works on write only when i have JLink RTT view open at the same time.

hkpeprah commented 8 months ago

Can you run with verbose logging and see what the output is (when you don't have the RTT view open):

import logging

logging.basicConfig(level=logging.DEBUG)
carriegong commented 8 months ago

Can you run with verbose logging and see what the output is (when you don't have the RTT view open):

import logging

logging.basicConfig(level=logging.DEBUG)
DEBUG:pylink.jlink:TB975E00 000:013.377
DEBUG:pylink.jlink:Firmware: J-Link V9 compiled May  7 2021 16:26:12
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:014.248
DEBUG:pylink.jlink:Firmware: J-Link V9 compiled May  7 2021 16:26:12
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:014.767
DEBUG:pylink.jlink:Decompressing FW timestamp took 286 us
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:029.333
DEBUG:pylink.jlink:Hardware: V9.60
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:029.609
DEBUG:pylink.jlink:S/N: 583650655
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:029.941
DEBUG:pylink.jlink:OEM: SEGGER
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:030.492
DEBUG:pylink.jlink:Feature(s): GDB, RDI, FlashBP, FlashDL, JFlash, RDDI
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:036.809
DEBUG:pylink.jlink:TELNET listener socket opened on port 19021
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:037.391
DEBUG:pylink.jlink:WEBSRV WEBSRV_Init(): Starting webserver thread(s)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:037.927
DEBUG:pylink.jlink:WEBSRV Webserver running on local port 19080
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:038.156
DEBUG:pylink.jlink:- 35.340ms returns "O.K."

DEBUG:pylink.jlink:TB975E00 000:038.471
DEBUG:pylink.jlink:JLINK_SetHookUnsecureDialog

DEBUG:pylink.jlink:TB975E00 000:038.644
DEBUG:pylink.jlink:JLINK_SetHookUnsecureDialog(...)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:038.930
DEBUG:pylink.jlink:- 0.517ms returns 0

connecting to NRF52840_XXAA...
DEBUG:pylink.jlink:TB975E00 000:039.060
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:039.147
DEBUG:pylink.jlink:- 0.116ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:039.212
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:039.267
DEBUG:pylink.jlink:- 0.082ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:039.340
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:039.398
DEBUG:pylink.jlink:- 0.084ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:039.459
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:039.513
DEBUG:pylink.jlink:- 0.081ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:039.568
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:039.620
DEBUG:pylink.jlink:- 0.078ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:039.677
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:039.732
DEBUG:pylink.jlink:- 4.005ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:043.985
DEBUG:pylink.jlink:JLINK_TIF_GetAvailable(...)

DEBUG:pylink.jlink:TB975E00 000:045.816
DEBUG:pylink.jlink:- 1.984ms

DEBUG:pylink.jlink:TB975E00 000:046.164
DEBUG:pylink.jlink:JLINK_TIF_Select(JLINKARM_TIF_SWD)

DEBUG:pylink.jlink:TB975E00 000:048.104
DEBUG:pylink.jlink:- 2.107ms returns 0x00

DEBUG:pylink.jlink:TB975E00 000:048.350
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:048.455
DEBUG:pylink.jlink:- 0.155ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:048.661
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:048.824
DEBUG:pylink.jlink:- 0.219ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:048.971
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:049.120
DEBUG:pylink.jlink:- 0.203ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:049.330
DEBUG:pylink.jlink:JLINK_DEVICE_GetIndex(sDeviceName = NRF52840_XXAA)

DEBUG:pylink.jlink:TB975E00 000:061.935
DEBUG:pylink.jlink:- 12.741ms returns 3376

DEBUG:pylink.jlink:TB975E00 000:062.157
DEBUG:pylink.jlink:JLINK_DEVICE_GetInfo(DeviceIndex = -1)

DEBUG:pylink.jlink:TB975E00 000:062.350
DEBUG:pylink.jlink:- 0.302ms returns 9817

DEBUG:pylink.jlink:TB975E00 000:062.515
DEBUG:pylink.jlink:JLINK_DEVICE_GetInfo(DeviceIndex = 3376)

DEBUG:pylink.jlink:TB975E00 000:062.655
DEBUG:pylink.jlink:- 0.193ms returns 0

DEBUG:pylink.jlink:TB975E00 000:062.890
DEBUG:pylink.jlink:JLINK_ExecCommand("Device = NRF52840_XXAA", ...).

INFO:pylink.jlink:Device "NRF52840_XXAA" selected.
DEBUG:pylink.jlink:TB975E00 000:064.236
DEBUG:pylink.jlink:Device "NRF52840_XXAA" selected.
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:064.882
DEBUG:pylink.jlink:- 1.961ms returns 0x00

DEBUG:pylink.jlink:TB975E00 000:065.020
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:065.204
DEBUG:pylink.jlink:- 0.293ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:065.362
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:065.456
DEBUG:pylink.jlink:- 0.148ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:065.551
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:065.654
DEBUG:pylink.jlink:- 0.160ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:065.842
DEBUG:pylink.jlink:JLINK_SetSpeed(0)

INFO:pylink.jlink:InitTarget() start
DEBUG:pylink.jlink:TB975E00 000:067.877
DEBUG:pylink.jlink:InitTarget() start
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:068.303
DEBUG:pylink.jlink: J-Link Script File: Executing InitTarget()

INFO:pylink.jlink:InitTarget() end
DEBUG:pylink.jlink:TB975E00 000:076.802
DEBUG:pylink.jlink:InitTarget() end
DEBUG:pylink.jlink:

INFO:pylink.jlink:Found SW-DP with ID 0x2BA01477
DEBUG:pylink.jlink:TB975E00 000:081.052
DEBUG:pylink.jlink:Found SW-DP with ID 0x2BA01477
DEBUG:pylink.jlink:

INFO:pylink.jlink:DPIDR: 0x2BA01477
DEBUG:pylink.jlink:TB975E00 000:088.836
DEBUG:pylink.jlink:DPIDR: 0x2BA01477
DEBUG:pylink.jlink:

INFO:pylink.jlink:CoreSight SoC-400 or earlier
DEBUG:pylink.jlink:TB975E00 000:089.508
DEBUG:pylink.jlink:CoreSight SoC-400 or earlier
DEBUG:pylink.jlink:

INFO:pylink.jlink:Scanning AP map to find all available APs
DEBUG:pylink.jlink:TB975E00 000:089.750
DEBUG:pylink.jlink:Scanning AP map to find all available APs
DEBUG:pylink.jlink:

INFO:pylink.jlink:AP[2]: Stopped AP scan as end of AP map has been reached
DEBUG:pylink.jlink:TB975E00 000:093.407
DEBUG:pylink.jlink:AP[2]: Stopped AP scan as end of AP map has been reached
DEBUG:pylink.jlink:

INFO:pylink.jlink:AP[0]: AHB-AP (IDR: 0x24770011)
DEBUG:pylink.jlink:TB975E00 000:093.911
DEBUG:pylink.jlink:AP[0]: AHB-AP (IDR: 0x24770011)
DEBUG:pylink.jlink:

INFO:pylink.jlink:AP[1]: JTAG-AP (IDR: 0x02880000)
DEBUG:pylink.jlink:TB975E00 000:094.358
DEBUG:pylink.jlink:AP[1]: JTAG-AP (IDR: 0x02880000)
DEBUG:pylink.jlink:

INFO:pylink.jlink:Iterating through AP map to find AHB-AP to use
DEBUG:pylink.jlink:TB975E00 000:094.543
DEBUG:pylink.jlink:Iterating through AP map to find AHB-AP to use
DEBUG:pylink.jlink:

INFO:pylink.jlink:AP[0]: Core found
DEBUG:pylink.jlink:TB975E00 000:098.477
DEBUG:pylink.jlink:AP[0]: Core found
DEBUG:pylink.jlink:

INFO:pylink.jlink:AP[0]: AHB-AP ROM base: 0xE00FF000
DEBUG:pylink.jlink:TB975E00 000:099.085
DEBUG:pylink.jlink:AP[0]: AHB-AP ROM base: 0xE00FF000
DEBUG:pylink.jlink:

INFO:pylink.jlink:CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
DEBUG:pylink.jlink:TB975E00 000:101.555
DEBUG:pylink.jlink:CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
DEBUG:pylink.jlink:

INFO:pylink.jlink:Found Cortex-M4 r0p1, Little endian.
DEBUG:pylink.jlink:TB975E00 000:102.103
DEBUG:pylink.jlink:Found Cortex-M4 r0p1, Little endian.
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:205.803
DEBUG:pylink.jlink:-- Max. mem block: 0x00010C20
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:206.814
DEBUG:pylink.jlink:CPU_ReadMem(4 bytes @ 0xE000EDF0)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:209.150
DEBUG:pylink.jlink:CPU_WriteMem(4 bytes @ 0xE000EDF0)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:211.635
DEBUG:pylink.jlink:CPU_ReadMem(4 bytes @ 0xE0002000)
DEBUG:pylink.jlink:

INFO:pylink.jlink:FPUnit: 6 code (BP) slots and 2 literal slots
DEBUG:pylink.jlink:TB975E00 000:214.424
DEBUG:pylink.jlink:FPUnit: 6 code (BP) slots and 2 literal slots
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:215.173
DEBUG:pylink.jlink:CPU_ReadMem(4 bytes @ 0xE000EDFC)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:217.644
DEBUG:pylink.jlink:CPU_WriteMem(4 bytes @ 0xE000EDFC)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:220.309
DEBUG:pylink.jlink:CPU_ReadMem(4 bytes @ 0xE0001000)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:223.005
DEBUG:pylink.jlink:CPU_WriteMem(4 bytes @ 0xE0001000)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:225.516
DEBUG:pylink.jlink:CPU_ReadMem(4 bytes @ 0xE000ED88)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:227.863
DEBUG:pylink.jlink:CPU_WriteMem(4 bytes @ 0xE000ED88)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:229.940
DEBUG:pylink.jlink:CPU_ReadMem(4 bytes @ 0xE000ED88)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:231.920
DEBUG:pylink.jlink:CPU_WriteMem(4 bytes @ 0xE000ED88)
DEBUG:pylink.jlink:

INFO:pylink.jlink:CoreSight components:
DEBUG:pylink.jlink:TB975E00 000:235.018
DEBUG:pylink.jlink:CoreSight components:
DEBUG:pylink.jlink:

INFO:pylink.jlink:ROMTbl[0] @ E00FF000
DEBUG:pylink.jlink:TB975E00 000:235.178
DEBUG:pylink.jlink:ROMTbl[0] @ E00FF000
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:235.342
DEBUG:pylink.jlink:CPU_ReadMem(64 bytes @ 0xE00FF000)
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:240.896
DEBUG:pylink.jlink:CPU_ReadMem(32 bytes @ 0xE000EFE0)
DEBUG:pylink.jlink:

INFO:pylink.jlink:[0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
DEBUG:pylink.jlink:TB975E00 000:246.310
DEBUG:pylink.jlink:[0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:246.769
DEBUG:pylink.jlink:CPU_ReadMem(32 bytes @ 0xE0001FE0)
DEBUG:pylink.jlink:

INFO:pylink.jlink:[0][1]: E0001000 CID B105E00D PID 003BB002 DWT
DEBUG:pylink.jlink:TB975E00 000:250.772
DEBUG:pylink.jlink:[0][1]: E0001000 CID B105E00D PID 003BB002 DWT
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:251.063
DEBUG:pylink.jlink:CPU_ReadMem(32 bytes @ 0xE0002FE0)
DEBUG:pylink.jlink:

INFO:pylink.jlink:[0][2]: E0002000 CID B105E00D PID 002BB003 FPB
DEBUG:pylink.jlink:TB975E00 000:254.788
DEBUG:pylink.jlink:[0][2]: E0002000 CID B105E00D PID 002BB003 FPB
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:255.002
DEBUG:pylink.jlink:CPU_ReadMem(32 bytes @ 0xE0000FE0)
DEBUG:pylink.jlink:

INFO:pylink.jlink:[0][3]: E0000000 CID B105E00D PID 003BB001 ITM
DEBUG:pylink.jlink:TB975E00 000:259.063
DEBUG:pylink.jlink:[0][3]: E0000000 CID B105E00D PID 003BB001 ITM
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:259.272
DEBUG:pylink.jlink:CPU_ReadMem(32 bytes @ 0xE0040FE0)
DEBUG:pylink.jlink:

INFO:pylink.jlink:[0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
DEBUG:pylink.jlink:TB975E00 000:263.026
DEBUG:pylink.jlink:[0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:263.223
DEBUG:pylink.jlink:CPU_ReadMem(32 bytes @ 0xE0041FE0)
DEBUG:pylink.jlink:

INFO:pylink.jlink:[0][5]: E0041000 CID B105900D PID 000BB925 ETM
DEBUG:pylink.jlink:TB975E00 000:266.900
DEBUG:pylink.jlink:[0][5]: E0041000 CID B105900D PID 000BB925 ETM
DEBUG:pylink.jlink:

DEBUG:pylink.jlink:TB975E00 000:267.435
DEBUG:pylink.jlink:- 201.665ms

DEBUG:pylink.jlink:TB975E00 000:267.589
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:267.793
DEBUG:pylink.jlink:- 0.266ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:267.958
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:268.064
DEBUG:pylink.jlink:- 0.166ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:269.020
DEBUG:pylink.jlink:JLINK_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:269.155
DEBUG:pylink.jlink:- 0.200ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:269.290
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:269.422
DEBUG:pylink.jlink:- 0.196ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:269.552
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:269.673
DEBUG:pylink.jlink:- 0.179ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:269.790
DEBUG:pylink.jlink:JLINK_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:269.908
DEBUG:pylink.jlink:- 0.176ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:270.057
DEBUG:pylink.jlink:JLINK_IsHalted()

DEBUG:pylink.jlink:TB975E00 000:270.610
DEBUG:pylink.jlink:- 0.647ms returns FALSE

connected, starting RTT...
DEBUG:pylink.jlink:TB975E00 000:270.785
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:270.989
DEBUG:pylink.jlink:- 0.259ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:271.110
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:271.224
DEBUG:pylink.jlink:- 0.174ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:271.347
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:271.463
DEBUG:pylink.jlink:- 0.172ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:271.584
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:271.716
DEBUG:pylink.jlink:- 0.188ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:271.830
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:271.943
DEBUG:pylink.jlink:- 0.165ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:272.059
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:272.169
DEBUG:pylink.jlink:- 0.163ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:272.321
DEBUG:pylink.jlink:JLINK_RTTERMINAL_Control(Cmd = JLINKARM_RTTERMINAL_CMD_START)

DEBUG:pylink.jlink:TB975E00 000:272.455
DEBUG:pylink.jlink:- 0.222ms returns 0x00

DEBUG:pylink.jlink:TB975E00 000:272.622
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:272.747
DEBUG:pylink.jlink:- 0.185ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:272.864
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:272.976
DEBUG:pylink.jlink:- 0.166ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:273.088
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:273.199
DEBUG:pylink.jlink:- 0.165ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:273.426
DEBUG:pylink.jlink:JLINK_RTTERMINAL_Write(BufferIndex = 0, BufferSize = 0x00000005)

DEBUG:pylink.jlink:TB975E00 000:273.579
DEBUG:pylink.jlink:- 0.223ms returns 0

DEBUG:pylink.jlink:TB975E00 000:277.974
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:278.130
DEBUG:pylink.jlink:- 0.198ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:278.231
DEBUG:pylink.jlink:JLINK_EMU_IsConnected()

DEBUG:pylink.jlink:TB975E00 000:278.339
DEBUG:pylink.jlink:- 0.164ms returns TRUE

DEBUG:pylink.jlink:TB975E00 000:278.458
DEBUG:pylink.jlink:JLINK_IsOpen()

DEBUG:pylink.jlink:TB975E00 000:278.576
DEBUG:pylink.jlink:- 0.173ms returns 0x01

DEBUG:pylink.jlink:TB975E00 000:286.205
DEBUG:pylink.jlink:JLINK_Close()
hkpeprah commented 8 months ago

The log seems to be fine. Can you elaborate on what issue you're running into? Is it throwing an exception when the RTT Viewer isn't open, or?

carriegong commented 8 months ago

The log seems to be fine. Can you elaborate on what issue you're running into? Is it throwing an exception when the RTT Viewer isn't open, or?

No just not writing.. the return for rtt_write is 0 when the viewer is not open. But return is 5 when rtt viewer is open. Not sure why

hkpeprah commented 8 months ago

Can you try running this example to see if it detects the UP and DOWN buffers? https://github.com/square/pylink/blob/master/examples/pylink-rtt

carriegong commented 8 months ago

Yeah the example works without opening the RTT viewer hmm... does the read and write have to be on threads?

hkpeprah commented 8 months ago

The read/write do not need to be on (different) threads.

carriegong commented 8 months ago

well turns out i just needed to add a time.sleep() before writing.. odd. Thanks for your help :)