What is 'getPC()'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What is 'getPC()'

522 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by khfreiberg on Fri Oct 26 12:28:16 MST 2012
Hi all,
I found this call in the dualcore example for the new Keil board.

extern uint32_t getPC(void);

/**
* FIXME: Keil M0 startup code bug!
* This is not required for other compilers.
**/
getPC();

But since I can not build due to missing files I wasn't able to find the code behind this call. Even UltraEdits 'searchInFiles' could not locate it. I assume it returns the program counter of the M0.
Does anybody know something about this call or the bug?
Labels (1)
0 Kudos
2 Replies

492 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by khfreiberg on Mon Oct 29 16:08:23 MST 2012
Thanks,
that's why, I searched in .c and .h only.
I'll try if it fixes our problems.
0 Kudos

492 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Paul on Mon Oct 29 14:56:08 MST 2012
Hello
I don't know about the bug, but the getPC function is defined in the startup_LPC43xx_M0.s and startup_LPC43xx.s files in the Keil dual core example:

                AREA    |.text|,CODE, READONLY
getPC           PROC
                EXPORT  getPC

                MOV     R0,LR
                BX      LR

                ENDP
0 Kudos