This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28335: Docking station - Is it possible to modify a variable in real time from the computer through serial port

Part Number: TMS320F28335


Tool/software:

Hello,

I am using the Docking station with the F28335 eval board. 

I would like to change the value of a variable in real time. By real time, I mean without having to pause the execution.

Indeed, in debug, I need to press pause to change a variable.

Is it possible to do it through Serial Port, by using some third pary app like Putty ?

Thank you for your answer,

Matteo

  • Hi,

    Is it possible to do it through Serial Port, by using some third pary app like Putty ?

    This would only be possible if you configure the SCI module on the control card to do so and use a serial DB9 cable. You wouldn't have to use Putty, you can also write to a serial port with CCS.

    Indeed, in debug, I need to press pause to change a variable.

    Are you sure this is true? At least on newer C2000 devices, this is not the case. Have you set your expressions to continuous refresh? 

    Best Regards,

    Ben Collier

  • Hello Benjamin,

    Thank you very much for your answer.

    Are you sure this is true? At least on newer C2000 devices, this is not the case. Have you set your expressions to continuous refresh? 

    While running, even with continious refresh enabled, I have this:

    I tried to enable real time mode in the debug session:

    As you can see, enable silicon real time mode is pressed, continous refresh as well, and I still don't have updated value in my watch expression (when I halt, I have the values and I can edit)

    I dit the same through the project properties

    But when trying to launch a debug, I have this error:  

    Error connecting to the target:
    (Error -1133 @ 0x0)
    Device blocked debug access because it is currently executing non-debuggable code. You may retry after the device has had time to enter debuggable code, or you may cancel, disable realtime mode, and then attempt to connect.
    (Emulation package 9.11.0.00128)

    And after un-checking Enable Polite Mode, but keeping enable realtime mode, I have this error:

    Error connecting to the target:
    (Error -1133 @ 0x0)
    Device blocked debug access because it is currently executing non-debuggable code. You may retry after the device has had time to enter debuggable code, or you may cancel, disable realtime mode, and then attempt to connect.
    (Emulation package 9.11.0.00128)

    Thank you

    Best regards

  • Hi,

    Do you have this problem even when running a basic example, like the LED example? 

    Best Regards,

    Ben Collier

  • Hello,

    It was not working either.

    I found a solution to make it work: I declared my variable as static.

    Do you know why it made it works?

    Best regards,

    Mattéo

  • Matteo,

    If declaring your variable as static solved your issue, then I guess that means these were all local variables? If they were being declared in a loop, then the address at which they are being stored could be constantly changing and thus the debug probe wouldn't know where to read/write. 

    Changing the variable to static will make it so that the address is not changed during each declaration, and the value of the variable may possibly remain constant each time it is declared.

    I imagine you would also not have this issue with a global variable. If you want to learn more about this, there are plenty of places to read about this, since this is a general C functionality not related to our MCU. 

    Best Regards,

    Ben Collier