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.

CCS/F28M36P63C2: Read/Write CPU register from CCS scripting console

Part Number: F28M36P63C2

Tool/software: Code Composer Studio

Hello,

I'm looking for a way to read/write the register (SP, LR, PC, R1,R2...) of the Cortex-M3 from the scripting console while the debug session is halted. I've read doc, examples, forum, I cannot find a way to do it. Anyone has an idea about that?

Thank you by advance

Laurent

  • Hello Laurent,

    There does not appear to be a built-in console command for it. Hence you can call the DSS API for it. 

    In the Scripting Console, try:

    > activeDS.memory.readRegister(<register name>)

    In the example below, I read register "SP", convert the value to Hex, and then print it to the console:

    To write to a register:

    > activeDS.memory.writeRegister(<register name>, <value>)

    Thanks

    ki

  • This is perfect ! thank you

    I've just checked again the doc, and it was documented by I did see it  :'(   shame on me