-
Notifications
You must be signed in to change notification settings - Fork 13
arc_ocd: Add Status32 halt bit check if jtag_status_ru=0 and target is running #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
arc_ocd: Add Status32 halt bit check if jtag_status_ru=0 and target is running #33
Conversation
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
>$ djtgcfg -d JtagHs2 prog -i 4 -f <fpga bit file to progam>.bit Signed-off-by: Frank Dols <[email protected]>
particularly ARC-EM4 core registers r61 or r62 Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
Signed-off-by: Frank Dols <[email protected]>
…tion Signed-off-by: Frank Dols <[email protected]>
…ss-for-synopsys-dwc-arc-processors/openocd.git into arc-0.7.0-dev-00151
Derived from tcl/interface/digilent-hs1.cfg. JTAG-HS3 has an open drain buffer on pin 14 for SRST to work with PS_SRST_B on Xilinx Zynq SoC. Change-Id: I1e9e72d0511528a61207e318aff937ae9fad5bf9 Signed-off-by: Andreas Färber <[email protected]> Reviewed-on: http://openocd.zylin.com/2728 Tested-by: jenkins Reviewed-by: Robert Jordens <[email protected]> Reviewed-by: Spencer Oliver <[email protected]>
Spotted by gcc:
arm7_9_common.c: In function ‘arm7_9_unset_breakpoint’:
arm7_9_common.c:353:4: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (current_instr == arm7_9->thumb_bkpt)
^~
arm7_9_common.c:356:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
if (retval != ERROR_OK)
^~
The logic won't change once the braces have been added, as the new 'retval'
check only makes sense within the if().
Change-Id: I6a303e118f2150e5eb25c9268ad06de5d8a533b2
Signed-off-by: Aleksander Morgado <[email protected]>
Reviewed-on: http://openocd.zylin.com/3477
Tested-by: jenkins
Reviewed-by: Andreas Färber <[email protected]>
Reviewed-by: Matthias Welwarsky <[email protected]>
Reviewed-by: Freddie Chopin <[email protected]>
It is identical to 2.2. Signed-off-by: Anton Kolesov <[email protected]>
Signed-off-by: Anton Kolesov <[email protected]>
Real version number of EM Starter Kit is 2.3, but documentation references 2.03a by mistake, which made its way into GNU products as well. Signed-off-by: Anton Kolesov <[email protected]>
As documented in openocd manual, 'reset run' command should reset the target and then let it run. There was an issue with that: after reset, target was not being run. This commit fixes this issue.
Configure files is regenerated because after previous commits they are not up to date.
Also, this patch splits invalidation/flushing of each cache on a separate functions.
The patch fixes a bug: when a writing to memory is needed, first of all, we should flush the cache, otherwise it may lead to data inconsistency.
…->state=running In rare cases ARC_JTAG_STAT_RU is set to 0, but STATUS32 halt bit is not "1". This disparancy causes openocd to halt the processor. This patch correctly handles sunch behaviour. Signed-off-by: Evgeniy Didin <[email protected]>
|
Ough, I see now an email. |
|
Hi @anthony-kolesov, If everything is fine with updated commit, could you please apply it? |
|
You should assign merge request to me, when you want me to review it again. |
|
Or, there is actually button to "Request review again". |
| target_call_event_callbacks(target, TARGET_EVENT_HALTED); | ||
| /* In some cases JTAG status register indicates that | ||
| * processor is in halt mode, but processor is still running. | ||
| * We check halt bit of AUX STATUS32 register for setting correct state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dot at the end of the sentence.
| target_call_event_callbacks(target, TARGET_EVENT_HALTED); | ||
| } | ||
| else { | ||
| LOG_DEBUG("Discrepancy of STATUS32[0] HALT bit and ARC_JTAG_STAT_RU, target is still running"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dot at the end of the message, line is too long.
| * We check halt bit of AUX STATUS32 register for setting correct state | ||
| */ | ||
| if ((target->state == TARGET_RUNNING) || (target->state == TARGET_RESET)) { | ||
| CHECK_RETVAL(arc_jtag_read_aux_reg_one(&arc32->jtag_info, AUX_STATUS32_REG, &value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line too long.
|
|
||
| target_call_event_callbacks(target, TARGET_EVENT_HALTED); | ||
| /* In some cases JTAG status register indicates that | ||
| * processor is in halt mode, but processor is still running. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stars go under the star of the first line, not under the slash.
| CHECK_RETVAL(arc_dbg_debug_entry(target)); | ||
| target_call_event_callbacks(target, TARGET_EVENT_HALTED); | ||
| } | ||
| else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect formatting of } and else.
The code of the function is based on: https://github.com/foss-for-synopsys-dwc-arc-processors/openocd/blob/master/src/target/arc_ocd.c#L49 Significant changes: * foss-for-synopsys-dwc-arc-processors#33 * Replaced arc_jtag_read_aux_reg_one() with high-level arc_get_register_value() Signed-off-by: Evgeniy Didin <[email protected]>
The code of the function is based on: https://github.com/foss-for-synopsys-dwc-arc-processors/openocd/blob/master/src/target/arc_ocd.c#L49 Significant changes: * foss-for-synopsys-dwc-arc-processors#33 * Replaced arc_jtag_read_aux_reg_one() with high-level arc_get_register_value() Signed-off-by: Evgeniy Didin <[email protected]>
In rare cases ARC_JTAG_STAT_RU is set to 0, but STATUS32 halt bit is not "1". This
disparancy causes openocd to halt the processor. This patch
correctly handles sunch behaviour.
Signed-off-by: Evgeniy Didin [email protected]