Does the uC/OS-II plug-in require the use of OSAL (i.e. adi_osal and adi_rtl functions)? How can I setup uC/OS-II without using OSAL? My application does not require the System Service libraries and I am trying to reduce unnecessary memory overhead.
Sorry about the delay getting back to you.
You’re right, there does seem to be quite a lot of code associated with registering an interrupt, a little more than we would expect. The table you submitted does have a couple of double entries (adi_sic_EnableInt and adi_rtl_disable_interrupts), but the numbers you provide do seem consistent.
We’ve had a look through the code, and it seems correct for the required functionality:
- installing and uninstalling core interrupts,
- Installing system interrupts to IVG7-15,
- and any initialization and error handling code.
We’ve logged an internal request to review these modules to see if they can be optimized for space without impacting performance or functionality. If we are able to do so, then the changes will be available in a future release.
uCOS-II does call some of the adi_rtl functions.
uCOS-II does not call any OSAL functions (OSAL calls the OS, not the other way round).
Be aware that System Service libraries are not the only user of OSAL, it is also used by the runtime libraries, interrupts, and also called from some startup routines. As such, it may be quite hard to remove OSAL without getting link errors.
Linker elimination is enabled by default on CrossCore Embedded Studio projects. Any code or data that your application does not use should be eliminated by the linker, and will not appear in your dxe. It is worthwhile to look at what is being used within your application to get an idea of what is taking up space.
To see what is actually being linked-in, set the Generate symbol map option in:
project properties > C/C++ Build > Settings > CrossCore Blackfin Linker > General.
This will give you a <projectname>.map.xml file in your output folder.
To see what is being eliminated, set the Verbose Output option in:
project properties > C/C++ Build > Settings > CrossCore Blackfin Linker > Elimination
This will list all the objects being removed in your CCES console.
Please let us know if this helps.
Thanks for the correction on the OSAL->OS call order. I have done the steps you suggested with the linker elimination, but I still see a lot of questionable code (libraries) being pulled in. For example the adi_int_InstallHandler() function call is required to register an interrupt with uC/OS-II from the documentation I read (please correct me if I am wrong). Well adding this function call pulls in 2k of code. From the Xref output (see attached) I can see this function call is referencing various OSAL and RTL functions. This amount of code seems excessive to support installing an interrupt handler. Can you explain?
Retrieving data ...