Skip to content

Commit

Permalink
Cleanup and debug related to nasa#285
Browse files Browse the repository at this point in the history
  • Loading branch information
jphickey committed Apr 20, 2020
1 parent 0624edc commit 8eadb0a
Show file tree
Hide file tree
Showing 168 changed files with 1,500 additions and 3,014 deletions.
19 changes: 15 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,7 @@ target_include_directories(osal_${OSAL_SYSTEM_OSTYPE}_impl PRIVATE
${OSAL_SOURCE_DIR}/src/bsp/shared
)

# Define the external "osal" static library target
# This is a combination of the generic parts with the low level
# system-specific parts
add_library(osal STATIC
set(OSAL_SRCLIST
src/os/shared/src/osapi-binsem.c
src/os/shared/src/osapi-clock.c
src/os/shared/src/osapi-common.c
Expand All @@ -210,6 +207,20 @@ add_library(osal STATIC
src/os/shared/src/osapi-task.c
src/os/shared/src/osapi-timebase.c
src/os/shared/src/osapi-time.c
)

if (OSAL_CONFIG_DEBUG_PRINTF)
list(APPEND OSAL_SRCLIST
src/os/shared/src/osapi-debug.c
)
endif (OSAL_CONFIG_DEBUG_PRINTF)


# Define the external "osal" static library target
# This is a combination of the generic parts with the low level
# system-specific parts
add_library(osal STATIC
${OSAL_SRCLIST}
$<TARGET_OBJECTS:osal_${OSAL_SYSTEM_OSTYPE}_impl>
)

Expand Down
4 changes: 2 additions & 2 deletions default_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set(OSAL_CONFIG_INCLUDE_NETWORK FALSE)
# For deployments which are always statically linked, this may be set
# FALSE for a smaller library size and reduced linking requirements.
#
set(OSAL_CONFIG_INCLUDE_DYNAMIC_LOADER FALSE)
set(OSAL_CONFIG_INCLUDE_DYNAMIC_LOADER TRUE)


#
Expand Down Expand Up @@ -91,7 +91,7 @@ set(OSAL_CONFIG_INCLUDE_STATIC_LOADER TRUE)
# - If the user does not have permission to create elevated priority tasks, then the tasks will
# be created at the default priority (no error).
#
set(OSAL_CONFIG_DEBUG_PERMISSIVE_MODE FALSE)
set(OSAL_CONFIG_DEBUG_PERMISSIVE_MODE TRUE)

#
# OSAL_CONFIG_DEBUG_PRINTF
Expand Down
3 changes: 2 additions & 1 deletion src/os/portable/os-impl-posix-dl-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
*/
#include <string.h>
#include <stdlib.h>
#include "os-impl.h"

#include "os-impl-loader.h"
#include "osapi-module-impl.h"



Expand Down
4 changes: 2 additions & 2 deletions src/os/portable/os-impl-posix-dl-symtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
*/
#include <string.h>
#include <stdlib.h>
#include "os-impl.h"
#include "os-impl-loader.h"

#include "os-impl-loader.h"
#include "osapi-module-impl.h"

/****************************************************************************************
DEFINES
Expand Down
1 change: 0 additions & 1 deletion src/os/portable/os-impl-posix-files.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

#include "os-impl-files.h"
#include "osapi-file-impl.h"
#include "osapi-common-impl.h"


/****************************************************************************************
Expand Down
1 change: 0 additions & 1 deletion src/os/portable/os-impl-posix-gettime.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

#include <osapi.h>
#include "os-impl-gettime.h"
#include "osapi-common-impl.h"
#include "osapi-clock-impl.h"


Expand Down
1 change: 0 additions & 1 deletion src/os/portable/os-impl-posix-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

#include "os-impl-io.h"
#include "osapi-file-impl.h"
#include "osapi-common-impl.h"
#include "osapi-select-impl.h"


Expand Down
4 changes: 3 additions & 1 deletion src/os/posix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ set(POSIX_BASE_SRCLIST
src/os-impl-console.c
src/os-impl-countsem.c
src/os-impl-dirs.c
src/os-impl-errors.c
src/os-impl-files.c
src/os-impl-filesys.c
src/os-impl-fpu.c
src/os-impl-heap.c
src/os-impl-idmap.c
src/os-impl-interrupts.c
src/os-impl-mutex.c
src/os-impl-queues.c
Expand All @@ -40,7 +42,7 @@ set(POSIX_IMPL_SRCLIST
# then build the module loader
if (OSAL_CONFIG_INCLUDE_DYNAMIC_LOADER)
list(APPEND POSIX_IMPL_SRCLIST
src/os-impl-module.c
src/os-impl-loader.c
../portable/os-impl-posix-dl-loader.c
../portable/os-impl-posix-dl-symtab.c
)
Expand Down
9 changes: 6 additions & 3 deletions src/os/posix/inc/os-posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
#include <sys/types.h>
#include <sys/signal.h>

#include "common_types.h"
#include "osapi.h"
#include "osapi-common-impl.h"
/*
* Use the global definitions from the shared layer
*/
#include <osapi-shared-globaldefs.h>

/****************************************************************************************
DEFINES
Expand Down Expand Up @@ -99,6 +100,8 @@ int32 OS_Posix_StreamAPI_Impl_Init(void);
int32 OS_Posix_DirAPI_Impl_Init(void);
int32 OS_Posix_FileSysAPI_Impl_Init(void);

int32 OS_Posix_TableMutex_Init(uint32 idtype);

int32 OS_Posix_InternalTaskCreate_Impl (pthread_t *pthr, uint32 priority, size_t stacksz, PthreadFuncPtr_t entry, void *entry_arg);
void OS_Posix_CompAbsDelayTime( uint32 msecs , struct timespec * tm);

Expand Down
Loading

0 comments on commit 8eadb0a

Please sign in to comment.