NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
nashpa has quit [Ping timeout: 248 seconds]
dliviu has joined #openocd
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
nerozero has joined #openocd
nerozero has quit [Ping timeout: 252 seconds]
nerozero has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Haohmaru has joined #openocd
dnm has quit [Ping timeout: 255 seconds]
nohit has quit [Ping timeout: 255 seconds]
nohit has joined #openocd
dnm has joined #openocd
knicklicht has joined #openocd
merethan_ has joined #openocd
wingsorc has quit [Ping timeout: 256 seconds]
knicklicht has quit [Quit: Client closed]
nerozero has quit [Ping timeout: 255 seconds]
Guest30 has joined #openocd
nerozero has joined #openocd
<Guest30> Hi there guys, could anyone give me an update about the FreeRTOS --rtos support? I mean the default vanilla port work as intended, but any different port such as the one using the FPU or the MPU (or both) won't be able to correctly parse the running threads on the target system. Is there any way to accomplish this without resorting to either patch
<Guest30> the FreeRTOS or the openOCD ?
dnm has quit [Ping timeout: 255 seconds]
dnm has joined #openocd
<PaulFertser> Guest30: hi
<PaulFertser> Guest30: no, not really, nothing is configurable. However FPU should work, it's supported in the stacking.
<PaulFertser> Guest30: what's your target MCU core?
Haohmaru has quit []
merethan_ has quit [Ping timeout: 255 seconds]
<Guest30> sorry about the delay, it's an cortex-M4 with both MPU and FPU in use
<Mis012[m]> PaulFertser: looking at the openocd source, it seems that 0xf0 is the *mask* for AP bank... so it's trying to access the bank id of 0xf?
<PaulFertser> Guest30: does MPU affect FreeRTOS stacking anyhow?
<PaulFertser> Mis012[m]: not sure. Basically, OpenOCD follows official ADI documentation from arm. You can also always "git blame" the file and see the commit message and Gerrit discussion for any specific line.
<Guest30> Yes it puts some mpu regions in each task's stack, as there is couple of them that can be configure on a per task basis
<PaulFertser> That's often a great source of the information.
<PaulFertser> Guest30: guess one has to extend it then. It shouldn't be too hard for a C developer ;)
<Guest30> As I remember from an old discussion on the FreeRTOS forum, the MPU port changes the TCB item ordering
<Guest30> It could be done, I'm just not familar enough with the openOCD source to know where it should be done.
<Guest30> Do you think the easier path is to add another possible value to the --rtos option? Such as a FreeRTOS-MPU or anything like that
<PaulFertser> Guest30: oh, it's mostly in src/rtos/FreeRTOS.c
<PaulFertser> Guest30: I hope it should be possible to auto-detect and adjust automatically.
<PaulFertser> If it's generic enough, stacking information can be added to rtos_standard_stackings.c
<PaulFertser> Guest30: see freertos_get_thread_reg_list(), it autodetects FPU without too much effort, so should be possible with MPU too.
<Guest30> Ohhhh I see, it checks the floating-point coprocessor register  for it's configuration
<Guest30> soo a similar work could be done for the MPU (assuming target uses teh default MPU implementation from ARM)
<PaulFertser> And LR too, to decide which stacking the particular task is using.
<Guest30> That parsing is done on a capture of the SVC interruption?
josuah has quit [Quit: leaving]
irc has joined #openocd
nerozero has quit [Ping timeout: 255 seconds]
<Mis012[m]> PaulFertser: the AP for core 0 should be 0, right?
irc has joined #openocd
<Mis012[m]> there is no way to specify it, so presumably it has to be derived from the core number itself
Guest30 has quit [Quit: Client closed]
<PaulFertser> Mis012[m]: -ap-num for the target can be specified, it's not necessarily automatic, no.
irc is now known as josuah
<Mis012[m]> mhm
crabbedhaloablut has quit [Quit: No Ping reply in 180 seconds.]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
<Mis012[m]> PaulFertser: what is the default behavior when it's not specified?
olerem has quit [Ping timeout: 260 seconds]
olerem has joined #openocd
wingsorc has joined #openocd