Hi nxp,
I am trying to use rtt buffers and a j-link to communicate data back and forth from an s32k144w to a pc.
For this purpose I am using pylink at the pc side.
When performing the following steps, everything works fine:
1. Start gdb server on pc
2. Connect to target using gdb server
3. Start communication on pc with Python script using pylink
The first 'weird' behaviour that I see is that when I start my Python script, the s32 breaks in the `Reset_Handler()`, I don't really understand why. When I continue in my debugging session, the script runs without a problem and I can communicate with the s32.
The problem is that when I do not connect to the gdb server, the script doesn't work. It is my gut feeling that the s32 falls in the `Reset_Handler()` and is just stuck there. Do you have any idea what the difference would be in the two situations?
For some more context, in the Python script I perform the following steps:
jlink = pylink.JLink()
jlink.open(ip_addr=ipaddr)
jlink.set_tif(pylink.enums.JLinkInterfaces.SWD)
jlink.connect("S32K144W")
jlink.rtt_start()
while True:
try:
jlink.rtt_get_num_up_buffers() <<<<< The program hangs here
jlink.rtt_get_num_down_buffers()
break
except pylink.errors.JLinkRTTException:
sleep(0.1)
Any pointers to why this is happening would be greatly appreciated!