Global Volatile Variable - Changing by JTAG (MEM) not noticed

Bug #1881764 reported by Pascal Enz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
New
Undecided
Unassigned

Bug Description

- release version : arm-none-eabi-gcc (15:6.3.1+svn253039-1build1) 6.3.1 20170620

- whether the toolchain was rebuilt or you are using or binary package : Not rebuild

- host machine : Ubuntu 18.04 x64

- preprocessed testcase for us to reproduce : as it stated below

- symptom(s) : Breakpoint not reached if changed value by debugger (only global defined)

Changing a globally defined volatile variable by debugger, the programm doesn't noticed it.

If I change testVolatileVar by debugger (JTAG on .BSS Memory) in the following example, "nop" Statement is not reached.

If the variable is defined in Local Scope, and the Memory were changed by debugger, it works like intended.

Not working:

volatile uint8_t testVolatileVar = 0;

int main(void)
{
    for(;;)
    {
        if (testVolatileVar == 1)
        {
            asm("nop");
        }
    }
}

Working:

int main(void)
{
    volatile uint8_t testVolatileVar = 0;

    for(;;)
    {
        if (testVolatileVar == 1)
        {
            asm("nop");
        }
    }
}

Pascal Enz (eltronix)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.