Hello, I'm trying to write a library that would need some DSP/BIOS semaphores (SEM) & mailboxes (MBX). This library is to be used in several projects, so that I would like to make the SEM and MBX declarations in the .c file itself, and not in each project's .cdb file (DSP/BIOS configuration file). For performance & memory footprint reasons, I want to use static declarations (no SEM_create,... functions). For semaphores, It seems to work by using the following code in the .c file : #include <sem.h> SEM_OBJECT(SEM_TEST, 0); -> I can use the semaphore with for example SEM_post(&SEM_TEST); I didn't find such a trick for mailboxes. Is this possible ? If not, I'll be forced to use the configuration tool. Then, how is it possible to use a symbolic value for the mailbox's size and message size ? For example, I have a lib_process.h file containing the message structure PROCESS_MSG for my mailbox. Can I use sizeof(PROCESS_MSG) in the configuration tool ? I suppose that it is not possible, since lib_process.h is not included in the generated files. Jean-Francois |
Static SEM & MBX declarations without DSP/BIOS config file...
Started by ●March 4, 2003