Per-BSP confdefs (or resource allocation)

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Oct 22 07:16:36 UTC 2015


On 22/10/15 09:00, Chris Johns wrote:
> In the mean time could linker sets be used in drivers or BSPs to declare
> a table of "resources" they need and these are added to the confdefs.h
> defined values during initialisation?

Yes, this would probably work. You should however compare the complexity of

1) linker sets
     + dynamic workspace size changes
     + static pre-processor based workspace size estimate (just look at 
the pre-processed output of confdefs.h)
     + workspace (heap)
     + objects
     + side-effects, e.g. subsystem which doesn't account for its resources
     + initialization order
     + run-time initialization errors

vs.

2) provide some storage (16 bytes for a mutex on a 32-bit target)
     + initialize the object (= initialize storage to zero, no possible 
errors, may reside in .bss)

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list