read contents of program counter in C

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

LeeT
Posts: 12
Joined: Thu Jan 10, 2019 6:02 pm

read contents of program counter in C

Postby LeeT » Thu Jan 10, 2019 6:21 pm

Hi. I'm trying to determine which flash bank running code resides in. I'm planning on reading the program counter and use that to determine which bank I'm in. Both GCC and the Arm compiler have some variant of a __current_pc() intrinsic. I haven't been able to find anything like that in TrueStudio (or I haven't found the right include file, directory, something). Can anyone point me to either the location of this function, or another method of finding the information I need. Thanks.

Lee

Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: MSN [Bot] and 3 guests