Forum : Ride IDE
Post Information | Post |
---|---|
July 11, 2011 - 5:26pm
|
We are working and sharing code alongside another company which is using the IAR IDE. We are providing functions for the other company to use by providing an .elf file. This .elf file contains functions they are going to use and it is generated in Ride7. We've also given them absolute addresses of our functions so they can call our functions from our .elf file inside their code. In their code, they are using FreeRTOS and a semaphore which will be used as a flag to symbolize that an AtoD conversion has been completed. Because we handle the AtoD conversion in one of our functions, it is up to us to release the semaphore at the end of the conversion. However, the semaphore is property of their OS. Is it possible to access and release their semaphore from inside of our code? I know I can release the semaphore using the following command: portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; ( void ) pvParameters; for( ;; ) So how do we access their semaphore? Thanks, |
Aaron,
The semaphore can be shared as a RAM object, then you can declare it as extern in your library and release it as usual.
Also the xSemaphoreGiveFromISR() function will have to be shared if necessary -but the best may perhaps be to just copy the source from FreeRTOS and plug it in your library source, so that you do not have any linker name collision).
There should not be any specific trick once you manage to share RAM objects between IAR and GCC.
I hope this helps.