Undefined Reference to PV_getaddr

I am trying to use the PV_getaddr function from the Sys_Lib, but I get “Undefined Reference to PV_getaddr” when I compile.
Things I have tried:

  • Update library versions
  • Delete the sys_lib and re-add it
  • Uninstall and Reinstall AS 4.9 (SP

The sys_lib is in CPU.sw for my hardware configuration, and the editor recognizes the function. My project otherwise compiles, and I don’t use the sys_lib for anything else.

Any ideas?

It looks like that function is only valid for SG3 Systems according to this help page. Since you are using Automation Studio 4.9 I would assume that your CPU is SG4.

You may wish to try using PV_xgetadr() function instead as this doesn’t appear to have the SG3 restriction.

1 Like


If you use a SG4 target (Intel / Arm) you have to use pv_xgetadr instead.

Best regards!


Thank you both. The target type was the issue. PV_xgetadr works perfectly for me.

Good to hear. Please mark the reply that helped you. I guess it is a one from Alexander.