Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C Language Libraries
#8
Thanks for the replies.

(09-21-2011, 02:57 PM)dro Wrote: Currently the Libraries are only compiled and linked with the Background C Applications.

This is disappointing. I am sure you can see how useful it would be to have a standard library of functions which can be shared between CApps and CPLCs. The project folder structure hints this is the intention. I will have to continue having my functions in .h files and #including them to each file.

(09-21-2011, 02:57 PM)dro Wrote: If you include your lib header file and call the function within BGCPLC or RTICPLCs, the code will compile, but it will crash the Power PMAC RT. The reason for the crash is that once a real time thread calls the BGCPLC or RTICPLC function, it won't be able to link to your Library functions at the runtime and it is going to crash. Please do not use your library functions within the CPLCs, since we are not linking those libraries.

Perhaps this should not build or download.

(09-21-2011, 10:02 AM)Sina Wrote: The BGCPLC and RTICPLC are running in real-time and they are scheduled to run using the real-time scheduler. These libraries are compiled and can be used in background (non-real-time) space, but not in real-time. The RTICPLC and BGCPLC don't have a reference to these libraries, hence they would cause a run-time error and crash the real-time task scheduler.

The naming here is slightly confusing: 'Background CPLCs' are not run in 'Background Space' like 'Background Programs' but executed by the Real-Time scheduler (I guess something has to schedule them, "Writing C Programs in Power PMAC 2011-01.pdf" starts to explains this).

I'll take your word for it and accept that Libraries currently do not work with things in the C Language folder except the Linux apps. I would suggest this would be a useful enhancement for the January release.

Thanks for the explanations
Dave
Reply


Messages In This Thread
C Language Libraries - daves - 09-19-2011, 07:22 AM
RE: C Language Libraries - *** - 09-19-2011, 08:55 AM
RE: C Language Libraries - daves - 09-19-2011, 10:43 AM
RE: C Language Libraries - agovande - 09-19-2011, 10:06 AM
RE: C Language Libraries - daves - 09-19-2011, 10:46 AM
RE: C Language Libraries - Sina - 09-21-2011, 10:02 AM
RE: C Language Libraries - dro - 09-21-2011, 02:57 PM
RE: C Language Libraries - daves - 09-22-2011, 12:33 AM
RE: C Language Libraries - agovande - 09-26-2011, 10:02 AM
RE: C Language Libraries - daves - 09-27-2011, 01:28 AM
RE: C Language Libraries - KEJR - 09-23-2011, 11:07 AM
RE: C Language Libraries - *** - 09-23-2011, 01:37 PM
RE: C Language Libraries - daves - 09-27-2011, 01:23 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)