diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/hal/testbuild/Makefile | 4 | ||||
| -rw-r--r-- | test/nil/testbuild/Makefile | 8 | ||||
| -rw-r--r-- | test/nil/testbuild/chconf.h (renamed from test/nil/testbuild/nilconf.h) | 135 | ||||
| -rw-r--r-- | test/nil/testbuild/main.c | 2 | 
4 files changed, 122 insertions, 27 deletions
| diff --git a/test/hal/testbuild/Makefile b/test/hal/testbuild/Makefile index 8fb265acd..aef0c5c9a 100644 --- a/test/hal/testbuild/Makefile +++ b/test/hal/testbuild/Makefile @@ -88,7 +88,7 @@ PROJECT = ch  # Imported source files and paths
  CHIBIOS = ../../..
  # Startup files.
 -include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
 +include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
  # HAL-OSAL files (optional).
  include $(CHIBIOS)/os/hal/hal.mk
  include $(CHIBIOS)/os/hal/templates/platform.mk
 @@ -212,7 +212,7 @@ ULIBS =  # End of user defines
  ##############################################################################
 -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
 +RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
  include $(RULESPATH)/rules.mk
  misra:
 diff --git a/test/nil/testbuild/Makefile b/test/nil/testbuild/Makefile index 58f7ae591..fab44edf0 100644 --- a/test/nil/testbuild/Makefile +++ b/test/nil/testbuild/Makefile @@ -69,7 +69,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)    USE_EXCEPTIONS_STACKSIZE = 0x400
  endif
 -# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
 +# Enables the use of FPU (no, softfp, hard).
  ifeq ($(USE_FPU),)
    USE_FPU = no
  endif
 @@ -88,7 +88,7 @@ PROJECT = ch  # Imported source files and paths
  CHIBIOS = ../../..
  # Startup files.
 -include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk
 +include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk
  # HAL-OSAL files (optional).
  #include $(CHIBIOS)/os/hal/hal.mk
  #include $(CHIBIOS)/os/hal/ports/STM32/STM32F3xx/platform.mk
 @@ -96,7 +96,7 @@ include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk  #include $(CHIBIOS)/os/hal/osal/nil/osal.mk
  # RTOS files (optional).
  include $(CHIBIOS)/os/nil/nil.mk
 -include $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
 +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
  # Other files (optional).
  #include $(CHIBIOS)/test/nil/test.mk
 @@ -212,7 +212,7 @@ ULIBS =  # End of user defines
  ##############################################################################
 -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
 +RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
  include $(RULESPATH)/rules.mk
  ##############################################################################
 diff --git a/test/nil/testbuild/nilconf.h b/test/nil/testbuild/chconf.h index 6718e19ff..bec087660 100644 --- a/test/nil/testbuild/nilconf.h +++ b/test/nil/testbuild/chconf.h @@ -15,7 +15,7 @@  */
  /**
 - * @file    nilconf.h
 + * @file    chconf.h
   * @brief   Configuration file template.
   * @details A copy of this file must be placed in each project directory, it
   *          contains the application specific kernel settings.
 @@ -25,8 +25,10 @@   * @{
   */
 -#ifndef _NILCONF_H_
 -#define _NILCONF_H_
 +#ifndef _CHCONF_H_
 +#define _CHCONF_H_
 +
 +#define _CHIBIOS_NIL_CONF_
  /*===========================================================================*/
  /**
 @@ -40,7 +42,7 @@   * @note    This number is not inclusive of the idle thread which is
   *          Implicitly handled.
   */
 -#define NIL_CFG_NUM_THREADS                 1
 +#define CH_CFG_NUM_THREADS                  1
  /** @} */
 @@ -55,15 +57,15 @@   * @brief   System time counter resolution.
   * @note    Allowed values are 16 or 32 bits.
   */
 -#define NIL_CFG_ST_RESOLUTION               32
 +#define CH_CFG_ST_RESOLUTION                32
  /**
   * @brief   System tick frequency.
 - * @note    This value together with the @p NIL_CFG_ST_RESOLUTION
 + * @note    This value together with the @p CH_CFG_ST_RESOLUTION
   *          option defines the maximum amount of time allowed for
   *          timeouts.
   */
 -#define NIL_CFG_ST_FREQUENCY                1000
 +#define CH_CFG_ST_FREQUENCY                 1000
  /**
   * @brief   Time delta constant for the tick-less mode.
 @@ -73,7 +75,7 @@   *          The value one is not valid, timeouts are rounded up to
   *          this value.
   */
 -#define NIL_CFG_ST_TIMEDELTA                0
 +#define CH_CFG_ST_TIMEDELTA                 0
  /** @} */
 @@ -85,12 +87,79 @@  /*===========================================================================*/
  /**
 + * @brief   Semaphores APIs.
 + * @details If enabled then the Semaphores APIs are included in the kernel.
 + *
 + * @note    The default is @p TRUE.
 + */
 +#define CH_CFG_USE_SEMAPHORES               TRUE
 +
 +/**
 + * @brief   Mutexes APIs.
 + * @details If enabled then the mutexes APIs are included in the kernel.
 + *
 + * @note    Feature not currently implemented.
 + * @note    The default is @p FALSE.
 + */
 +#define CH_CFG_USE_MUTEXES                  FALSE
 +
 +/**
   * @brief   Events Flags APIs.
   * @details If enabled then the event flags APIs are included in the kernel.
   *
   * @note    The default is @p TRUE.
   */
 -#define NIL_CFG_USE_EVENTS                  TRUE
 +#define CH_CFG_USE_EVENTS                   TRUE
 +
 +/**
 + * @brief   Mailboxes APIs.
 + * @details If enabled then the asynchronous messages (mailboxes) APIs are
 + *          included in the kernel.
 + *
 + * @note    The default is @p TRUE.
 + * @note    Requires @p CH_CFG_USE_SEMAPHORES.
 + */
 +#define CH_CFG_USE_MAILBOXES                TRUE
 +
 +/**
 + * @brief   Core Memory Manager APIs.
 + * @details If enabled then the core memory manager APIs are included
 + *          in the kernel.
 + *
 + * @note    The default is @p TRUE.
 + */
 +#define CH_CFG_USE_MEMCORE                  TRUE
 +
 +/**
 + * @brief   Heap Allocator APIs.
 + * @details If enabled then the memory heap allocator APIs are included
 + *          in the kernel.
 + *
 + * @note    The default is @p TRUE.
 + */
 +#define CH_CFG_USE_HEAP                     TRUE
 +
 +/**
 + * @brief   Memory Pools Allocator APIs.
 + * @details If enabled then the memory pools allocator APIs are included
 + *          in the kernel.
 + *
 + * @note    The default is @p TRUE.
 + */
 +#define CH_CFG_USE_MEMPOOLS                 TRUE
 +
 +/**
 + * @brief   Managed RAM size.
 + * @details Size of the RAM area to be managed by the OS. If set to zero
 + *          then the whole available RAM is used. The core memory is made
 + *          available to the heap allocator and/or can be used directly through
 + *          the simplified core memory allocator.
 + *
 + * @note    In order to let the OS manage the whole RAM the linker script must
 + *          provide the @p __heap_base__ and @p __heap_end__ symbols.
 + * @note    Requires @p CH_CFG_USE_MEMCORE.
 + */
 +#define CH_CFG_MEMCORE_SIZE                 0
  /** @} */
 @@ -102,14 +171,40 @@  /*===========================================================================*/
  /**
 + * @brief   Debug option, kernel statistics.
 + *
 + * @note    Feature not currently implemented.
 + * @note    The default is @p FALSE.
 + */
 +#define CH_DBG_STATISTICS                   FALSE
 +
 +/**
 + * @brief   Debug option, system state check.
 + *
 + * @note    The default is @p FALSE.
 + */
 +#define CH_DBG_SYSTEM_STATE_CHECK           FALSE
 +
 +/**
 + * @brief   Debug option, parameters checks.
 + *
 + * @note    The default is @p FALSE.
 + */
 +#define CH_DBG_ENABLE_CHECKS                FALSE
 +
 +/**
   * @brief   System assertions.
 + *
 + * @note    The default is @p FALSE.
   */
 -#define NIL_CFG_ENABLE_ASSERTS              FALSE
 +#define CH_DBG_ENABLE_ASSERTS               FALSE
  /**
   * @brief   Stack check.
 + *
 + * @note    The default is @p FALSE.
   */
 -#define NIL_CFG_ENABLE_STACK_CHECK          FALSE
 +#define CH_DBG_ENABLE_STACK_CHECK           FALSE
  /** @} */
 @@ -123,8 +218,8 @@  /**
   * @brief   System initialization hook.
   */
 -#if !defined(NIL_CFG_SYSTEM_INIT_HOOK) || defined(__DOXYGEN__)
 -#define NIL_CFG_SYSTEM_INIT_HOOK() {                                        \
 +#if !defined(CH_CFG_SYSTEM_INIT_HOOK) || defined(__DOXYGEN__)
 +#define CH_CFG_SYSTEM_INIT_HOOK() {                                         \
  }
  #endif
 @@ -132,13 +227,13 @@   * @brief   Threads descriptor structure extension.
   * @details User fields added to the end of the @p thread_t structure.
   */
 -#define NIL_CFG_THREAD_EXT_FIELDS                                           \
 +#define CH_CFG_THREAD_EXT_FIELDS                                            \
    /* Add threads custom fields here.*/
  /**
   * @brief   Threads initialization hook.
   */
 -#define NIL_CFG_THREAD_EXT_INIT_HOOK(tr) {                                  \
 +#define CH_CFG_THREAD_EXT_INIT_HOOK(tr) {                                   \
    /* Add custom threads initialization code here.*/                         \
  }
 @@ -148,7 +243,7 @@   *          should be invoked from here.
   * @note    This macro can be used to activate a power saving mode.
   */
 -#define NIL_CFG_IDLE_ENTER_HOOK() {                                         \
 +#define CH_CFG_IDLE_ENTER_HOOK() {                                          \
  }
  /**
 @@ -157,14 +252,14 @@   *          should be invoked from here.
   * @note    This macro can be used to deactivate a power saving mode.
   */
 -#define NIL_CFG_IDLE_LEAVE_HOOK() {                                         \
 +#define CH_CFG_IDLE_LEAVE_HOOK() {                                          \
  }
  /**
   * @brief   System halt hook.
   */
 -#if !defined(NIL_CFG_SYSTEM_HALT_HOOK) || defined(__DOXYGEN__)
 -#define NIL_CFG_SYSTEM_HALT_HOOK(reason) {                                  \
 +#if !defined(CH_CFG_SYSTEM_HALT_HOOK) || defined(__DOXYGEN__)
 +#define CH_CFG_SYSTEM_HALT_HOOK(reason) {                                   \
  }
  #endif
 @@ -174,6 +269,6 @@  /* Port-specific settings (override port settings defaulted in nilcore.h).   */
  /*===========================================================================*/
 -#endif  /* _NILCONF_H_ */
 +#endif  /* _CHCONF_H_ */
  /** @} */
 diff --git a/test/nil/testbuild/main.c b/test/nil/testbuild/main.c index 20af5d493..3a1341fb0 100644 --- a/test/nil/testbuild/main.c +++ b/test/nil/testbuild/main.c @@ -14,7 +14,7 @@      limitations under the License.
  */
 -#include "nil.h"
 +#include "ch.h"
  /*
   * Blinker thread #1.
 | 
