Per-BSP confdefs (or resource allocation)

Joel Sherrill joel.sherrill at oarcorp.com
Wed Oct 21 20:00:56 UTC 2015



On 10/21/2015 2:53 PM, Isaac Gutekunst wrote:
> Hi Devel,
>
> I looked for a while, but couldn't find a way to specify what resources (semaphores, tasks,
> etc) a BSP requires for an empty project (empty Init function).
>
> I took a look at this page:
> https://docs.rtems.org/doc-current/share/rtems/html/bsp_howto/Initialization-Code-The-RTEMS-Configuration-Table.html
> but couldn't glean the correct method.
>
> What is the preferred way to do so?
>
> Our BSP uses a number of resources for hardware drivers, including UART, CAN, SPI, I2C and
> Ethernet.
>
>

Starting out, the easiest thing to do is turn on unified workspace
and unlimited resources.

#define CONFIGURE_UNLIMITED_OBJECTS
#define CONFIGURE_UNIFIED_WORK_AREAS

This sets things up as a single pool of memory for malloc and RTEMS
and does not place a limit on how many objects you can create. You
keep going until you run out of work space.

After that, you will need to figure out how many objects each driver
really uses and consider that the base set which an application
configuration must account for. There isn't really any system for
this built in.

--joel



More information about the devel mailing list