Skip to content
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

gdb-server: L0xx has no FP_CTRL register for breakpoints #273

Closed
ghost opened this issue Oct 14, 2014 · 2 comments · Fixed by #341
Closed

gdb-server: L0xx has no FP_CTRL register for breakpoints #273

ghost opened this issue Oct 14, 2014 · 2 comments · Fixed by #341

Comments

@ghost
Copy link

ghost commented Oct 14, 2014

There is no FP_CTRL register on the L0xx. In gdb-server.c, you have:

static void init_code_breakpoints(stlink_t *sl) {
    memset(sl->q_buf, 0, 4);
    stlink_write_debug32(sl, CM3_REG_FP_CTRL, 0x03 /*KEY | ENABLE4*/);
    if(...){
        ELOG("[FP_CTRL] = 0x%08x expecting 0x%08x\n", val,
    ...
    }
    ...
}

This causes the following error in st-util output:

$ ./st-util
2014-10-14T13:33:23 INFO src/stlink-common.c: Loading device parameters....
2014-10-14T13:33:23 INFO src/stlink-common.c: Device connected is: L0x3 device
...
2014-10-14T13:33:23 INFO gdbserver/gdb-server.c: Listening at *:4242...
2014-10-14T13:33:39 ERROR gdbserver/gdb-server.c: [FP_CTRL] = 0x00000041 expecting 0x00000261

The FPB and its registers have been replaced by the BPU on the M0 chips. Please see the ARM Info Center and its section on BPU functionality in the Debug section of the "Cortex M0 Technical Reference Manual".

@xor-gate xor-gate changed the title L0xx: no FP_CTRL register gdb-server: L0xx has no FP_CTRL register for breakpoints May 20, 2016
@xor-gate xor-gate added this to the Unplanned (Contributions Welcome) milestone Jun 2, 2016
@xor-gate xor-gate removed this from the Unplanned (Contributions Welcome) milestone Aug 11, 2017
@xor-gate
Copy link
Member

Should work with latest 1.4.0 release.

@Nightwalker-87
Copy link
Member

Closed by #341.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants