Skip to content

Conversation

@EvgeniiDidin
Copy link
Member

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]

fdols added 30 commits November 17, 2014 17:18
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]>
…ss-for-synopsys-dwc-arc-processors/openocd.git into arc-0.7.0-dev-00151
afaerber and others added 14 commits May 11, 2017 16:06
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]>
@anthony-kolesov
Copy link
Contributor

Ough, I see now an email.

@EvgeniiDidin
Copy link
Member Author

Hi @anthony-kolesov,

If everything is fine with updated commit, could you please apply it?
After that we could finally close the #30 issue.

@anthony-kolesov
Copy link
Contributor

anthony-kolesov commented May 28, 2019

You should assign merge request to me, when you want me to review it again.

@anthony-kolesov anthony-kolesov self-assigned this May 28, 2019
@anthony-kolesov anthony-kolesov self-requested a review May 28, 2019 15:53
@anthony-kolesov
Copy link
Contributor

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
Copy link
Contributor

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");
Copy link
Contributor

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));
Copy link
Contributor

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.
Copy link
Contributor

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 {
Copy link
Contributor

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.

@anthony-kolesov anthony-kolesov removed their assignment May 28, 2019
EvgeniiDidin added a commit to EvgeniiDidin/openocd that referenced this pull request Jun 27, 2019
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]>
EvgeniiDidin added a commit to EvgeniiDidin/openocd that referenced this pull request Oct 25, 2019
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants