platformio / platform-sifive

SiFive: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/sifive
Apache License 2.0
11 stars 13 forks source link

"Could not get global variable information" #12

Open Daniel-Vindio opened 2 years ago

Daniel-Vindio commented 2 years ago

Hi, While debugging a C program, although variables are detected, their current value is not displayed. Instead, messages appear informing you that the variable object is not found.

Captura de pantalla de 2022-01-16 20-51-04

The notification messages say somethong like:

Could not get global variable information:
from var-update --all-values var_global_<variable_name>

or

Could not get global variable information:
from var-update --all-values var_local_<variable_name>

Any hint or help will be appreciated. Thank you!

Some details about the system:

This is my platformio.ini:

[env:sparkfun_thing_plus_v]
platform = sifive
board = sparkfun_thing_plus_v
framework = freedom-e-sdk

And this is the very simple code I'm trying to debug, as a tutorial

// tutorial.c
// Daniel Gutierrez. 16/01/22. audobra@gmail.com
// Dot product code to learn the PlatformIO tools

#define DIM 3

double dotproduct(int n, double a[], double b[]) {
    volatile int i;
    double sum = 0;

    for (i=0; i<n; i++) {
        sum += a[i]*a[i];
    }
    return sum;
}

int main(void) {
    double x[DIM] = {3, 4, 5}; // x is an array of size 3(DIM)
    double y[DIM] = {1, 2, 3}; // same as y
    double dot;

    dot = dotproduct(DIM, x, y);
    return dot;
}
withoutcandy commented 10 months ago

I have same problems,if you solve it now,please give me some information,i'll appreciate it.