Hi guys
I decide to evaluate Segger J-Link, and tested the example in the ChibiOS-Contrib section
However, when I run it in the debugger; it is as if ChibiOS thinks it is running in a thread contexts although chSysHalt("SV#6")
Clearly I can see in the debuuger that I am in a DMA ISR , which invokes macro CH_CFG_IRQ_PROLOGUE_HOOK() that is delegated to SEGGER_SYSVIEW_RecordEnterISR() method
Therefore, I wonder if this is a bug, or my J-Link hardware is bad, or I did something wrong?
Many thanks in advance.
I get chSysHalt("SV#6") while running ChibiOS-Contrib-RT-STM32F407-DISCOVERY-RTT+SystemView Example Topic is solved
- Abusous2000
- Posts: 15
- Joined: Fri Jul 05, 2019 1:26 am
- Has thanked: 7 times
- Been thanked: 3 times
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: I get chSysHalt("SV#6") while running ChibiOS-Contrib-RT-STM32F407-DISCOVERY-RTT+SystemView Example
Hi,
It is contributed material so not a ChibiOS bug, this should go in support section, I suggest you contact the author about the problem.
Giovanni
It is contributed material so not a ChibiOS bug, this should go in support section, I suggest you contact the author about the problem.
Giovanni
- Abusous2000
- Posts: 15
- Joined: Fri Jul 05, 2019 1:26 am
- Has thanked: 7 times
- Been thanked: 3 times
Re: I get chSysHalt("SV#6") while running ChibiOS-Contrib-RT-STM32F407-DISCOVERY-RTT+SystemView Example
Thanks Giovanni,
I did. However, it took me few hours & I found the bug. I had to reverse engineer ChibiOS. I applied the below fix, & Segger's System view worked right away. Let 's hope it help someone
I changed these macros in file SEGGER_SYSVIEW_ChibiOS.h to the following, it did work well with no exceptions. You will find in bold what I have changed.
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
_dbg_check_enter_isr(); \
SEGGER_SYSVIEW_RecordEnterISR(); \
_CH_CFG_IRQ_PROLOGUE_HOOK(); \
}
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
_dbg_check_leave_isr(); \
_CH_CFG_IRQ_EPILOGUE_HOOK(); \
port_lock_from_isr(); \
_dbg_enter_lock(); \
if (_isr_is_tail() && chSchIsPreemptionRequired()) { \
SEGGER_SYSVIEW_RecordExitISRToScheduler(); \
} else { \
SEGGER_SYSVIEW_RecordExitISR(); \
} \
_dbg_leave_lock(); \
}
I did. However, it took me few hours & I found the bug. I had to reverse engineer ChibiOS. I applied the below fix, & Segger's System view worked right away. Let 's hope it help someone
I changed these macros in file SEGGER_SYSVIEW_ChibiOS.h to the following, it did work well with no exceptions. You will find in bold what I have changed.
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
_dbg_check_enter_isr(); \
SEGGER_SYSVIEW_RecordEnterISR(); \
_CH_CFG_IRQ_PROLOGUE_HOOK(); \
}
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
_dbg_check_leave_isr(); \
_CH_CFG_IRQ_EPILOGUE_HOOK(); \
port_lock_from_isr(); \
_dbg_enter_lock(); \
if (_isr_is_tail() && chSchIsPreemptionRequired()) { \
SEGGER_SYSVIEW_RecordExitISRToScheduler(); \
} else { \
SEGGER_SYSVIEW_RecordExitISR(); \
} \
_dbg_leave_lock(); \
}