Commit d0205e76 authored by julien.delange's avatar julien.delange
Browse files

1. introduce __po_hi_get_port_name and __po_hi_get_port_model_name

   functions to get information from models

2. Move all rule of generate Makefiles into Makefile.common

3. Add a all-with-tweak to address the configuration ticket
   (issue #5 on the forge)




git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@572 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent fe23e85e
......@@ -57,6 +57,7 @@
int POSIX_Init ();
#define CONFIGURE_MAXIMUM_POSIX_THREADS __PO_HI_NB_TASKS + 4
#define CONFIGURE_MAXIMUM_TASKS 16
#define CONFIGURE_EXTRA_TASK_STACKS (20 * RTEMS_MINIMUM_STACK_SIZE)
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES __PO_HI_NB_TASKS + 1
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES __PO_HI_NB_TASKS + 1
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
......
......@@ -41,4 +41,8 @@ int __po_hi_transport_send_default (__po_hi_task_id id, __po_hi_po
* Default transport layer
*/
const char* __po_hi_get_port_model_name (const __po_hi_port_t port);
const char* __po_hi_get_port_name (const __po_hi_port_t port);
#endif /* __PO_HI_TRANSPORT__ */
# It detect if networking functions have to be compiled
# With the generated code.
all: build-node
all-with-tweak:
$(MAKE) all ENABLE_DYNAMIC_CONFIGURATION=1
include $(RUNTIME_PATH)/make/Makefile.$(TARGET)
-include ../../userdefined.mk
build-node: compile-c-files compile-ada-files compile-node
################################################################################
# Configuration
#
......@@ -30,6 +37,13 @@ CFLAGS=-Wall $(USER_CFLAGS) $(TARGET_CFLAGS) -Werror
CPPFLAGS=$(CFLAGS) $(USER_CPPFLAGS)
LDFLAGS=$(TARGET_LDFLAGS) $(USER_LDFLAGS)
ifeq ($(ENABLE_DYNAMIC_CONFIGURATION),1)
CFLAGS+=-D__PO_HI_USE_DYNAMIC_CONFIGURATION
endif
ifdef TARGET_INCLUDE
INCLUDE=-I. -I$(RUNTIME_PATH)/include/ $(TARGET_INCLUDE)
else
......
......@@ -37,6 +37,8 @@ extern __po_hi_local_port_t __po_hi_port_global_to_local[__PO_HI_NB_PORTS];
extern __po_hi_request_t* __po_hi_gqueues_most_recent_values[__PO_HI_NB_TASKS];
extern __po_hi_uint8_t* __po_hi_gqueues_n_destinations[__PO_HI_NB_TASKS];
extern __po_hi_port_t** __po_hi_gqueues_destinations[__PO_HI_NB_TASKS];
extern const char* __po_hi_port_global_model_names[__PO_HI_NB_PORTS];
extern const char* __po_hi_port_global_names[__PO_HI_NB_PORTS];
int __po_hi_transport_send_default (__po_hi_task_id id, __po_hi_port_t port)
{
......@@ -122,3 +124,15 @@ __po_hi_entity_t __po_hi_get_entity_from_global_port (const __po_hi_port_t port)
{
return __po_hi_port_global_to_entity[port];
}
const char* __po_hi_get_port_name (const __po_hi_port_t port)
{
return (__po_hi_port_global_names[port]);
}
const char* __po_hi_get_port_model_name (const __po_hi_port_t port)
{
return (__po_hi_port_global_model_names[port]);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment