diff options
| author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-07 10:44:43 +0000 | 
|---|---|---|
| committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-07 10:44:43 +0000 | 
| commit | eefaedd59cccaeddcde8f54f89c98a26cc570e82 (patch) | |
| tree | dc4f07d0b2274ae46865fce952d1750ea187f7db /testhal/STM32L1xx | |
| parent | 084e1f7b5ad7cb86cbe68eb7e1749f7750c89ce3 (diff) | |
| download | ChibiOS-eefaedd59cccaeddcde8f54f89c98a26cc570e82.tar.gz ChibiOS-eefaedd59cccaeddcde8f54f89c98a26cc570e82.tar.bz2 ChibiOS-eefaedd59cccaeddcde8f54f89c98a26cc570e82.zip  | |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6920 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32L1xx')
48 files changed, 0 insertions, 8847 deletions
diff --git a/testhal/STM32L1xx/ADC/.cproject b/testhal/STM32L1xx/ADC/.cproject deleted file mode 100644 index dd444dc30..000000000 --- a/testhal/STM32L1xx/ADC/.cproject +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 -<?fileVersion 4.0.0?>
 -
 -<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
 -	<storageModule moduleId="org.eclipse.cdt.core.settings">
 -		<cconfiguration id="0.1949834469">
 -			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1949834469" moduleId="org.eclipse.cdt.core.settings" name="Default">
 -				<externalSettings/>
 -				<extensions>
 -					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -				</extensions>
 -			</storageModule>
 -			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -				<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1949834469" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
 -					<folderInfo id="0.1949834469." name="/" resourcePath="">
 -						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.2002263541" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
 -							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.2002263541.237760940" name=""/>
 -							<builder id="org.eclipse.cdt.build.core.settings.default.builder.593437193" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1226606600" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.1107382999" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1692514813" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.856069633" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1699553665" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.1403722137" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1776894441" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -						</toolChain>
 -					</folderInfo>
 -				</configuration>
 -			</storageModule>
 -			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
 -		</cconfiguration>
 -	</storageModule>
 -	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -		<project id="STM32L1xx-ADC.null.434200285" name="STM32L1xx-ADC"/>
 -	</storageModule>
 -	<storageModule moduleId="scannerConfiguration">
 -		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
 -		<scannerConfigBuildInfo instanceId="0.1949834469">
 -			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
 -		</scannerConfigBuildInfo>
 -	</storageModule>
 -	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
 -</cproject>
 diff --git a/testhal/STM32L1xx/ADC/.project b/testhal/STM32L1xx/ADC/.project deleted file mode 100644 index 1cd6361af..000000000 --- a/testhal/STM32L1xx/ADC/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
 -<projectDescription>
 -	<name>STM32L1xx-ADC</name>
 -	<comment></comment>
 -	<projects>
 -	</projects>
 -	<buildSpec>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
 -			<triggers>clean,full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
 -			<triggers>full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -	</buildSpec>
 -	<natures>
 -		<nature>org.eclipse.cdt.core.cnature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
 -	</natures>
 -	<linkedResources>
 -		<link>
 -			<name>os</name>
 -			<type>2</type>
 -			<locationURI>CHIBIOS/os</locationURI>
 -		</link>
 -	</linkedResources>
 -</projectDescription>
 diff --git a/testhal/STM32L1xx/ADC/Makefile b/testhal/STM32L1xx/ADC/Makefile deleted file mode 100644 index ad1bb67f8..000000000 --- a/testhal/STM32L1xx/ADC/Makefile +++ /dev/null @@ -1,198 +0,0 @@ -##############################################################################
 -# Build global options
 -# NOTE: Can be overridden externally.
 -#
 -
 -# Compiler options here.
 -ifeq ($(USE_OPT),)
 -  USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
 -endif
 -
 -# C specific options here (added to USE_OPT).
 -ifeq ($(USE_COPT),)
 -  USE_COPT = 
 -endif
 -
 -# C++ specific options here (added to USE_OPT).
 -ifeq ($(USE_CPPOPT),)
 -  USE_CPPOPT = -fno-rtti
 -endif
 -
 -# Enable this if you want the linker to remove unused code and data
 -ifeq ($(USE_LINK_GC),)
 -  USE_LINK_GC = yes
 -endif
 -
 -# Linker extra options here.
 -ifeq ($(USE_LDOPT),)
 -  USE_LDOPT = 
 -endif
 -
 -# Enable this if you want link time optimizations (LTO)
 -ifeq ($(USE_LTO),)
 -  USE_LTO = yes
 -endif
 -
 -# If enabled, this option allows to compile the application in THUMB mode.
 -ifeq ($(USE_THUMB),)
 -  USE_THUMB = yes
 -endif
 -
 -# Enable this if you want to see the full log while compiling.
 -ifeq ($(USE_VERBOSE_COMPILE),)
 -  USE_VERBOSE_COMPILE = no
 -endif
 -
 -#
 -# Build global options
 -##############################################################################
 -
 -##############################################################################
 -# Architecture or project specific options
 -#
 -
 -# Stack size to be allocated to the Cortex-M process stack. This stack is
 -# the stack used by the main() thread.
 -ifeq ($(USE_PROCESS_STACKSIZE),)
 -  USE_PROCESS_STACKSIZE = 0x400
 -endif
 -
 -# Stack size to the allocated to the Cortex-M main/exceptions stack. This
 -# stack is used for processing interrupts and exceptions.
 -ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
 -  USE_EXCEPTIONS_STACKSIZE = 0x400
 -endif
 -
 -#
 -# Architecture or project specific options
 -##############################################################################
 -
 -##############################################################################
 -# Project, sources and paths
 -#
 -
 -# Define project name here
 -PROJECT = ch
 -
 -# Imported source files and paths
 -CHIBIOS = ../../..
 -include $(CHIBIOS)/os/hal/hal.mk
 -include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
 -include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
 -include $(CHIBIOS)/os/hal/osal/rt/osal.mk
 -include $(CHIBIOS)/os/rt/rt.mk
 -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk
 -#include $(CHIBIOS)/test/rt/test.mk
 -
 -# Define linker script file here
 -LDSCRIPT= $(PORTLD)/STM32L152xB.ld
 -
 -# C sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CSRC = $(PORTSRC) \
 -       $(KERNSRC) \
 -       $(TESTSRC) \
 -       $(HALSRC) \
 -       $(OSALSRC) \
 -       $(PLATFORMSRC) \
 -       $(BOARDSRC) \
 -       main.c
 -
 -# C++ sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CPPSRC =
 -
 -# C sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACSRC =
 -
 -# C++ sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACPPSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCPPSRC =
 -
 -# List ASM source files here
 -ASMSRC = $(PORTASM)
 -
 -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
 -         $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
 -         $(CHIBIOS)/os/various
 -
 -#
 -# Project, sources and paths
 -##############################################################################
 -
 -##############################################################################
 -# Compiler settings
 -#
 -
 -MCU  = cortex-m3
 -
 -#TRGT = arm-elf-
 -TRGT = arm-none-eabi-
 -CC   = $(TRGT)gcc
 -CPPC = $(TRGT)g++
 -# Enable loading with g++ only if you need C++ runtime support.
 -# NOTE: You can use C++ even without C++ support if you are careful. C++
 -#       runtime support makes code size explode.
 -LD   = $(TRGT)gcc
 -#LD   = $(TRGT)g++
 -CP   = $(TRGT)objcopy
 -AS   = $(TRGT)gcc -x assembler-with-cpp
 -OD   = $(TRGT)objdump
 -SZ   = $(TRGT)size
 -HEX  = $(CP) -O ihex
 -BIN  = $(CP) -O binary
 -
 -# ARM-specific options here
 -AOPT =
 -
 -# THUMB-specific options here
 -TOPT = -mthumb -DTHUMB
 -
 -# Define C warning options here
 -CWARN = -Wall -Wextra -Wstrict-prototypes
 -
 -# Define C++ warning options here
 -CPPWARN = -Wall -Wextra
 -
 -#
 -# Compiler settings
 -##############################################################################
 -
 -##############################################################################
 -# Start of user section
 -#
 -
 -# List all user C define here, like -D_DEBUG=1
 -UDEFS =
 -
 -# Define ASM defines here
 -UADEFS =
 -
 -# List all user directories here
 -UINCDIR =
 -
 -# List the user directory to look for the libraries here
 -ULIBDIR =
 -
 -# List all user libraries here
 -ULIBS =
 -
 -#
 -# End of user defines
 -##############################################################################
 -
 -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
 -include $(RULESPATH)/rules.mk
 diff --git a/testhal/STM32L1xx/ADC/chconf.h b/testhal/STM32L1xx/ADC/chconf.h deleted file mode 100644 index 68af751f1..000000000 --- a/testhal/STM32L1xx/ADC/chconf.h +++ /dev/null @@ -1,498 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/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.
 - *
 - * @addtogroup config
 - * @details Kernel related settings and hooks.
 - * @{
 - */
 -
 -#ifndef _CHCONF_H_
 -#define _CHCONF_H_
 -
 -/*===========================================================================*/
 -/**
 - * @name System timers settings
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   System time counter resolution.
 - * @note    Allowed values are 16 or 32 bits.
 - */
 -#define CH_CFG_ST_RESOLUTION                16
 -
 -/**
 - * @brief   System tick frequency.
 - * @details Frequency of the system timer that drives the system ticks. This
 - *          setting also defines the system tick time unit.
 - */
 -#define CH_CFG_ST_FREQUENCY                 1000
 -
 -/**
 - * @brief   Time delta constant for the tick-less mode.
 - * @note    If this value is zero then the system uses the classic
 - *          periodic tick. This value represents the minimum number
 - *          of ticks that is safe to specify in a timeout directive.
 - *          The value one is not valid, timeouts are rounded up to
 - *          this value.
 - */
 -#define CH_CFG_ST_TIMEDELTA                 2
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel parameters and options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Round robin interval.
 - * @details This constant is the number of system ticks allowed for the
 - *          threads before preemption occurs. Setting this value to zero
 - *          disables the preemption for threads with equal priority and the
 - *          round robin becomes cooperative. Note that higher priority
 - *          threads can still preempt, the kernel is always preemptive.
 - * @note    Disabling the round robin preemption makes the kernel more compact
 - *          and generally faster.
 - * @note    The round robin preemption is not supported in tickless mode and
 - *          must be set to zero in that case.
 - */
 -#define CH_CFG_TIME_QUANTUM                 0
 -
 -/**
 - * @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
 -
 -/**
 - * @brief   Idle thread automatic spawn suppression.
 - * @details When this option is activated the function @p chSysInit()
 - *          does not spawn the idle thread. The application @p main()
 - *          function becomes the idle thread and must implement an
 - *          infinite loop. */
 -#define CH_CFG_NO_IDLE_THREAD               FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Performance options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   OS optimization.
 - * @details If enabled then time efficient rather than space efficient code
 - *          is used when two possible implementations exist.
 - *
 - * @note    This is not related to the compiler optimization options.
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_OPTIMIZE_SPEED               TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Subsystem options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Time Measurement APIs.
 - * @details If enabled then the time measurement APIs are included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_TM                       TRUE
 -
 -/**
 - * @brief   Threads registry APIs.
 - * @details If enabled then the registry APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_REGISTRY                 TRUE
 -
 -/**
 - * @brief   Threads synchronization APIs.
 - * @details If enabled then the @p chThdWait() function is included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_WAITEXIT                 TRUE
 -
 -/**
 - * @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   Semaphores queuing mode.
 - * @details If enabled then the threads are enqueued on semaphores by
 - *          priority rather than in FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_SEMAPHORES.
 - */
 -#define CH_CFG_USE_SEMAPHORES_PRIORITY      FALSE
 -
 -/**
 - * @brief   Mutexes APIs.
 - * @details If enabled then the mutexes APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MUTEXES                  TRUE
 -
 -/**
 - * @brief   Enables recursive behavior on mutexes.
 - * @note    Recursive mutexes are heavier and have an increased
 - *          memory footprint.
 - *
 - * @note    The default is @p FALSE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_MUTEXES_RECURSIVE        FALSE
 -
 -/**
 - * @brief   Conditional Variables APIs.
 - * @details If enabled then the conditional variables APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_CONDVARS                 TRUE
 -
 -/**
 - * @brief   Conditional Variables APIs with timeout.
 - * @details If enabled then the conditional variables APIs with timeout
 - *          specification are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_CONDVARS.
 - */
 -#define CH_CFG_USE_CONDVARS_TIMEOUT         TRUE
 -
 -/**
 - * @brief   Events Flags APIs.
 - * @details If enabled then the event flags APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_EVENTS                   TRUE
 -
 -/**
 - * @brief   Events Flags APIs with timeout.
 - * @details If enabled then the events APIs with timeout specification
 - *          are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_EVENTS.
 - */
 -#define CH_CFG_USE_EVENTS_TIMEOUT           TRUE
 -
 -/**
 - * @brief   Synchronous Messages APIs.
 - * @details If enabled then the synchronous messages APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MESSAGES                 TRUE
 -
 -/**
 - * @brief   Synchronous Messages queuing mode.
 - * @details If enabled then messages are served by priority rather than in
 - *          FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_MESSAGES.
 - */
 -#define CH_CFG_USE_MESSAGES_PRIORITY        FALSE
 -
 -/**
 - * @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   I/O Queues APIs.
 - * @details If enabled then the I/O queues APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_QUEUES                   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.
 - * @note    Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
 - *          @p CH_CFG_USE_SEMAPHORES.
 - * @note    Mutexes are recommended.
 - */
 -#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   Dynamic Threads APIs.
 - * @details If enabled then the dynamic threads creation APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_WAITEXIT.
 - * @note    Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
 - */
 -#define CH_CFG_USE_DYNAMIC                  TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Debug options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Debug option, kernel statistics.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_STATISTICS                   TRUE
 -
 -/**
 - * @brief   Debug option, system state check.
 - * @details If enabled the correct call protocol for system APIs is checked
 - *          at runtime.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_SYSTEM_STATE_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, parameters checks.
 - * @details If enabled then the checks on the API functions input
 - *          parameters are activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_CHECKS                TRUE
 -
 -/**
 - * @brief   Debug option, consistency checks.
 - * @details If enabled then all the assertions in the kernel code are
 - *          activated. This includes consistency checks inside the kernel,
 - *          runtime anomalies and port-defined checks.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_ASSERTS               TRUE
 -
 -/**
 - * @brief   Debug option, trace buffer.
 - * @details If enabled then the context switch circular trace buffer is
 - *          activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_TRACE                 TRUE
 -
 -/**
 - * @brief   Debug option, stack checks.
 - * @details If enabled then a runtime stack check is performed.
 - *
 - * @note    The default is @p FALSE.
 - * @note    The stack check is performed in a architecture/port dependent way.
 - *          It may not be implemented or some ports.
 - * @note    The default failure mode is to halt the system with the global
 - *          @p panic_msg variable set to @p NULL.
 - */
 -#define CH_DBG_ENABLE_STACK_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, stacks initialization.
 - * @details If enabled then the threads working area is filled with a byte
 - *          value when a thread is created. This can be useful for the
 - *          runtime measurement of the used stack.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_FILL_THREADS                 TRUE
 -
 -/**
 - * @brief   Debug option, threads profiling.
 - * @details If enabled then a field is added to the @p thread_t structure that
 - *          counts the system ticks occurred while executing the thread.
 - *
 - * @note    The default is @p FALSE.
 - * @note    This debug option is not currently compatible with the
 - *          tickless mode.
 - */
 -#define CH_DBG_THREADS_PROFILING            FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel hooks
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Threads descriptor structure extension.
 - * @details User fields added to the end of the @p thread_t structure.
 - */
 -#define CH_CFG_THREAD_EXTRA_FIELDS                                          \
 -  /* Add threads custom fields here.*/
 -
 -/**
 - * @brief   Threads initialization hook.
 - * @details User initialization code added to the @p chThdInit() API.
 - *
 - * @note    It is invoked from within @p chThdInit() and implicitly from all
 - *          the threads creation APIs.
 - */
 -#define CH_CFG_THREAD_INIT_HOOK(tp) {                                       \
 -  /* Add threads initialization code here.*/                                \
 -}
 -
 -/**
 - * @brief   Threads finalization hook.
 - * @details User finalization code added to the @p chThdExit() API.
 - *
 - * @note    It is inserted into lock zone.
 - * @note    It is also invoked when the threads simply return in order to
 - *          terminate.
 - */
 -#define CH_CFG_THREAD_EXIT_HOOK(tp) {                                       \
 -  /* Add threads finalization code here.*/                                  \
 -}
 -
 -/**
 - * @brief   Context switch hook.
 - * @details This hook is invoked just before switching between threads.
 - */
 -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) {                              \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/**
 - * @brief   Idle thread enter hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to activate a power saving mode.
 - */
 -#define CH_CFG_IDLE_ENTER_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle thread leave hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to deactivate a power saving mode.
 - */
 -#define CH_CFG_IDLE_LEAVE_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle Loop hook.
 - * @details This hook is continuously invoked by the idle thread loop.
 - */
 -#define CH_CFG_IDLE_LOOP_HOOK() {                                           \
 -  /* Idle loop code here.*/                                                 \
 -}
 -
 -/**
 - * @brief   System tick event hook.
 - * @details This hook is invoked in the system tick handler immediately
 - *          after processing the virtual timers queue.
 - */
 -#define CH_CFG_SYSTEM_TICK_HOOK() {                                         \
 -  /* System tick event code here.*/                                         \
 -}
 -
 -/**
 - * @brief   System halt hook.
 - * @details This hook is invoked in case to a system halting error before
 - *          the system is halted.
 - */
 -#define CH_CFG_SYSTEM_HALT_HOOK(reason) {                                   \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/* Port-specific settings (override port settings defaulted in chcore.h).    */
 -/*===========================================================================*/
 -
 -#endif  /* _CHCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/ADC/halconf.h b/testhal/STM32L1xx/ADC/halconf.h deleted file mode 100644 index 23d81defc..000000000 --- a/testhal/STM32L1xx/ADC/halconf.h +++ /dev/null @@ -1,312 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/halconf.h
 - * @brief   HAL configuration header.
 - * @details HAL configuration file, this file allows to enable or disable the
 - *          various device drivers from your application. You may also use
 - *          this file in order to override the device drivers default settings.
 - *
 - * @addtogroup HAL_CONF
 - * @{
 - */
 -
 -#ifndef _HALCONF_H_
 -#define _HALCONF_H_
 -
 -#include "mcuconf.h"
 -
 -/**
 - * @brief   Enables the PAL subsystem.
 - */
 -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
 -#define HAL_USE_PAL                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the ADC subsystem.
 - */
 -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
 -#define HAL_USE_ADC                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the CAN subsystem.
 - */
 -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
 -#define HAL_USE_CAN                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the EXT subsystem.
 - */
 -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
 -#define HAL_USE_EXT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the GPT subsystem.
 - */
 -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
 -#define HAL_USE_GPT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2C subsystem.
 - */
 -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
 -#define HAL_USE_I2C                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2S subsystem.
 - */
 -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
 -#define HAL_USE_I2S                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the ICU subsystem.
 - */
 -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
 -#define HAL_USE_ICU                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MAC subsystem.
 - */
 -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
 -#define HAL_USE_MAC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MMC_SPI subsystem.
 - */
 -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_MMC_SPI             FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the PWM subsystem.
 - */
 -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
 -#define HAL_USE_PWM                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the RTC subsystem.
 - */
 -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
 -#define HAL_USE_RTC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SDC subsystem.
 - */
 -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
 -#define HAL_USE_SDC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL              FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL over USB subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL_USB          FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SPI subsystem.
 - */
 -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_SPI                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the UART subsystem.
 - */
 -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
 -#define HAL_USE_UART                FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the USB subsystem.
 - */
 -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_USB                 FALSE
 -#endif
 -
 -/*===========================================================================*/
 -/* ADC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
 -#define ADC_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define ADC_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* CAN driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Sleep mode related APIs inclusion switch.
 - */
 -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
 -#define CAN_USE_SLEEP_MODE          TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* I2C driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables the mutual exclusion APIs on the I2C bus.
 - */
 -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define I2C_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MAC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
 -#define MAC_USE_ZERO_COPY           FALSE
 -#endif
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
 -#define MAC_USE_EVENTS              TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MMC_SPI driver related settings.                                          */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - *          This option is recommended also if the SPI driver does not
 - *          use a DMA channel and heavily loads the CPU.
 - */
 -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define MMC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SDC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Number of initialization attempts before rejecting the card.
 - * @note    Attempts are performed at 10mS intervals.
 - */
 -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
 -#define SDC_INIT_RETRY              100
 -#endif
 -
 -/**
 - * @brief   Include support for MMC cards.
 - * @note    MMC support is not yet implemented so this option must be kept
 - *          at @p FALSE.
 - */
 -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
 -#define SDC_MMC_SUPPORT             FALSE
 -#endif
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - */
 -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define SDC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SERIAL driver related settings.                                           */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Default bit rate.
 - * @details Configuration parameter, this is the baud rate selected for the
 - *          default configuration.
 - */
 -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
 -#define SERIAL_DEFAULT_BITRATE      38400
 -#endif
 -
 -/**
 - * @brief   Serial buffers size.
 - * @details Configuration parameter, you can change the depth of the queue
 - *          buffers depending on the requirements of your application.
 - * @note    The default is 64 bytes for both the transmission and receive
 - *          buffers.
 - */
 -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
 -#define SERIAL_BUFFERS_SIZE         16
 -#endif
 -
 -/*===========================================================================*/
 -/* SPI driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
 -#define SPI_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define SPI_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -#endif /* _HALCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/ADC/main.c b/testhal/STM32L1xx/ADC/main.c deleted file mode 100644 index 8a2b3897b..000000000 --- a/testhal/STM32L1xx/ADC/main.c +++ /dev/null @@ -1,164 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -#include "ch.h"
 -#include "hal.h"
 -
 -#define ADC_GRP1_NUM_CHANNELS   1
 -#define ADC_GRP1_BUF_DEPTH      8
 -
 -#define ADC_GRP2_NUM_CHANNELS   8
 -#define ADC_GRP2_BUF_DEPTH      16
 -
 -static adcsample_t samples1[ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH];
 -static adcsample_t samples2[ADC_GRP2_NUM_CHANNELS * ADC_GRP2_BUF_DEPTH];
 -
 -/*
 - * ADC streaming callback.
 - */
 -size_t nx = 0, ny = 0;
 -static void adccallback(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
 -
 -  (void)adcp;
 -  if (samples2 == buffer) {
 -    nx += n;
 -  }
 -  else {
 -    ny += n;
 -  }
 -}
 -
 -static void adcerrorcallback(ADCDriver *adcp, adcerror_t err) {
 -
 -  (void)adcp;
 -  (void)err;
 -}
 -
 -/*
 - * ADC conversion group.
 - * Mode:        Linear buffer, 8 samples of 1 channel, SW triggered.
 - * Channels:    IN10.
 - */
 -static const ADCConversionGroup adcgrpcfg1 = {
 -  FALSE,
 -  ADC_GRP1_NUM_CHANNELS,
 -  NULL,
 -  adcerrorcallback,
 -  0,                        /* CR1 */
 -  ADC_CR2_SWSTART,          /* CR2 */
 -  0,                        /* SMPR1 */
 -  ADC_SMPR2_SMP_AN10(ADC_SAMPLE_4),
 -  0,                        /* SMPR3 */
 -  ADC_SQR1_NUM_CH(ADC_GRP1_NUM_CHANNELS),
 -  0, 0, 0,                  /* SQR2, SQR3, SQR4 */
 -  ADC_SQR5_SQ1_N(ADC_CHANNEL_IN10)
 -};
 -
 -/*
 - * ADC conversion group.
 - * Mode:        Continuous, 16 samples of 8 channels, SW triggered.
 - * Channels:    IN10, IN11, IN10, IN11, IN10, IN11, Sensor, VRef.
 - */
 -static const ADCConversionGroup adcgrpcfg2 = {
 -  TRUE,
 -  ADC_GRP2_NUM_CHANNELS,
 -  adccallback,
 -  adcerrorcallback,
 -  0,                        /* CR1 */
 -  ADC_CR2_SWSTART,          /* CR2 */
 -  0,                        /* SMPR1 */
 -  ADC_SMPR2_SMP_AN11(ADC_SAMPLE_48) | ADC_SMPR2_SMP_AN10(ADC_SAMPLE_48) |
 -  ADC_SMPR2_SMP_SENSOR(ADC_SAMPLE_192) | ADC_SMPR2_SMP_VREF(ADC_SAMPLE_192),
 -  0,                        /* SMPR3 */
 -  ADC_SQR1_NUM_CH(ADC_GRP2_NUM_CHANNELS),
 -  0, 0,                     /* SQR2, SQR3 */
 -  ADC_SQR4_SQ8_N(ADC_CHANNEL_SENSOR) | ADC_SQR4_SQ7_N(ADC_CHANNEL_VREFINT),
 -  ADC_SQR5_SQ6_N(ADC_CHANNEL_IN11)   | ADC_SQR5_SQ5_N(ADC_CHANNEL_IN10) |
 -  ADC_SQR5_SQ4_N(ADC_CHANNEL_IN11)   | ADC_SQR5_SQ3_N(ADC_CHANNEL_IN10) |
 -  ADC_SQR5_SQ2_N(ADC_CHANNEL_IN11)   | ADC_SQR5_SQ1_N(ADC_CHANNEL_IN10)
 -};
 -
 -/*
 - * Red LEDs blinker thread, times are in milliseconds.
 - */
 -static THD_WORKING_AREA(waThread1, 128);
 -static THD_FUNCTION(Thread1, arg) {
 -
 -  (void)arg;
 -
 -  chRegSetThreadName("blinker");
 -  while (TRUE) {
 -    palSetPad(GPIOB, GPIOB_LED4);
 -    chThdSleepMilliseconds(500);
 -    palClearPad(GPIOB, GPIOB_LED4);
 -    chThdSleepMilliseconds(500);
 -  }
 -}
 -
 -/*
 - * Application entry point.
 - */
 -int main(void) {
 -
 -  /*
 -   * System initializations.
 -   * - HAL initialization, this also initializes the configured device drivers
 -   *   and performs the board-specific initializations.
 -   * - Kernel initialization, the main() function becomes a thread and the
 -   *   RTOS is active.
 -   */
 -  halInit();
 -  chSysInit();
 -
 -  /*
 -   * Setting up analog inputs used by the demo.
 -   */
 -  palSetGroupMode(GPIOC, PAL_PORT_BIT(0) | PAL_PORT_BIT(1),
 -                  0, PAL_MODE_INPUT_ANALOG);
 -
 -  /*
 -   * Creates the blinker thread.
 -   */
 -  chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
 -
 -  /*
 -   * Activates the ADC1 driver and the temperature sensor.
 -   */
 -  adcStart(&ADCD1, NULL);
 -  adcSTM32EnableTSVREFE();
 -
 -  /*
 -   * Linear conversion.
 -   */
 -  adcConvert(&ADCD1, &adcgrpcfg1, samples1, ADC_GRP1_BUF_DEPTH);
 -  chThdSleepMilliseconds(1000);
 -
 -  /*
 -   * Starts an ADC continuous conversion.
 -   */
 -  adcStartConversion(&ADCD1, &adcgrpcfg2, samples2, ADC_GRP2_BUF_DEPTH);
 -
 -  /*
 -   * Normal main() thread activity, in this demo it does nothing.
 -   */
 -  while (TRUE) {
 -    if (palReadPad(GPIOA, GPIOA_BUTTON)) {
 -      adcStopConversion(&ADCD1);
 -      adcSTM32DisableTSVREFE();
 -    }
 -    chThdSleepMilliseconds(500);
 -  }
 -}
 diff --git a/testhal/STM32L1xx/ADC/mcuconf.h b/testhal/STM32L1xx/ADC/mcuconf.h deleted file mode 100644 index 4f936d8b3..000000000 --- a/testhal/STM32L1xx/ADC/mcuconf.h +++ /dev/null @@ -1,177 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/*
 - * STM32L1xx drivers configuration.
 - * The following settings override the default settings present in
 - * the various device driver implementation headers.
 - * Note that the settings for each driver only have effect if the whole
 - * driver is enabled in halconf.h.
 - *
 - * IRQ priorities:
 - * 15...0       Lowest...Highest.
 - *
 - * DMA priorities:
 - * 0...3        Lowest...Highest.
 - */
 -
 -#define STM32L1xx_MCUCONF
 -
 -/*
 - * HAL driver system settings.
 - */
 -#define STM32_NO_INIT                       FALSE
 -#define STM32_HSI_ENABLED                   TRUE
 -#define STM32_LSI_ENABLED                   TRUE
 -#define STM32_HSE_ENABLED                   FALSE
 -#define STM32_LSE_ENABLED                   TRUE
 -#define STM32_ADC_CLOCK_ENABLED             TRUE
 -#define STM32_USB_CLOCK_ENABLED             TRUE
 -#define STM32_MSIRANGE                      STM32_MSIRANGE_2M
 -#define STM32_SW                            STM32_SW_PLL
 -#define STM32_PLLSRC                        STM32_PLLSRC_HSI
 -#define STM32_PLLMUL_VALUE                  6
 -#define STM32_PLLDIV_VALUE                  3
 -#define STM32_HPRE                          STM32_HPRE_DIV1
 -#define STM32_PPRE1                         STM32_PPRE1_DIV1
 -#define STM32_PPRE2                         STM32_PPRE2_DIV1
 -#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
 -#define STM32_MCOPRE                        STM32_MCOPRE_DIV1
 -#define STM32_RTCSEL                        STM32_RTCSEL_LSE
 -#define STM32_RTCPRE                        STM32_RTCPRE_DIV2
 -#define STM32_VOS                           STM32_VOS_1P8
 -#define STM32_PVD_ENABLE                    FALSE
 -#define STM32_PLS                           STM32_PLS_LEV0
 -
 -/*
 - * ADC driver system settings.
 - */
 -#define STM32_ADC_USE_ADC1                  TRUE
 -#define STM32_ADC_ADC1_DMA_PRIORITY         2
 -#define STM32_ADC_IRQ_PRIORITY              6
 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY     6
 -
 -/*
 - * EXT driver system settings.
 - */
 -#define STM32_EXT_EXTI0_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI1_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI2_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI3_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI4_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY      6
 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY    6
 -#define STM32_EXT_EXTI16_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI17_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI18_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI19_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI20_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI21_22_IRQ_PRIORITY    6
 -
 -/*
 - * GPT driver system settings.
 - */
 -#define STM32_GPT_USE_TIM2                  FALSE
 -#define STM32_GPT_USE_TIM3                  FALSE
 -#define STM32_GPT_USE_TIM4                  FALSE
 -#define STM32_GPT_TIM2_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM3_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM4_IRQ_PRIORITY         7
 -
 -/*
 - * I2C driver system settings.
 - */
 -#define STM32_I2C_USE_I2C1                  FALSE
 -#define STM32_I2C_USE_I2C2                  FALSE
 -#define STM32_I2C_BUSY_TIMEOUT              50
 -#define STM32_I2C_I2C1_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C2_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C1_DMA_PRIORITY         3
 -#define STM32_I2C_I2C2_DMA_PRIORITY         3
 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
 -
 -/*
 - * ICU driver system settings.
 - */
 -#define STM32_ICU_USE_TIM2                  FALSE
 -#define STM32_ICU_USE_TIM3                  FALSE
 -#define STM32_ICU_USE_TIM4                  FALSE
 -#define STM32_ICU_USE_TIM9                  FALSE
 -#define STM32_ICU_TIM2_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM3_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM4_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * PWM driver system settings.
 - */
 -#define STM32_PWM_USE_TIM2                  FALSE
 -#define STM32_PWM_USE_TIM3                  FALSE
 -#define STM32_PWM_USE_TIM4                  FALSE
 -#define STM32_PWM_USE_TIM9                  FALSE
 -#define STM32_PWM_TIM2_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM3_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM4_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * SERIAL driver system settings.
 - */
 -#define STM32_SERIAL_USE_USART1             FALSE
 -#define STM32_SERIAL_USE_USART2             FALSE
 -#define STM32_SERIAL_USE_USART3             FALSE
 -#define STM32_SERIAL_USART1_PRIORITY        12
 -#define STM32_SERIAL_USART2_PRIORITY        12
 -#define STM32_SERIAL_USART3_PRIORITY        12
 -
 -/*
 - * SPI driver system settings.
 - */
 -#define STM32_SPI_USE_SPI1                  FALSE
 -#define STM32_SPI_USE_SPI2                  FALSE
 -#define STM32_SPI_SPI1_DMA_PRIORITY         1
 -#define STM32_SPI_SPI2_DMA_PRIORITY         1
 -#define STM32_SPI_SPI1_IRQ_PRIORITY         10
 -#define STM32_SPI_SPI2_IRQ_PRIORITY         10
 -#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
 -
 -/*
 - * ST driver system settings.
 - */
 -#define STM32_ST_IRQ_PRIORITY               8
 -#define STM32_ST_USE_TIMER                  2
 -
 -/*
 - * UART driver system settings.
 - */
 -#define STM32_UART_USE_USART1               FALSE
 -#define STM32_UART_USE_USART2               FALSE
 -#define STM32_UART_USE_USART3               FALSE
 -#define STM32_UART_USART1_IRQ_PRIORITY      12
 -#define STM32_UART_USART2_IRQ_PRIORITY      12
 -#define STM32_UART_USART3_IRQ_PRIORITY      12
 -#define STM32_UART_USART1_DMA_PRIORITY      0
 -#define STM32_UART_USART2_DMA_PRIORITY      0
 -#define STM32_UART_USART3_DMA_PRIORITY      0
 -#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
 -
 -/*
 - * USB driver system settings.
 - */
 -#define STM32_USB_USE_USB1                  FALSE
 -#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
 -#define STM32_USB_USB1_HP_IRQ_PRIORITY      13
 -#define STM32_USB_USB1_LP_IRQ_PRIORITY      14
 diff --git a/testhal/STM32L1xx/ADC/readme.txt b/testhal/STM32L1xx/ADC/readme.txt deleted file mode 100644 index 91e9574b3..000000000 --- a/testhal/STM32L1xx/ADC/readme.txt +++ /dev/null @@ -1,31 +0,0 @@ -*****************************************************************************
 -** ChibiOS/RT HAL - ADC driver demo for STM32L1xx.                         **
 -*****************************************************************************
 -
 -** TARGET **
 -
 -The demo will on an STMicroelectronics STM32L-Discovery board.
 -
 -** The Demo **
 -
 -The application demonstrates the use of the STM32L1xx ADC driver.
 -
 -** Board Setup **
 -
 -- Remove the LCD module.
 -- Connect PC0 to 3.3V and PC1 to GND for analog measurements.
 -
 -** Build Procedure **
 -
 -The demo has been tested using the free Codesourcery GCC-based toolchain
 -and YAGARTO.
 -Just modify the TRGT line in the makefile in order to use different GCC ports.
 -
 -** Notes **
 -
 -Some files used by the demo are not part of ChibiOS/RT but are copyright of
 -ST Microelectronics and are licensed under a different license.
 -Also note that not all the files present in the ST library are distributed
 -with ChibiOS/RT, you can find the whole library on the ST web site:
 -
 -                             http://www.st.com
 diff --git a/testhal/STM32L1xx/EXT/.cproject b/testhal/STM32L1xx/EXT/.cproject deleted file mode 100644 index 2148e6575..000000000 --- a/testhal/STM32L1xx/EXT/.cproject +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 -<?fileVersion 4.0.0?>
 -
 -<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
 -	<storageModule moduleId="org.eclipse.cdt.core.settings">
 -		<cconfiguration id="0.775221">
 -			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.775221" moduleId="org.eclipse.cdt.core.settings" name="Default">
 -				<externalSettings/>
 -				<extensions>
 -					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -				</extensions>
 -			</storageModule>
 -			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -				<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.775221" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
 -					<folderInfo id="0.775221." name="/" resourcePath="">
 -						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.433138698" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
 -							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.433138698.777306892" name=""/>
 -							<builder id="org.eclipse.cdt.build.core.settings.default.builder.512542013" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1095572725" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.543638336" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1557225258" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.1167511685" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1266917502" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.438709918" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1473052734" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -						</toolChain>
 -					</folderInfo>
 -				</configuration>
 -			</storageModule>
 -			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
 -		</cconfiguration>
 -	</storageModule>
 -	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -		<project id="STM32L1xx-EXT.null.1441830557" name="STM32L1xx-EXT"/>
 -	</storageModule>
 -	<storageModule moduleId="scannerConfiguration">
 -		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
 -		<scannerConfigBuildInfo instanceId="0.775221">
 -			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
 -		</scannerConfigBuildInfo>
 -	</storageModule>
 -	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
 -</cproject>
 diff --git a/testhal/STM32L1xx/EXT/.project b/testhal/STM32L1xx/EXT/.project deleted file mode 100644 index 07851af6f..000000000 --- a/testhal/STM32L1xx/EXT/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
 -<projectDescription>
 -	<name>STM32L1xx-EXT</name>
 -	<comment></comment>
 -	<projects>
 -	</projects>
 -	<buildSpec>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
 -			<triggers>clean,full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
 -			<triggers>full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -	</buildSpec>
 -	<natures>
 -		<nature>org.eclipse.cdt.core.cnature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
 -	</natures>
 -	<linkedResources>
 -		<link>
 -			<name>os</name>
 -			<type>2</type>
 -			<locationURI>CHIBIOS/os</locationURI>
 -		</link>
 -	</linkedResources>
 -</projectDescription>
 diff --git a/testhal/STM32L1xx/EXT/Makefile b/testhal/STM32L1xx/EXT/Makefile deleted file mode 100644 index ad1bb67f8..000000000 --- a/testhal/STM32L1xx/EXT/Makefile +++ /dev/null @@ -1,198 +0,0 @@ -##############################################################################
 -# Build global options
 -# NOTE: Can be overridden externally.
 -#
 -
 -# Compiler options here.
 -ifeq ($(USE_OPT),)
 -  USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
 -endif
 -
 -# C specific options here (added to USE_OPT).
 -ifeq ($(USE_COPT),)
 -  USE_COPT = 
 -endif
 -
 -# C++ specific options here (added to USE_OPT).
 -ifeq ($(USE_CPPOPT),)
 -  USE_CPPOPT = -fno-rtti
 -endif
 -
 -# Enable this if you want the linker to remove unused code and data
 -ifeq ($(USE_LINK_GC),)
 -  USE_LINK_GC = yes
 -endif
 -
 -# Linker extra options here.
 -ifeq ($(USE_LDOPT),)
 -  USE_LDOPT = 
 -endif
 -
 -# Enable this if you want link time optimizations (LTO)
 -ifeq ($(USE_LTO),)
 -  USE_LTO = yes
 -endif
 -
 -# If enabled, this option allows to compile the application in THUMB mode.
 -ifeq ($(USE_THUMB),)
 -  USE_THUMB = yes
 -endif
 -
 -# Enable this if you want to see the full log while compiling.
 -ifeq ($(USE_VERBOSE_COMPILE),)
 -  USE_VERBOSE_COMPILE = no
 -endif
 -
 -#
 -# Build global options
 -##############################################################################
 -
 -##############################################################################
 -# Architecture or project specific options
 -#
 -
 -# Stack size to be allocated to the Cortex-M process stack. This stack is
 -# the stack used by the main() thread.
 -ifeq ($(USE_PROCESS_STACKSIZE),)
 -  USE_PROCESS_STACKSIZE = 0x400
 -endif
 -
 -# Stack size to the allocated to the Cortex-M main/exceptions stack. This
 -# stack is used for processing interrupts and exceptions.
 -ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
 -  USE_EXCEPTIONS_STACKSIZE = 0x400
 -endif
 -
 -#
 -# Architecture or project specific options
 -##############################################################################
 -
 -##############################################################################
 -# Project, sources and paths
 -#
 -
 -# Define project name here
 -PROJECT = ch
 -
 -# Imported source files and paths
 -CHIBIOS = ../../..
 -include $(CHIBIOS)/os/hal/hal.mk
 -include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
 -include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
 -include $(CHIBIOS)/os/hal/osal/rt/osal.mk
 -include $(CHIBIOS)/os/rt/rt.mk
 -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk
 -#include $(CHIBIOS)/test/rt/test.mk
 -
 -# Define linker script file here
 -LDSCRIPT= $(PORTLD)/STM32L152xB.ld
 -
 -# C sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CSRC = $(PORTSRC) \
 -       $(KERNSRC) \
 -       $(TESTSRC) \
 -       $(HALSRC) \
 -       $(OSALSRC) \
 -       $(PLATFORMSRC) \
 -       $(BOARDSRC) \
 -       main.c
 -
 -# C++ sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CPPSRC =
 -
 -# C sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACSRC =
 -
 -# C++ sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACPPSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCPPSRC =
 -
 -# List ASM source files here
 -ASMSRC = $(PORTASM)
 -
 -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
 -         $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
 -         $(CHIBIOS)/os/various
 -
 -#
 -# Project, sources and paths
 -##############################################################################
 -
 -##############################################################################
 -# Compiler settings
 -#
 -
 -MCU  = cortex-m3
 -
 -#TRGT = arm-elf-
 -TRGT = arm-none-eabi-
 -CC   = $(TRGT)gcc
 -CPPC = $(TRGT)g++
 -# Enable loading with g++ only if you need C++ runtime support.
 -# NOTE: You can use C++ even without C++ support if you are careful. C++
 -#       runtime support makes code size explode.
 -LD   = $(TRGT)gcc
 -#LD   = $(TRGT)g++
 -CP   = $(TRGT)objcopy
 -AS   = $(TRGT)gcc -x assembler-with-cpp
 -OD   = $(TRGT)objdump
 -SZ   = $(TRGT)size
 -HEX  = $(CP) -O ihex
 -BIN  = $(CP) -O binary
 -
 -# ARM-specific options here
 -AOPT =
 -
 -# THUMB-specific options here
 -TOPT = -mthumb -DTHUMB
 -
 -# Define C warning options here
 -CWARN = -Wall -Wextra -Wstrict-prototypes
 -
 -# Define C++ warning options here
 -CPPWARN = -Wall -Wextra
 -
 -#
 -# Compiler settings
 -##############################################################################
 -
 -##############################################################################
 -# Start of user section
 -#
 -
 -# List all user C define here, like -D_DEBUG=1
 -UDEFS =
 -
 -# Define ASM defines here
 -UADEFS =
 -
 -# List all user directories here
 -UINCDIR =
 -
 -# List the user directory to look for the libraries here
 -ULIBDIR =
 -
 -# List all user libraries here
 -ULIBS =
 -
 -#
 -# End of user defines
 -##############################################################################
 -
 -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
 -include $(RULESPATH)/rules.mk
 diff --git a/testhal/STM32L1xx/EXT/chconf.h b/testhal/STM32L1xx/EXT/chconf.h deleted file mode 100644 index 68af751f1..000000000 --- a/testhal/STM32L1xx/EXT/chconf.h +++ /dev/null @@ -1,498 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/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.
 - *
 - * @addtogroup config
 - * @details Kernel related settings and hooks.
 - * @{
 - */
 -
 -#ifndef _CHCONF_H_
 -#define _CHCONF_H_
 -
 -/*===========================================================================*/
 -/**
 - * @name System timers settings
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   System time counter resolution.
 - * @note    Allowed values are 16 or 32 bits.
 - */
 -#define CH_CFG_ST_RESOLUTION                16
 -
 -/**
 - * @brief   System tick frequency.
 - * @details Frequency of the system timer that drives the system ticks. This
 - *          setting also defines the system tick time unit.
 - */
 -#define CH_CFG_ST_FREQUENCY                 1000
 -
 -/**
 - * @brief   Time delta constant for the tick-less mode.
 - * @note    If this value is zero then the system uses the classic
 - *          periodic tick. This value represents the minimum number
 - *          of ticks that is safe to specify in a timeout directive.
 - *          The value one is not valid, timeouts are rounded up to
 - *          this value.
 - */
 -#define CH_CFG_ST_TIMEDELTA                 2
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel parameters and options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Round robin interval.
 - * @details This constant is the number of system ticks allowed for the
 - *          threads before preemption occurs. Setting this value to zero
 - *          disables the preemption for threads with equal priority and the
 - *          round robin becomes cooperative. Note that higher priority
 - *          threads can still preempt, the kernel is always preemptive.
 - * @note    Disabling the round robin preemption makes the kernel more compact
 - *          and generally faster.
 - * @note    The round robin preemption is not supported in tickless mode and
 - *          must be set to zero in that case.
 - */
 -#define CH_CFG_TIME_QUANTUM                 0
 -
 -/**
 - * @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
 -
 -/**
 - * @brief   Idle thread automatic spawn suppression.
 - * @details When this option is activated the function @p chSysInit()
 - *          does not spawn the idle thread. The application @p main()
 - *          function becomes the idle thread and must implement an
 - *          infinite loop. */
 -#define CH_CFG_NO_IDLE_THREAD               FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Performance options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   OS optimization.
 - * @details If enabled then time efficient rather than space efficient code
 - *          is used when two possible implementations exist.
 - *
 - * @note    This is not related to the compiler optimization options.
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_OPTIMIZE_SPEED               TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Subsystem options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Time Measurement APIs.
 - * @details If enabled then the time measurement APIs are included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_TM                       TRUE
 -
 -/**
 - * @brief   Threads registry APIs.
 - * @details If enabled then the registry APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_REGISTRY                 TRUE
 -
 -/**
 - * @brief   Threads synchronization APIs.
 - * @details If enabled then the @p chThdWait() function is included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_WAITEXIT                 TRUE
 -
 -/**
 - * @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   Semaphores queuing mode.
 - * @details If enabled then the threads are enqueued on semaphores by
 - *          priority rather than in FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_SEMAPHORES.
 - */
 -#define CH_CFG_USE_SEMAPHORES_PRIORITY      FALSE
 -
 -/**
 - * @brief   Mutexes APIs.
 - * @details If enabled then the mutexes APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MUTEXES                  TRUE
 -
 -/**
 - * @brief   Enables recursive behavior on mutexes.
 - * @note    Recursive mutexes are heavier and have an increased
 - *          memory footprint.
 - *
 - * @note    The default is @p FALSE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_MUTEXES_RECURSIVE        FALSE
 -
 -/**
 - * @brief   Conditional Variables APIs.
 - * @details If enabled then the conditional variables APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_CONDVARS                 TRUE
 -
 -/**
 - * @brief   Conditional Variables APIs with timeout.
 - * @details If enabled then the conditional variables APIs with timeout
 - *          specification are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_CONDVARS.
 - */
 -#define CH_CFG_USE_CONDVARS_TIMEOUT         TRUE
 -
 -/**
 - * @brief   Events Flags APIs.
 - * @details If enabled then the event flags APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_EVENTS                   TRUE
 -
 -/**
 - * @brief   Events Flags APIs with timeout.
 - * @details If enabled then the events APIs with timeout specification
 - *          are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_EVENTS.
 - */
 -#define CH_CFG_USE_EVENTS_TIMEOUT           TRUE
 -
 -/**
 - * @brief   Synchronous Messages APIs.
 - * @details If enabled then the synchronous messages APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MESSAGES                 TRUE
 -
 -/**
 - * @brief   Synchronous Messages queuing mode.
 - * @details If enabled then messages are served by priority rather than in
 - *          FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_MESSAGES.
 - */
 -#define CH_CFG_USE_MESSAGES_PRIORITY        FALSE
 -
 -/**
 - * @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   I/O Queues APIs.
 - * @details If enabled then the I/O queues APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_QUEUES                   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.
 - * @note    Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
 - *          @p CH_CFG_USE_SEMAPHORES.
 - * @note    Mutexes are recommended.
 - */
 -#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   Dynamic Threads APIs.
 - * @details If enabled then the dynamic threads creation APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_WAITEXIT.
 - * @note    Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
 - */
 -#define CH_CFG_USE_DYNAMIC                  TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Debug options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Debug option, kernel statistics.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_STATISTICS                   TRUE
 -
 -/**
 - * @brief   Debug option, system state check.
 - * @details If enabled the correct call protocol for system APIs is checked
 - *          at runtime.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_SYSTEM_STATE_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, parameters checks.
 - * @details If enabled then the checks on the API functions input
 - *          parameters are activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_CHECKS                TRUE
 -
 -/**
 - * @brief   Debug option, consistency checks.
 - * @details If enabled then all the assertions in the kernel code are
 - *          activated. This includes consistency checks inside the kernel,
 - *          runtime anomalies and port-defined checks.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_ASSERTS               TRUE
 -
 -/**
 - * @brief   Debug option, trace buffer.
 - * @details If enabled then the context switch circular trace buffer is
 - *          activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_TRACE                 TRUE
 -
 -/**
 - * @brief   Debug option, stack checks.
 - * @details If enabled then a runtime stack check is performed.
 - *
 - * @note    The default is @p FALSE.
 - * @note    The stack check is performed in a architecture/port dependent way.
 - *          It may not be implemented or some ports.
 - * @note    The default failure mode is to halt the system with the global
 - *          @p panic_msg variable set to @p NULL.
 - */
 -#define CH_DBG_ENABLE_STACK_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, stacks initialization.
 - * @details If enabled then the threads working area is filled with a byte
 - *          value when a thread is created. This can be useful for the
 - *          runtime measurement of the used stack.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_FILL_THREADS                 TRUE
 -
 -/**
 - * @brief   Debug option, threads profiling.
 - * @details If enabled then a field is added to the @p thread_t structure that
 - *          counts the system ticks occurred while executing the thread.
 - *
 - * @note    The default is @p FALSE.
 - * @note    This debug option is not currently compatible with the
 - *          tickless mode.
 - */
 -#define CH_DBG_THREADS_PROFILING            FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel hooks
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Threads descriptor structure extension.
 - * @details User fields added to the end of the @p thread_t structure.
 - */
 -#define CH_CFG_THREAD_EXTRA_FIELDS                                          \
 -  /* Add threads custom fields here.*/
 -
 -/**
 - * @brief   Threads initialization hook.
 - * @details User initialization code added to the @p chThdInit() API.
 - *
 - * @note    It is invoked from within @p chThdInit() and implicitly from all
 - *          the threads creation APIs.
 - */
 -#define CH_CFG_THREAD_INIT_HOOK(tp) {                                       \
 -  /* Add threads initialization code here.*/                                \
 -}
 -
 -/**
 - * @brief   Threads finalization hook.
 - * @details User finalization code added to the @p chThdExit() API.
 - *
 - * @note    It is inserted into lock zone.
 - * @note    It is also invoked when the threads simply return in order to
 - *          terminate.
 - */
 -#define CH_CFG_THREAD_EXIT_HOOK(tp) {                                       \
 -  /* Add threads finalization code here.*/                                  \
 -}
 -
 -/**
 - * @brief   Context switch hook.
 - * @details This hook is invoked just before switching between threads.
 - */
 -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) {                              \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/**
 - * @brief   Idle thread enter hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to activate a power saving mode.
 - */
 -#define CH_CFG_IDLE_ENTER_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle thread leave hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to deactivate a power saving mode.
 - */
 -#define CH_CFG_IDLE_LEAVE_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle Loop hook.
 - * @details This hook is continuously invoked by the idle thread loop.
 - */
 -#define CH_CFG_IDLE_LOOP_HOOK() {                                           \
 -  /* Idle loop code here.*/                                                 \
 -}
 -
 -/**
 - * @brief   System tick event hook.
 - * @details This hook is invoked in the system tick handler immediately
 - *          after processing the virtual timers queue.
 - */
 -#define CH_CFG_SYSTEM_TICK_HOOK() {                                         \
 -  /* System tick event code here.*/                                         \
 -}
 -
 -/**
 - * @brief   System halt hook.
 - * @details This hook is invoked in case to a system halting error before
 - *          the system is halted.
 - */
 -#define CH_CFG_SYSTEM_HALT_HOOK(reason) {                                   \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/* Port-specific settings (override port settings defaulted in chcore.h).    */
 -/*===========================================================================*/
 -
 -#endif  /* _CHCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/EXT/halconf.h b/testhal/STM32L1xx/EXT/halconf.h deleted file mode 100644 index aafa92685..000000000 --- a/testhal/STM32L1xx/EXT/halconf.h +++ /dev/null @@ -1,319 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/halconf.h
 - * @brief   HAL configuration header.
 - * @details HAL configuration file, this file allows to enable or disable the
 - *          various device drivers from your application. You may also use
 - *          this file in order to override the device drivers default settings.
 - *
 - * @addtogroup HAL_CONF
 - * @{
 - */
 -
 -#ifndef _HALCONF_H_
 -#define _HALCONF_H_
 -
 -#include "mcuconf.h"
 -
 -/**
 - * @brief   Enables the TM subsystem.
 - */
 -#if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
 -#define HAL_USE_TM                  TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the PAL subsystem.
 - */
 -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
 -#define HAL_USE_PAL                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the ADC subsystem.
 - */
 -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
 -#define HAL_USE_ADC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the CAN subsystem.
 - */
 -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
 -#define HAL_USE_CAN                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the EXT subsystem.
 - */
 -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
 -#define HAL_USE_EXT                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the GPT subsystem.
 - */
 -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
 -#define HAL_USE_GPT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2C subsystem.
 - */
 -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
 -#define HAL_USE_I2C                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2S subsystem.
 - */
 -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
 -#define HAL_USE_I2S                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the ICU subsystem.
 - */
 -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
 -#define HAL_USE_ICU                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MAC subsystem.
 - */
 -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
 -#define HAL_USE_MAC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MMC_SPI subsystem.
 - */
 -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_MMC_SPI             FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the PWM subsystem.
 - */
 -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
 -#define HAL_USE_PWM                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the RTC subsystem.
 - */
 -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
 -#define HAL_USE_RTC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SDC subsystem.
 - */
 -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
 -#define HAL_USE_SDC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL              FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL over USB subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL_USB          FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SPI subsystem.
 - */
 -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_SPI                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the UART subsystem.
 - */
 -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
 -#define HAL_USE_UART                FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the USB subsystem.
 - */
 -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_USB                 FALSE
 -#endif
 -
 -/*===========================================================================*/
 -/* ADC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
 -#define ADC_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define ADC_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* CAN driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Sleep mode related APIs inclusion switch.
 - */
 -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
 -#define CAN_USE_SLEEP_MODE          TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* I2C driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables the mutual exclusion APIs on the I2C bus.
 - */
 -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define I2C_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MAC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
 -#define MAC_USE_ZERO_COPY           FALSE
 -#endif
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
 -#define MAC_USE_EVENTS              TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MMC_SPI driver related settings.                                          */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - *          This option is recommended also if the SPI driver does not
 - *          use a DMA channel and heavily loads the CPU.
 - */
 -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define MMC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SDC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Number of initialization attempts before rejecting the card.
 - * @note    Attempts are performed at 10mS intervals.
 - */
 -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
 -#define SDC_INIT_RETRY              100
 -#endif
 -
 -/**
 - * @brief   Include support for MMC cards.
 - * @note    MMC support is not yet implemented so this option must be kept
 - *          at @p FALSE.
 - */
 -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
 -#define SDC_MMC_SUPPORT             FALSE
 -#endif
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - */
 -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define SDC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SERIAL driver related settings.                                           */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Default bit rate.
 - * @details Configuration parameter, this is the baud rate selected for the
 - *          default configuration.
 - */
 -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
 -#define SERIAL_DEFAULT_BITRATE      38400
 -#endif
 -
 -/**
 - * @brief   Serial buffers size.
 - * @details Configuration parameter, you can change the depth of the queue
 - *          buffers depending on the requirements of your application.
 - * @note    The default is 64 bytes for both the transmission and receive
 - *          buffers.
 - */
 -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
 -#define SERIAL_BUFFERS_SIZE         16
 -#endif
 -
 -/*===========================================================================*/
 -/* SPI driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
 -#define SPI_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define SPI_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -#endif /* _HALCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/EXT/main.c b/testhal/STM32L1xx/EXT/main.c deleted file mode 100644 index 218826786..000000000 --- a/testhal/STM32L1xx/EXT/main.c +++ /dev/null @@ -1,98 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -#include "ch.h"
 -#include "hal.h"
 -
 -static void led4off(void *arg) {
 -
 -  (void)arg;
 -  palClearPad(GPIOB, GPIOB_LED4);
 -}
 -
 -/* Triggered when the button is pressed or released. The LED4 is set to ON.*/
 -static void extcb1(EXTDriver *extp, expchannel_t channel) {
 -  static virtual_timer_t vt4;
 -
 -  (void)extp;
 -  (void)channel;
 -  palSetPad(GPIOB, GPIOB_LED4);
 -  chSysLockFromISR();
 -  chVTResetI(&vt4);
 -  /* LED4 set to OFF after 200mS.*/
 -  chVTDoSetI(&vt4, MS2ST(200), led4off, NULL);
 -  chSysUnlockFromISR();
 -}
 -
 -static const EXTConfig extcfg = {
 -  {
 -    {EXT_CH_MODE_BOTH_EDGES | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL},
 -    {EXT_CH_MODE_DISABLED, NULL}
 -  }
 -};
 -
 -/*
 - * Application entry point.
 - */
 -int main(void) {
 -
 -  /*
 -   * System initializations.
 -   * - HAL initialization, this also initializes the configured device drivers
 -   *   and performs the board-specific initializations.
 -   * - Kernel initialization, the main() function becomes a thread and the
 -   *   RTOS is active.
 -   */
 -  halInit();
 -  chSysInit();
 -
 -  /*
 -   * Activates the EXT driver 1.
 -   */
 -  extStart(&EXTD1, &extcfg);
 -
 -  /*
 -   * Normal main() thread activity, in this demo it enables and disables the
 -   * button EXT channel using 5 seconds intervals.
 -   */
 -  while (TRUE) {
 -    chThdSleepMilliseconds(5000);
 -    extChannelDisable(&EXTD1, 0);
 -    chThdSleepMilliseconds(5000);
 -    extChannelEnable(&EXTD1, 0);
 -  }
 -}
 diff --git a/testhal/STM32L1xx/EXT/mcuconf.h b/testhal/STM32L1xx/EXT/mcuconf.h deleted file mode 100644 index 753e83df3..000000000 --- a/testhal/STM32L1xx/EXT/mcuconf.h +++ /dev/null @@ -1,171 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/*
 - * STM32L1xx drivers configuration.
 - * The following settings override the default settings present in
 - * the various device driver implementation headers.
 - * Note that the settings for each driver only have effect if the whole
 - * driver is enabled in halconf.h.
 - *
 - * IRQ priorities:
 - * 15...0       Lowest...Highest.
 - *
 - * DMA priorities:
 - * 0...3        Lowest...Highest.
 - */
 -
 -#define STM32L1xx_MCUCONF
 -
 -/*
 - * HAL driver system settings.
 - */
 -#define STM32_NO_INIT                       FALSE
 -#define STM32_HSI_ENABLED                   TRUE
 -#define STM32_LSI_ENABLED                   TRUE
 -#define STM32_HSE_ENABLED                   FALSE
 -#define STM32_LSE_ENABLED                   TRUE
 -#define STM32_ADC_CLOCK_ENABLED             TRUE
 -#define STM32_USB_CLOCK_ENABLED             TRUE
 -#define STM32_MSIRANGE                      STM32_MSIRANGE_2M
 -#define STM32_SW                            STM32_SW_PLL
 -#define STM32_PLLSRC                        STM32_PLLSRC_HSI
 -#define STM32_PLLMUL_VALUE                  6
 -#define STM32_PLLDIV_VALUE                  3
 -#define STM32_HPRE                          STM32_HPRE_DIV1
 -#define STM32_PPRE1                         STM32_PPRE1_DIV1
 -#define STM32_PPRE2                         STM32_PPRE2_DIV1
 -#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
 -#define STM32_MCOPRE                        STM32_MCOPRE_DIV1
 -#define STM32_RTCSEL                        STM32_RTCSEL_LSE
 -#define STM32_RTCPRE                        STM32_RTCPRE_DIV2
 -#define STM32_VOS                           STM32_VOS_1P8
 -#define STM32_PVD_ENABLE                    FALSE
 -#define STM32_PLS                           STM32_PLS_LEV0
 -
 -/*
 - * ADC driver system settings.
 - */
 -#define STM32_ADC_USE_ADC1                  FALSE
 -#define STM32_ADC_ADC1_DMA_PRIORITY         2
 -#define STM32_ADC_IRQ_PRIORITY              6
 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY     6
 -
 -/*
 - * EXT driver system settings.
 - */
 -#define STM32_EXT_EXTI0_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI1_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI2_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI3_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI4_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY      6
 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY    6
 -#define STM32_EXT_EXTI16_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI17_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI18_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI19_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI20_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI21_22_IRQ_PRIORITY    6
 -
 -/*
 - * GPT driver system settings.
 - */
 -#define STM32_GPT_USE_TIM2                  FALSE
 -#define STM32_GPT_USE_TIM3                  FALSE
 -#define STM32_GPT_USE_TIM4                  FALSE
 -#define STM32_GPT_TIM2_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM3_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM4_IRQ_PRIORITY         7
 -
 -/*
 - * I2C driver system settings.
 - */
 -#define STM32_I2C_USE_I2C1                  FALSE
 -#define STM32_I2C_USE_I2C2                  FALSE
 -#define STM32_I2C_I2C1_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C2_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C1_DMA_PRIORITY         3
 -#define STM32_I2C_I2C2_DMA_PRIORITY         3
 -#define STM32_I2C_I2C1_DMA_ERROR_HOOK()     chSysHalt()
 -#define STM32_I2C_I2C2_DMA_ERROR_HOOK()     chSysHalt()
 -
 -/*
 - * ICU driver system settings.
 - */
 -#define STM32_ICU_USE_TIM2                  FALSE
 -#define STM32_ICU_USE_TIM3                  FALSE
 -#define STM32_ICU_USE_TIM4                  FALSE
 -#define STM32_ICU_USE_TIM9                  FALSE
 -#define STM32_ICU_TIM2_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM3_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM4_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * PWM driver system settings.
 - */
 -#define STM32_PWM_USE_TIM2                  FALSE
 -#define STM32_PWM_USE_TIM3                  FALSE
 -#define STM32_PWM_USE_TIM4                  FALSE
 -#define STM32_PWM_USE_TIM9                  FALSE
 -#define STM32_PWM_TIM2_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM3_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM4_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * SERIAL driver system settings.
 - */
 -#define STM32_SERIAL_USE_USART1             FALSE
 -#define STM32_SERIAL_USE_USART2             FALSE
 -#define STM32_SERIAL_USE_USART3             FALSE
 -#define STM32_SERIAL_USART1_PRIORITY        12
 -#define STM32_SERIAL_USART2_PRIORITY        12
 -#define STM32_SERIAL_USART3_PRIORITY        12
 -
 -/*
 - * SPI driver system settings.
 - */
 -#define STM32_SPI_USE_SPI1                  FALSE
 -#define STM32_SPI_USE_SPI2                  FALSE
 -#define STM32_SPI_SPI1_DMA_PRIORITY         1
 -#define STM32_SPI_SPI2_DMA_PRIORITY         1
 -#define STM32_SPI_SPI1_IRQ_PRIORITY         10
 -#define STM32_SPI_SPI2_IRQ_PRIORITY         10
 -#define STM32_SPI_DMA_ERROR_HOOK(spip)      chSysHalt()
 -
 -/*
 - * UART driver system settings.
 - */
 -#define STM32_UART_USE_USART1               FALSE
 -#define STM32_UART_USE_USART2               FALSE
 -#define STM32_UART_USE_USART3               FALSE
 -#define STM32_UART_USART1_IRQ_PRIORITY      12
 -#define STM32_UART_USART2_IRQ_PRIORITY      12
 -#define STM32_UART_USART3_IRQ_PRIORITY      12
 -#define STM32_UART_USART1_DMA_PRIORITY      0
 -#define STM32_UART_USART2_DMA_PRIORITY      0
 -#define STM32_UART_USART3_DMA_PRIORITY      0
 -#define STM32_UART_DMA_ERROR_HOOK(uartp)    chSysHalt()
 -
 -/*
 - * USB driver system settings.
 - */
 -#define STM32_USB_USE_USB1                  TRUE
 -#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
 -#define STM32_USB_USB1_HP_IRQ_PRIORITY      13
 -#define STM32_USB_USB1_LP_IRQ_PRIORITY      14
 diff --git a/testhal/STM32L1xx/EXT/readme.txt b/testhal/STM32L1xx/EXT/readme.txt deleted file mode 100644 index 16953a3c9..000000000 --- a/testhal/STM32L1xx/EXT/readme.txt +++ /dev/null @@ -1,30 +0,0 @@ -*****************************************************************************
 -** ChibiOS/RT HAL - EXT driver demo for STM32L1xx.                         **
 -*****************************************************************************
 -
 -** TARGET **
 -
 -The demo will on an STMicroelectronics STM32L-Discovery board.
 -
 -** The Demo **
 -
 -The application demonstrates the use of the STM32L1xx EXT driver.
 -
 -** Board Setup **
 -
 -None required.
 -
 -** Build Procedure **
 -
 -The demo has been tested using the free Codesourcery GCC-based toolchain
 -and YAGARTO.
 -Just modify the TRGT line in the makefile in order to use different GCC ports.
 -
 -** Notes **
 -
 -Some files used by the demo are not part of ChibiOS/RT but are copyright of
 -ST Microelectronics and are licensed under a different license.
 -Also note that not all the files present in the ST library are distributed
 -with ChibiOS/RT, you can find the whole library on the ST web site:
 -
 -                             http://www.st.com
 diff --git a/testhal/STM32L1xx/IRQ_STORM/.cproject b/testhal/STM32L1xx/IRQ_STORM/.cproject deleted file mode 100644 index 5b23e9f4d..000000000 --- a/testhal/STM32L1xx/IRQ_STORM/.cproject +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 -<?fileVersion 4.0.0?>
 -
 -<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
 -	<storageModule moduleId="org.eclipse.cdt.core.settings">
 -		<cconfiguration id="0.200678309">
 -			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.200678309" moduleId="org.eclipse.cdt.core.settings" name="Default">
 -				<externalSettings/>
 -				<extensions>
 -					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -				</extensions>
 -			</storageModule>
 -			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -				<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.200678309" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
 -					<folderInfo id="0.200678309." name="/" resourcePath="">
 -						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.287075702" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
 -							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.287075702.1502300312" name=""/>
 -							<builder id="org.eclipse.cdt.build.core.settings.default.builder.1420156480" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.689612105" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.1216396401" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1948294581" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.1579989411" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.540686538" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.345048729" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1549648167" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -						</toolChain>
 -					</folderInfo>
 -				</configuration>
 -			</storageModule>
 -			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
 -		</cconfiguration>
 -	</storageModule>
 -	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -		<project id="STM32L1xx-IRQ_STORM.null.751055590" name="STM32L1xx-IRQ_STORM"/>
 -	</storageModule>
 -	<storageModule moduleId="scannerConfiguration">
 -		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
 -		<scannerConfigBuildInfo instanceId="0.200678309">
 -			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
 -		</scannerConfigBuildInfo>
 -	</storageModule>
 -	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
 -</cproject>
 diff --git a/testhal/STM32L1xx/IRQ_STORM/.project b/testhal/STM32L1xx/IRQ_STORM/.project deleted file mode 100644 index 9fd81bee3..000000000 --- a/testhal/STM32L1xx/IRQ_STORM/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
 -<projectDescription>
 -	<name>STM32L1xx-IRQ_STORM</name>
 -	<comment></comment>
 -	<projects>
 -	</projects>
 -	<buildSpec>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
 -			<triggers>clean,full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
 -			<triggers>full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -	</buildSpec>
 -	<natures>
 -		<nature>org.eclipse.cdt.core.cnature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
 -	</natures>
 -	<linkedResources>
 -		<link>
 -			<name>os</name>
 -			<type>2</type>
 -			<locationURI>CHIBIOS/os</locationURI>
 -		</link>
 -	</linkedResources>
 -</projectDescription>
 diff --git a/testhal/STM32L1xx/IRQ_STORM/Makefile b/testhal/STM32L1xx/IRQ_STORM/Makefile deleted file mode 100644 index ad1bb67f8..000000000 --- a/testhal/STM32L1xx/IRQ_STORM/Makefile +++ /dev/null @@ -1,198 +0,0 @@ -##############################################################################
 -# Build global options
 -# NOTE: Can be overridden externally.
 -#
 -
 -# Compiler options here.
 -ifeq ($(USE_OPT),)
 -  USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
 -endif
 -
 -# C specific options here (added to USE_OPT).
 -ifeq ($(USE_COPT),)
 -  USE_COPT = 
 -endif
 -
 -# C++ specific options here (added to USE_OPT).
 -ifeq ($(USE_CPPOPT),)
 -  USE_CPPOPT = -fno-rtti
 -endif
 -
 -# Enable this if you want the linker to remove unused code and data
 -ifeq ($(USE_LINK_GC),)
 -  USE_LINK_GC = yes
 -endif
 -
 -# Linker extra options here.
 -ifeq ($(USE_LDOPT),)
 -  USE_LDOPT = 
 -endif
 -
 -# Enable this if you want link time optimizations (LTO)
 -ifeq ($(USE_LTO),)
 -  USE_LTO = yes
 -endif
 -
 -# If enabled, this option allows to compile the application in THUMB mode.
 -ifeq ($(USE_THUMB),)
 -  USE_THUMB = yes
 -endif
 -
 -# Enable this if you want to see the full log while compiling.
 -ifeq ($(USE_VERBOSE_COMPILE),)
 -  USE_VERBOSE_COMPILE = no
 -endif
 -
 -#
 -# Build global options
 -##############################################################################
 -
 -##############################################################################
 -# Architecture or project specific options
 -#
 -
 -# Stack size to be allocated to the Cortex-M process stack. This stack is
 -# the stack used by the main() thread.
 -ifeq ($(USE_PROCESS_STACKSIZE),)
 -  USE_PROCESS_STACKSIZE = 0x400
 -endif
 -
 -# Stack size to the allocated to the Cortex-M main/exceptions stack. This
 -# stack is used for processing interrupts and exceptions.
 -ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
 -  USE_EXCEPTIONS_STACKSIZE = 0x400
 -endif
 -
 -#
 -# Architecture or project specific options
 -##############################################################################
 -
 -##############################################################################
 -# Project, sources and paths
 -#
 -
 -# Define project name here
 -PROJECT = ch
 -
 -# Imported source files and paths
 -CHIBIOS = ../../..
 -include $(CHIBIOS)/os/hal/hal.mk
 -include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
 -include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
 -include $(CHIBIOS)/os/hal/osal/rt/osal.mk
 -include $(CHIBIOS)/os/rt/rt.mk
 -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk
 -#include $(CHIBIOS)/test/rt/test.mk
 -
 -# Define linker script file here
 -LDSCRIPT= $(PORTLD)/STM32L152xB.ld
 -
 -# C sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CSRC = $(PORTSRC) \
 -       $(KERNSRC) \
 -       $(TESTSRC) \
 -       $(HALSRC) \
 -       $(OSALSRC) \
 -       $(PLATFORMSRC) \
 -       $(BOARDSRC) \
 -       main.c
 -
 -# C++ sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CPPSRC =
 -
 -# C sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACSRC =
 -
 -# C++ sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACPPSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCPPSRC =
 -
 -# List ASM source files here
 -ASMSRC = $(PORTASM)
 -
 -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
 -         $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
 -         $(CHIBIOS)/os/various
 -
 -#
 -# Project, sources and paths
 -##############################################################################
 -
 -##############################################################################
 -# Compiler settings
 -#
 -
 -MCU  = cortex-m3
 -
 -#TRGT = arm-elf-
 -TRGT = arm-none-eabi-
 -CC   = $(TRGT)gcc
 -CPPC = $(TRGT)g++
 -# Enable loading with g++ only if you need C++ runtime support.
 -# NOTE: You can use C++ even without C++ support if you are careful. C++
 -#       runtime support makes code size explode.
 -LD   = $(TRGT)gcc
 -#LD   = $(TRGT)g++
 -CP   = $(TRGT)objcopy
 -AS   = $(TRGT)gcc -x assembler-with-cpp
 -OD   = $(TRGT)objdump
 -SZ   = $(TRGT)size
 -HEX  = $(CP) -O ihex
 -BIN  = $(CP) -O binary
 -
 -# ARM-specific options here
 -AOPT =
 -
 -# THUMB-specific options here
 -TOPT = -mthumb -DTHUMB
 -
 -# Define C warning options here
 -CWARN = -Wall -Wextra -Wstrict-prototypes
 -
 -# Define C++ warning options here
 -CPPWARN = -Wall -Wextra
 -
 -#
 -# Compiler settings
 -##############################################################################
 -
 -##############################################################################
 -# Start of user section
 -#
 -
 -# List all user C define here, like -D_DEBUG=1
 -UDEFS =
 -
 -# Define ASM defines here
 -UADEFS =
 -
 -# List all user directories here
 -UINCDIR =
 -
 -# List the user directory to look for the libraries here
 -ULIBDIR =
 -
 -# List all user libraries here
 -ULIBS =
 -
 -#
 -# End of user defines
 -##############################################################################
 -
 -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
 -include $(RULESPATH)/rules.mk
 diff --git a/testhal/STM32L1xx/IRQ_STORM/chconf.h b/testhal/STM32L1xx/IRQ_STORM/chconf.h deleted file mode 100644 index a1963f74c..000000000 --- a/testhal/STM32L1xx/IRQ_STORM/chconf.h +++ /dev/null @@ -1,498 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/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.
 - *
 - * @addtogroup config
 - * @details Kernel related settings and hooks.
 - * @{
 - */
 -
 -#ifndef _CHCONF_H_
 -#define _CHCONF_H_
 -
 -/*===========================================================================*/
 -/**
 - * @name System timers settings
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   System time counter resolution.
 - * @note    Allowed values are 16 or 32 bits.
 - */
 -#define CH_CFG_ST_RESOLUTION                16
 -
 -/**
 - * @brief   System tick frequency.
 - * @details Frequency of the system timer that drives the system ticks. This
 - *          setting also defines the system tick time unit.
 - */
 -#define CH_CFG_ST_FREQUENCY                 1000
 -
 -/**
 - * @brief   Time delta constant for the tick-less mode.
 - * @note    If this value is zero then the system uses the classic
 - *          periodic tick. This value represents the minimum number
 - *          of ticks that is safe to specify in a timeout directive.
 - *          The value one is not valid, timeouts are rounded up to
 - *          this value.
 - */
 -#define CH_CFG_ST_TIMEDELTA                 2
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel parameters and options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Round robin interval.
 - * @details This constant is the number of system ticks allowed for the
 - *          threads before preemption occurs. Setting this value to zero
 - *          disables the preemption for threads with equal priority and the
 - *          round robin becomes cooperative. Note that higher priority
 - *          threads can still preempt, the kernel is always preemptive.
 - * @note    Disabling the round robin preemption makes the kernel more compact
 - *          and generally faster.
 - * @note    The round robin preemption is not supported in tickless mode and
 - *          must be set to zero in that case.
 - */
 -#define CH_CFG_TIME_QUANTUM                 0
 -
 -/**
 - * @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
 -
 -/**
 - * @brief   Idle thread automatic spawn suppression.
 - * @details When this option is activated the function @p chSysInit()
 - *          does not spawn the idle thread. The application @p main()
 - *          function becomes the idle thread and must implement an
 - *          infinite loop. */
 -#define CH_CFG_NO_IDLE_THREAD               FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Performance options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   OS optimization.
 - * @details If enabled then time efficient rather than space efficient code
 - *          is used when two possible implementations exist.
 - *
 - * @note    This is not related to the compiler optimization options.
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_OPTIMIZE_SPEED               TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Subsystem options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Time Measurement APIs.
 - * @details If enabled then the time measurement APIs are included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_TM                       TRUE
 -
 -/**
 - * @brief   Threads registry APIs.
 - * @details If enabled then the registry APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_REGISTRY                 TRUE
 -
 -/**
 - * @brief   Threads synchronization APIs.
 - * @details If enabled then the @p chThdWait() function is included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_WAITEXIT                 TRUE
 -
 -/**
 - * @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   Semaphores queuing mode.
 - * @details If enabled then the threads are enqueued on semaphores by
 - *          priority rather than in FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_SEMAPHORES.
 - */
 -#define CH_CFG_USE_SEMAPHORES_PRIORITY      FALSE
 -
 -/**
 - * @brief   Mutexes APIs.
 - * @details If enabled then the mutexes APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MUTEXES                  TRUE
 -
 -/**
 - * @brief   Enables recursive behavior on mutexes.
 - * @note    Recursive mutexes are heavier and have an increased
 - *          memory footprint.
 - *
 - * @note    The default is @p FALSE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_MUTEXES_RECURSIVE        FALSE
 -
 -/**
 - * @brief   Conditional Variables APIs.
 - * @details If enabled then the conditional variables APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_CONDVARS                 TRUE
 -
 -/**
 - * @brief   Conditional Variables APIs with timeout.
 - * @details If enabled then the conditional variables APIs with timeout
 - *          specification are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_CONDVARS.
 - */
 -#define CH_CFG_USE_CONDVARS_TIMEOUT         TRUE
 -
 -/**
 - * @brief   Events Flags APIs.
 - * @details If enabled then the event flags APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_EVENTS                   TRUE
 -
 -/**
 - * @brief   Events Flags APIs with timeout.
 - * @details If enabled then the events APIs with timeout specification
 - *          are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_EVENTS.
 - */
 -#define CH_CFG_USE_EVENTS_TIMEOUT           TRUE
 -
 -/**
 - * @brief   Synchronous Messages APIs.
 - * @details If enabled then the synchronous messages APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MESSAGES                 TRUE
 -
 -/**
 - * @brief   Synchronous Messages queuing mode.
 - * @details If enabled then messages are served by priority rather than in
 - *          FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_MESSAGES.
 - */
 -#define CH_CFG_USE_MESSAGES_PRIORITY        FALSE
 -
 -/**
 - * @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   I/O Queues APIs.
 - * @details If enabled then the I/O queues APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_QUEUES                   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.
 - * @note    Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
 - *          @p CH_CFG_USE_SEMAPHORES.
 - * @note    Mutexes are recommended.
 - */
 -#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   Dynamic Threads APIs.
 - * @details If enabled then the dynamic threads creation APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_WAITEXIT.
 - * @note    Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
 - */
 -#define CH_CFG_USE_DYNAMIC                  TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Debug options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Debug option, kernel statistics.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_STATISTICS                   FALSE
 -
 -/**
 - * @brief   Debug option, system state check.
 - * @details If enabled the correct call protocol for system APIs is checked
 - *          at runtime.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_SYSTEM_STATE_CHECK           FALSE
 -
 -/**
 - * @brief   Debug option, parameters checks.
 - * @details If enabled then the checks on the API functions input
 - *          parameters are activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_CHECKS                FALSE
 -
 -/**
 - * @brief   Debug option, consistency checks.
 - * @details If enabled then all the assertions in the kernel code are
 - *          activated. This includes consistency checks inside the kernel,
 - *          runtime anomalies and port-defined checks.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_ASSERTS               FALSE
 -
 -/**
 - * @brief   Debug option, trace buffer.
 - * @details If enabled then the context switch circular trace buffer is
 - *          activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_TRACE                 FALSE
 -
 -/**
 - * @brief   Debug option, stack checks.
 - * @details If enabled then a runtime stack check is performed.
 - *
 - * @note    The default is @p FALSE.
 - * @note    The stack check is performed in a architecture/port dependent way.
 - *          It may not be implemented or some ports.
 - * @note    The default failure mode is to halt the system with the global
 - *          @p panic_msg variable set to @p NULL.
 - */
 -#define CH_DBG_ENABLE_STACK_CHECK           FALSE
 -
 -/**
 - * @brief   Debug option, stacks initialization.
 - * @details If enabled then the threads working area is filled with a byte
 - *          value when a thread is created. This can be useful for the
 - *          runtime measurement of the used stack.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_FILL_THREADS                 FALSE
 -
 -/**
 - * @brief   Debug option, threads profiling.
 - * @details If enabled then a field is added to the @p thread_t structure that
 - *          counts the system ticks occurred while executing the thread.
 - *
 - * @note    The default is @p FALSE.
 - * @note    This debug option is not currently compatible with the
 - *          tickless mode.
 - */
 -#define CH_DBG_THREADS_PROFILING            FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel hooks
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Threads descriptor structure extension.
 - * @details User fields added to the end of the @p thread_t structure.
 - */
 -#define CH_CFG_THREAD_EXTRA_FIELDS                                          \
 -  /* Add threads custom fields here.*/
 -
 -/**
 - * @brief   Threads initialization hook.
 - * @details User initialization code added to the @p chThdInit() API.
 - *
 - * @note    It is invoked from within @p chThdInit() and implicitly from all
 - *          the threads creation APIs.
 - */
 -#define CH_CFG_THREAD_INIT_HOOK(tp) {                                       \
 -  /* Add threads initialization code here.*/                                \
 -}
 -
 -/**
 - * @brief   Threads finalization hook.
 - * @details User finalization code added to the @p chThdExit() API.
 - *
 - * @note    It is inserted into lock zone.
 - * @note    It is also invoked when the threads simply return in order to
 - *          terminate.
 - */
 -#define CH_CFG_THREAD_EXIT_HOOK(tp) {                                       \
 -  /* Add threads finalization code here.*/                                  \
 -}
 -
 -/**
 - * @brief   Context switch hook.
 - * @details This hook is invoked just before switching between threads.
 - */
 -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) {                              \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/**
 - * @brief   Idle thread enter hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to activate a power saving mode.
 - */
 -#define CH_CFG_IDLE_ENTER_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle thread leave hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to deactivate a power saving mode.
 - */
 -#define CH_CFG_IDLE_LEAVE_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle Loop hook.
 - * @details This hook is continuously invoked by the idle thread loop.
 - */
 -#define CH_CFG_IDLE_LOOP_HOOK() {                                           \
 -  /* Idle loop code here.*/                                                 \
 -}
 -
 -/**
 - * @brief   System tick event hook.
 - * @details This hook is invoked in the system tick handler immediately
 - *          after processing the virtual timers queue.
 - */
 -#define CH_CFG_SYSTEM_TICK_HOOK() {                                         \
 -  /* System tick event code here.*/                                         \
 -}
 -
 -/**
 - * @brief   System halt hook.
 - * @details This hook is invoked in case to a system halting error before
 - *          the system is halted.
 - */
 -#define CH_CFG_SYSTEM_HALT_HOOK(reason) {                                   \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/* Port-specific settings (override port settings defaulted in chcore.h).    */
 -/*===========================================================================*/
 -
 -#endif  /* _CHCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/IRQ_STORM/halconf.h b/testhal/STM32L1xx/IRQ_STORM/halconf.h deleted file mode 100644 index 8a0de4278..000000000 --- a/testhal/STM32L1xx/IRQ_STORM/halconf.h +++ /dev/null @@ -1,319 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/halconf.h
 - * @brief   HAL configuration header.
 - * @details HAL configuration file, this file allows to enable or disable the
 - *          various device drivers from your application. You may also use
 - *          this file in order to override the device drivers default settings.
 - *
 - * @addtogroup HAL_CONF
 - * @{
 - */
 -
 -#ifndef _HALCONF_H_
 -#define _HALCONF_H_
 -
 -#include "mcuconf.h"
 -
 -/**
 - * @brief   Enables the TM subsystem.
 - */
 -#if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
 -#define HAL_USE_TM                  TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the PAL subsystem.
 - */
 -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
 -#define HAL_USE_PAL                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the ADC subsystem.
 - */
 -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
 -#define HAL_USE_ADC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the CAN subsystem.
 - */
 -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
 -#define HAL_USE_CAN                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the EXT subsystem.
 - */
 -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
 -#define HAL_USE_EXT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the GPT subsystem.
 - */
 -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
 -#define HAL_USE_GPT                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the I2C subsystem.
 - */
 -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
 -#define HAL_USE_I2C                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2S subsystem.
 - */
 -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
 -#define HAL_USE_I2S                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the ICU subsystem.
 - */
 -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
 -#define HAL_USE_ICU                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MAC subsystem.
 - */
 -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
 -#define HAL_USE_MAC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MMC_SPI subsystem.
 - */
 -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_MMC_SPI             FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the PWM subsystem.
 - */
 -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
 -#define HAL_USE_PWM                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the RTC subsystem.
 - */
 -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
 -#define HAL_USE_RTC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SDC subsystem.
 - */
 -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
 -#define HAL_USE_SDC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL              TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL over USB subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL_USB          FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SPI subsystem.
 - */
 -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_SPI                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the UART subsystem.
 - */
 -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
 -#define HAL_USE_UART                FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the USB subsystem.
 - */
 -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_USB                 FALSE
 -#endif
 -
 -/*===========================================================================*/
 -/* ADC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
 -#define ADC_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define ADC_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* CAN driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Sleep mode related APIs inclusion switch.
 - */
 -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
 -#define CAN_USE_SLEEP_MODE          TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* I2C driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables the mutual exclusion APIs on the I2C bus.
 - */
 -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define I2C_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MAC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
 -#define MAC_USE_ZERO_COPY           FALSE
 -#endif
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
 -#define MAC_USE_EVENTS              TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MMC_SPI driver related settings.                                          */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - *          This option is recommended also if the SPI driver does not
 - *          use a DMA channel and heavily loads the CPU.
 - */
 -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define MMC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SDC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Number of initialization attempts before rejecting the card.
 - * @note    Attempts are performed at 10mS intervals.
 - */
 -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
 -#define SDC_INIT_RETRY              100
 -#endif
 -
 -/**
 - * @brief   Include support for MMC cards.
 - * @note    MMC support is not yet implemented so this option must be kept
 - *          at @p FALSE.
 - */
 -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
 -#define SDC_MMC_SUPPORT             FALSE
 -#endif
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - */
 -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define SDC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SERIAL driver related settings.                                           */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Default bit rate.
 - * @details Configuration parameter, this is the baud rate selected for the
 - *          default configuration.
 - */
 -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
 -#define SERIAL_DEFAULT_BITRATE      38400
 -#endif
 -
 -/**
 - * @brief   Serial buffers size.
 - * @details Configuration parameter, you can change the depth of the queue
 - *          buffers depending on the requirements of your application.
 - * @note    The default is 64 bytes for both the transmission and receive
 - *          buffers.
 - */
 -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
 -#define SERIAL_BUFFERS_SIZE         16
 -#endif
 -
 -/*===========================================================================*/
 -/* SPI driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
 -#define SPI_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define SPI_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -#endif /* _HALCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/IRQ_STORM/main.c b/testhal/STM32L1xx/IRQ_STORM/main.c deleted file mode 100644 index c66bd7e13..000000000 --- a/testhal/STM32L1xx/IRQ_STORM/main.c +++ /dev/null @@ -1,335 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -#include <stdlib.h>
 -
 -#include "ch.h"
 -#include "hal.h"
 -
 -/*===========================================================================*/
 -/* Configurable settings.                                                    */
 -/*===========================================================================*/
 -
 -#ifndef RANDOMIZE
 -#define RANDOMIZE       FALSE
 -#endif
 -
 -#ifndef ITERATIONS
 -#define ITERATIONS      100
 -#endif
 -
 -#ifndef NUM_THREADS
 -#define NUM_THREADS     4
 -#endif
 -
 -#ifndef MAILBOX_SIZE
 -#define MAILBOX_SIZE    4
 -#endif
 -
 -/*===========================================================================*/
 -/* Test related code.                                                        */
 -/*===========================================================================*/
 -
 -#define MSG_SEND_LEFT   0
 -#define MSG_SEND_RIGHT  1
 -
 -static bool saturated;
 -
 -/*
 - * Mailboxes and buffers.
 - */
 -static mailbox_t mb[NUM_THREADS];
 -static msg_t b[NUM_THREADS][MAILBOX_SIZE];
 -
 -/*
 - * Test worker threads.
 - */
 -static THD_WORKING_AREA(waWorkerThread[NUM_THREADS], 128);
 -static msg_t WorkerThread(void *arg) {
 -  static volatile unsigned x = 0;
 -  static unsigned cnt = 0;
 -  unsigned me = (unsigned)arg;
 -  unsigned target;
 -  unsigned r;
 -  msg_t msg;
 -
 -  chRegSetThreadName("worker");
 -
 -  /* Work loop.*/
 -  while (TRUE) {
 -    /* Waiting for a message.*/
 -   chMBFetch(&mb[me], &msg, TIME_INFINITE);
 -
 -#if RANDOMIZE
 -   /* Pseudo-random delay.*/
 -   {
 -     chSysLock();
 -     r = rand() & 15;
 -     chSysUnlock();
 -     while (r--)
 -       x++;
 -   }
 -#else
 -   /* Fixed delay.*/
 -   {
 -     r = me >> 4;
 -     while (r--)
 -       x++;
 -   }
 -#endif
 -
 -    /* Deciding in which direction to re-send the message.*/
 -    if (msg == MSG_SEND_LEFT)
 -      target = me - 1;
 -    else
 -      target = me + 1;
 -
 -    if (target < NUM_THREADS) {
 -      /* If this thread is not at the end of a chain re-sending the message,
 -         note this check works because the variable target is unsigned.*/
 -      msg = chMBPost(&mb[target], msg, TIME_IMMEDIATE);
 -      if (msg != MSG_OK)
 -        saturated = TRUE;
 -    }
 -    else {
 -      /* Provides a visual feedback about the system.*/
 -      if (++cnt >= 500) {
 -        cnt = 0;
 -        palTogglePad(GPIOB, GPIOB_LED4);
 -      }
 -    }
 -  }
 -}
 -
 -/*
 - * GPT2 callback.
 - */
 -static void gpt4cb(GPTDriver *gptp) {
 -  msg_t msg;
 -
 -  (void)gptp;
 -  chSysLockFromISR();
 -  msg = chMBPostI(&mb[0], MSG_SEND_RIGHT);
 -  if (msg != MSG_OK)
 -    saturated = TRUE;
 -  chSysUnlockFromISR();
 -}
 -
 -/*
 - * GPT3 callback.
 - */
 -static void gpt3cb(GPTDriver *gptp) {
 -  msg_t msg;
 -
 -  (void)gptp;
 -  chSysLockFromISR();
 -  msg = chMBPostI(&mb[NUM_THREADS - 1], MSG_SEND_LEFT);
 -  if (msg != MSG_OK)
 -    saturated = TRUE;
 -  chSysUnlockFromISR();
 -}
 -
 -/*
 - * GPT2 configuration.
 - */
 -static const GPTConfig gpt4cfg = {
 -  1000000,  /* 1MHz timer clock.*/
 -  gpt4cb,   /* Timer callback.*/
 -  0,
 -  0
 -};
 -
 -/*
 - * GPT3 configuration.
 - */
 -static const GPTConfig gpt3cfg = {
 -  1000000,  /* 1MHz timer clock.*/
 -  gpt3cb,   /* Timer callback.*/
 -  0,
 -  0
 -};
 -
 -
 -/*===========================================================================*/
 -/* Generic demo code.                                                        */
 -/*===========================================================================*/
 -
 -static void print(char *p) {
 -
 -  while (*p) {
 -    chSequentialStreamPut(&SD1, *p++);
 -  }
 -}
 -
 -static void println(char *p) {
 -
 -  while (*p) {
 -    chSequentialStreamPut(&SD1, *p++);
 -  }
 -  chSequentialStreamWrite(&SD1, (uint8_t *)"\r\n", 2);
 -}
 -
 -static void printn(uint32_t n) {
 -  char buf[16], *p;
 -
 -  if (!n)
 -    chSequentialStreamPut(&SD1, '0');
 -  else {
 -    p = buf;
 -    while (n)
 -      *p++ = (n % 10) + '0', n /= 10;
 -    while (p > buf)
 -      chSequentialStreamPut(&SD1, *--p);
 -  }
 -}
 -
 -/*
 - * Application entry point.
 - */
 -int main(void) {
 -  unsigned i;
 -  gptcnt_t interval, threshold, worst;
 -
 -  /*
 -   * System initializations.
 -   * - HAL initialization, this also initializes the configured device drivers
 -   *   and performs the board-specific initializations.
 -   * - Kernel initialization, the main() function becomes a thread and the
 -   *   RTOS is active.
 -   */
 -  halInit();
 -  chSysInit();
 -
 -  /*
 -   * Activates the serial driver 1, PA9 and PA10 are routed to USART1.
 -   */
 -  sdStart(&SD1, NULL);
 -  palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7));       /* USART1 TX.       */
 -  palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7));      /* USART1 RX.       */
 -
 -  /*
 -   * Activates GPTs.
 -   */
 -  gptStart(&GPTD4, &gpt4cfg);
 -  gptStart(&GPTD3, &gpt3cfg);
 -
 -  /*
 -   * Initializes the mailboxes and creates the worker threads.
 -   */
 -  for (i = 0; i < NUM_THREADS; i++) {
 -    chMBObjectInit(&mb[i], b[i], MAILBOX_SIZE);
 -    chThdCreateStatic(waWorkerThread[i], sizeof waWorkerThread[i],
 -                      NORMALPRIO - 20, WorkerThread, (void *)i);
 -  }
 -
 -  /*
 -   * Test procedure.
 -   */
 -  println("");
 -  println("*** ChibiOS/RT IRQ-STORM long duration test");
 -  println("***");
 -  print("*** Kernel:       ");
 -  println(CH_KERNEL_VERSION);
 -  print("*** Compiled:     ");
 -  println(__DATE__ " - " __TIME__);
 -#ifdef PORT_COMPILER_NAME
 -  print("*** Compiler:     ");
 -  println(PORT_COMPILER_NAME);
 -#endif
 -  print("*** Architecture: ");
 -  println(PORT_ARCHITECTURE_NAME);
 -#ifdef PORT_CORE_VARIANT_NAME
 -  print("*** Core Variant: ");
 -  println(PORT_CORE_VARIANT_NAME);
 -#endif
 -#ifdef PORT_INFO
 -  print("*** Port Info:    ");
 -  println(PORT_INFO);
 -#endif
 -#ifdef PLATFORM_NAME
 -  print("*** Platform:     ");
 -  println(PLATFORM_NAME);
 -#endif
 -#ifdef BOARD_NAME
 -  print("*** Test Board:   ");
 -  println(BOARD_NAME);
 -#endif
 -  println("***");
 -  print("*** System Clock: ");
 -  printn(STM32_SYSCLK);
 -  println("");
 -  print("*** Iterations:   ");
 -  printn(ITERATIONS);
 -  println("");
 -  print("*** Randomize:    ");
 -  printn(RANDOMIZE);
 -  println("");
 -  print("*** Threads:      ");
 -  printn(NUM_THREADS);
 -  println("");
 -  print("*** Mailbox size: ");
 -  printn(MAILBOX_SIZE);
 -  println("");
 -
 -  println("");
 -  worst = 0;
 -  for (i = 1; i <= ITERATIONS; i++){
 -    print("Iteration ");
 -    printn(i);
 -    println("");
 -    saturated = FALSE;
 -    threshold = 0;
 -    for (interval = 2000; interval >= 10; interval -= interval / 10) {
 -      gptStartContinuous(&GPTD4, interval - 1); /* Slightly out of phase.*/
 -      gptStartContinuous(&GPTD3, interval + 1); /* Slightly out of phase.*/
 -      chThdSleepMilliseconds(1000);
 -      gptStopTimer(&GPTD4);
 -      gptStopTimer(&GPTD3);
 -      if (!saturated)
 -        print(".");
 -      else {
 -        print("#");
 -        if (threshold == 0)
 -          threshold = interval;
 -      }
 -    }
 -    /* Gives the worker threads a chance to empty the mailboxes before next
 -       cycle.*/
 -    chThdSleepMilliseconds(20);
 -    println("");
 -    print("Saturated at ");
 -    printn(threshold);
 -    println(" uS");
 -    println("");
 -    if (threshold > worst)
 -      worst = threshold;
 -  }
 -  gptStopTimer(&GPTD4);
 -  gptStopTimer(&GPTD3);
 -
 -  print("Worst case at ");
 -  printn(worst);
 -  println(" uS");
 -  println("");
 -  println("Test Complete");
 -
 -  /*
 -   * Normal main() thread activity, nothing in this test.
 -   */
 -  while (TRUE) {
 -    chThdSleepMilliseconds(5000);
 -  }
 -}
 diff --git a/testhal/STM32L1xx/IRQ_STORM/mcuconf.h b/testhal/STM32L1xx/IRQ_STORM/mcuconf.h deleted file mode 100644 index 50ded9f4a..000000000 --- a/testhal/STM32L1xx/IRQ_STORM/mcuconf.h +++ /dev/null @@ -1,177 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/*
 - * STM32L1xx drivers configuration.
 - * The following settings override the default settings present in
 - * the various device driver implementation headers.
 - * Note that the settings for each driver only have effect if the whole
 - * driver is enabled in halconf.h.
 - *
 - * IRQ priorities:
 - * 15...0       Lowest...Highest.
 - *
 - * DMA priorities:
 - * 0...3        Lowest...Highest.
 - */
 -
 -#define STM32L1xx_MCUCONF
 -
 -/*
 - * HAL driver system settings.
 - */
 -#define STM32_NO_INIT                       FALSE
 -#define STM32_HSI_ENABLED                   TRUE
 -#define STM32_LSI_ENABLED                   TRUE
 -#define STM32_HSE_ENABLED                   FALSE
 -#define STM32_LSE_ENABLED                   TRUE
 -#define STM32_ADC_CLOCK_ENABLED             TRUE
 -#define STM32_USB_CLOCK_ENABLED             TRUE
 -#define STM32_MSIRANGE                      STM32_MSIRANGE_2M
 -#define STM32_SW                            STM32_SW_PLL
 -#define STM32_PLLSRC                        STM32_PLLSRC_HSI
 -#define STM32_PLLMUL_VALUE                  6
 -#define STM32_PLLDIV_VALUE                  3
 -#define STM32_HPRE                          STM32_HPRE_DIV1
 -#define STM32_PPRE1                         STM32_PPRE1_DIV1
 -#define STM32_PPRE2                         STM32_PPRE2_DIV1
 -#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
 -#define STM32_MCOPRE                        STM32_MCOPRE_DIV1
 -#define STM32_RTCSEL                        STM32_RTCSEL_LSE
 -#define STM32_RTCPRE                        STM32_RTCPRE_DIV2
 -#define STM32_VOS                           STM32_VOS_1P8
 -#define STM32_PVD_ENABLE                    FALSE
 -#define STM32_PLS                           STM32_PLS_LEV0
 -
 -/*
 - * ADC driver system settings.
 - */
 -#define STM32_ADC_USE_ADC1                  FALSE
 -#define STM32_ADC_ADC1_DMA_PRIORITY         2
 -#define STM32_ADC_IRQ_PRIORITY              6
 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY     6
 -
 -/*
 - * EXT driver system settings.
 - */
 -#define STM32_EXT_EXTI0_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI1_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI2_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI3_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI4_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY      6
 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY    6
 -#define STM32_EXT_EXTI16_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI17_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI18_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI19_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI20_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI21_22_IRQ_PRIORITY    6
 -
 -/*
 - * GPT driver system settings.
 - */
 -#define STM32_GPT_USE_TIM2                  FALSE
 -#define STM32_GPT_USE_TIM3                  TRUE
 -#define STM32_GPT_USE_TIM4                  TRUE
 -#define STM32_GPT_TIM2_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM3_IRQ_PRIORITY         10
 -#define STM32_GPT_TIM4_IRQ_PRIORITY         6
 -
 -/*
 - * I2C driver system settings.
 - */
 -#define STM32_I2C_USE_I2C1                  FALSE
 -#define STM32_I2C_USE_I2C2                  FALSE
 -#define STM32_I2C_BUSY_TIMEOUT              50
 -#define STM32_I2C_I2C1_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C2_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C1_DMA_PRIORITY         3
 -#define STM32_I2C_I2C2_DMA_PRIORITY         3
 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
 -
 -/*
 - * ICU driver system settings.
 - */
 -#define STM32_ICU_USE_TIM2                  FALSE
 -#define STM32_ICU_USE_TIM3                  FALSE
 -#define STM32_ICU_USE_TIM4                  FALSE
 -#define STM32_ICU_USE_TIM9                  FALSE
 -#define STM32_ICU_TIM2_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM3_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM4_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * PWM driver system settings.
 - */
 -#define STM32_PWM_USE_TIM2                  FALSE
 -#define STM32_PWM_USE_TIM3                  FALSE
 -#define STM32_PWM_USE_TIM4                  FALSE
 -#define STM32_PWM_USE_TIM9                  FALSE
 -#define STM32_PWM_TIM2_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM3_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM4_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * SERIAL driver system settings.
 - */
 -#define STM32_SERIAL_USE_USART1             TRUE
 -#define STM32_SERIAL_USE_USART2             FALSE
 -#define STM32_SERIAL_USE_USART3             FALSE
 -#define STM32_SERIAL_USART1_PRIORITY        12
 -#define STM32_SERIAL_USART2_PRIORITY        12
 -#define STM32_SERIAL_USART3_PRIORITY        12
 -
 -/*
 - * SPI driver system settings.
 - */
 -#define STM32_SPI_USE_SPI1                  FALSE
 -#define STM32_SPI_USE_SPI2                  FALSE
 -#define STM32_SPI_SPI1_DMA_PRIORITY         1
 -#define STM32_SPI_SPI2_DMA_PRIORITY         1
 -#define STM32_SPI_SPI1_IRQ_PRIORITY         10
 -#define STM32_SPI_SPI2_IRQ_PRIORITY         10
 -#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
 -
 -/*
 - * ST driver system settings.
 - */
 -#define STM32_ST_IRQ_PRIORITY               8
 -#define STM32_ST_USE_TIMER                  2
 -
 -/*
 - * UART driver system settings.
 - */
 -#define STM32_UART_USE_USART1               FALSE
 -#define STM32_UART_USE_USART2               FALSE
 -#define STM32_UART_USE_USART3               FALSE
 -#define STM32_UART_USART1_IRQ_PRIORITY      12
 -#define STM32_UART_USART2_IRQ_PRIORITY      12
 -#define STM32_UART_USART3_IRQ_PRIORITY      12
 -#define STM32_UART_USART1_DMA_PRIORITY      0
 -#define STM32_UART_USART2_DMA_PRIORITY      0
 -#define STM32_UART_USART3_DMA_PRIORITY      0
 -#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
 -
 -/*
 - * USB driver system settings.
 - */
 -#define STM32_USB_USE_USB1                  FALSE
 -#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
 -#define STM32_USB_USB1_HP_IRQ_PRIORITY      13
 -#define STM32_USB_USB1_LP_IRQ_PRIORITY      14
 diff --git a/testhal/STM32L1xx/IRQ_STORM/readme.txt b/testhal/STM32L1xx/IRQ_STORM/readme.txt deleted file mode 100644 index 9483b1f02..000000000 --- a/testhal/STM32L1xx/IRQ_STORM/readme.txt +++ /dev/null @@ -1,31 +0,0 @@ -*****************************************************************************
 -** ChibiOS/RT HAL - IRQ_STORM stress test demo for STM32L1xx.              **
 -*****************************************************************************
 -
 -** TARGET **
 -
 -The demo will on an STMicroelectronics STM32L-Discovery board.
 -
 -** The Demo **
 -
 -The application demonstrates the use of the STM32L1xx GPT, PAL and Serial
 -drivers in order to implement a system stress demo.
 -
 -** Board Setup **
 -
 -None.
 -
 -** Build Procedure **
 -
 -The demo has been tested using the free Codesourcery GCC-based toolchain
 -and YAGARTO.
 -Just modify the TRGT line in the makefile in order to use different GCC ports.
 -
 -** Notes **
 -
 -Some files used by the demo are not part of ChibiOS/RT but are copyright of
 -ST Microelectronics and are licensed under a different license.
 -Also note that not all the files present in the ST library are distributed
 -with ChibiOS/RT, you can find the whole library on the ST web site:
 -
 -                             http://www.st.com
 diff --git a/testhal/STM32L1xx/PWM-ICU/.cproject b/testhal/STM32L1xx/PWM-ICU/.cproject deleted file mode 100644 index b96ec18ee..000000000 --- a/testhal/STM32L1xx/PWM-ICU/.cproject +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 -<?fileVersion 4.0.0?>
 -
 -<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
 -	<storageModule moduleId="org.eclipse.cdt.core.settings">
 -		<cconfiguration id="0.2086107086">
 -			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.2086107086" moduleId="org.eclipse.cdt.core.settings" name="Default">
 -				<externalSettings/>
 -				<extensions>
 -					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -				</extensions>
 -			</storageModule>
 -			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -				<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.2086107086" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
 -					<folderInfo id="0.2086107086." name="/" resourcePath="">
 -						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.2110867099" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
 -							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.2110867099.1134007112" name=""/>
 -							<builder id="org.eclipse.cdt.build.core.settings.default.builder.251054178" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.460950215" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.939749781" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2076159444" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.859706160" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.556649679" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.1129733599" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.164509933" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -						</toolChain>
 -					</folderInfo>
 -				</configuration>
 -			</storageModule>
 -			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
 -		</cconfiguration>
 -	</storageModule>
 -	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -		<project id="STM32L1xx-PWM-ICU.null.205562734" name="STM32L1xx-PWM-ICU"/>
 -	</storageModule>
 -	<storageModule moduleId="scannerConfiguration">
 -		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
 -		<scannerConfigBuildInfo instanceId="0.2086107086">
 -			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
 -		</scannerConfigBuildInfo>
 -	</storageModule>
 -	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
 -</cproject>
 diff --git a/testhal/STM32L1xx/PWM-ICU/.project b/testhal/STM32L1xx/PWM-ICU/.project deleted file mode 100644 index 9b7b1ba58..000000000 --- a/testhal/STM32L1xx/PWM-ICU/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
 -<projectDescription>
 -	<name>STM32L1xx-PWM-ICU</name>
 -	<comment></comment>
 -	<projects>
 -	</projects>
 -	<buildSpec>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
 -			<triggers>clean,full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
 -			<triggers>full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -	</buildSpec>
 -	<natures>
 -		<nature>org.eclipse.cdt.core.cnature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
 -	</natures>
 -	<linkedResources>
 -		<link>
 -			<name>os</name>
 -			<type>2</type>
 -			<locationURI>CHIBIOS/os</locationURI>
 -		</link>
 -	</linkedResources>
 -</projectDescription>
 diff --git a/testhal/STM32L1xx/PWM-ICU/Makefile b/testhal/STM32L1xx/PWM-ICU/Makefile deleted file mode 100644 index ad1bb67f8..000000000 --- a/testhal/STM32L1xx/PWM-ICU/Makefile +++ /dev/null @@ -1,198 +0,0 @@ -##############################################################################
 -# Build global options
 -# NOTE: Can be overridden externally.
 -#
 -
 -# Compiler options here.
 -ifeq ($(USE_OPT),)
 -  USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
 -endif
 -
 -# C specific options here (added to USE_OPT).
 -ifeq ($(USE_COPT),)
 -  USE_COPT = 
 -endif
 -
 -# C++ specific options here (added to USE_OPT).
 -ifeq ($(USE_CPPOPT),)
 -  USE_CPPOPT = -fno-rtti
 -endif
 -
 -# Enable this if you want the linker to remove unused code and data
 -ifeq ($(USE_LINK_GC),)
 -  USE_LINK_GC = yes
 -endif
 -
 -# Linker extra options here.
 -ifeq ($(USE_LDOPT),)
 -  USE_LDOPT = 
 -endif
 -
 -# Enable this if you want link time optimizations (LTO)
 -ifeq ($(USE_LTO),)
 -  USE_LTO = yes
 -endif
 -
 -# If enabled, this option allows to compile the application in THUMB mode.
 -ifeq ($(USE_THUMB),)
 -  USE_THUMB = yes
 -endif
 -
 -# Enable this if you want to see the full log while compiling.
 -ifeq ($(USE_VERBOSE_COMPILE),)
 -  USE_VERBOSE_COMPILE = no
 -endif
 -
 -#
 -# Build global options
 -##############################################################################
 -
 -##############################################################################
 -# Architecture or project specific options
 -#
 -
 -# Stack size to be allocated to the Cortex-M process stack. This stack is
 -# the stack used by the main() thread.
 -ifeq ($(USE_PROCESS_STACKSIZE),)
 -  USE_PROCESS_STACKSIZE = 0x400
 -endif
 -
 -# Stack size to the allocated to the Cortex-M main/exceptions stack. This
 -# stack is used for processing interrupts and exceptions.
 -ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
 -  USE_EXCEPTIONS_STACKSIZE = 0x400
 -endif
 -
 -#
 -# Architecture or project specific options
 -##############################################################################
 -
 -##############################################################################
 -# Project, sources and paths
 -#
 -
 -# Define project name here
 -PROJECT = ch
 -
 -# Imported source files and paths
 -CHIBIOS = ../../..
 -include $(CHIBIOS)/os/hal/hal.mk
 -include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
 -include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
 -include $(CHIBIOS)/os/hal/osal/rt/osal.mk
 -include $(CHIBIOS)/os/rt/rt.mk
 -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk
 -#include $(CHIBIOS)/test/rt/test.mk
 -
 -# Define linker script file here
 -LDSCRIPT= $(PORTLD)/STM32L152xB.ld
 -
 -# C sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CSRC = $(PORTSRC) \
 -       $(KERNSRC) \
 -       $(TESTSRC) \
 -       $(HALSRC) \
 -       $(OSALSRC) \
 -       $(PLATFORMSRC) \
 -       $(BOARDSRC) \
 -       main.c
 -
 -# C++ sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CPPSRC =
 -
 -# C sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACSRC =
 -
 -# C++ sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACPPSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCPPSRC =
 -
 -# List ASM source files here
 -ASMSRC = $(PORTASM)
 -
 -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
 -         $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
 -         $(CHIBIOS)/os/various
 -
 -#
 -# Project, sources and paths
 -##############################################################################
 -
 -##############################################################################
 -# Compiler settings
 -#
 -
 -MCU  = cortex-m3
 -
 -#TRGT = arm-elf-
 -TRGT = arm-none-eabi-
 -CC   = $(TRGT)gcc
 -CPPC = $(TRGT)g++
 -# Enable loading with g++ only if you need C++ runtime support.
 -# NOTE: You can use C++ even without C++ support if you are careful. C++
 -#       runtime support makes code size explode.
 -LD   = $(TRGT)gcc
 -#LD   = $(TRGT)g++
 -CP   = $(TRGT)objcopy
 -AS   = $(TRGT)gcc -x assembler-with-cpp
 -OD   = $(TRGT)objdump
 -SZ   = $(TRGT)size
 -HEX  = $(CP) -O ihex
 -BIN  = $(CP) -O binary
 -
 -# ARM-specific options here
 -AOPT =
 -
 -# THUMB-specific options here
 -TOPT = -mthumb -DTHUMB
 -
 -# Define C warning options here
 -CWARN = -Wall -Wextra -Wstrict-prototypes
 -
 -# Define C++ warning options here
 -CPPWARN = -Wall -Wextra
 -
 -#
 -# Compiler settings
 -##############################################################################
 -
 -##############################################################################
 -# Start of user section
 -#
 -
 -# List all user C define here, like -D_DEBUG=1
 -UDEFS =
 -
 -# Define ASM defines here
 -UADEFS =
 -
 -# List all user directories here
 -UINCDIR =
 -
 -# List the user directory to look for the libraries here
 -ULIBDIR =
 -
 -# List all user libraries here
 -ULIBS =
 -
 -#
 -# End of user defines
 -##############################################################################
 -
 -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
 -include $(RULESPATH)/rules.mk
 diff --git a/testhal/STM32L1xx/PWM-ICU/chconf.h b/testhal/STM32L1xx/PWM-ICU/chconf.h deleted file mode 100644 index 68af751f1..000000000 --- a/testhal/STM32L1xx/PWM-ICU/chconf.h +++ /dev/null @@ -1,498 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/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.
 - *
 - * @addtogroup config
 - * @details Kernel related settings and hooks.
 - * @{
 - */
 -
 -#ifndef _CHCONF_H_
 -#define _CHCONF_H_
 -
 -/*===========================================================================*/
 -/**
 - * @name System timers settings
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   System time counter resolution.
 - * @note    Allowed values are 16 or 32 bits.
 - */
 -#define CH_CFG_ST_RESOLUTION                16
 -
 -/**
 - * @brief   System tick frequency.
 - * @details Frequency of the system timer that drives the system ticks. This
 - *          setting also defines the system tick time unit.
 - */
 -#define CH_CFG_ST_FREQUENCY                 1000
 -
 -/**
 - * @brief   Time delta constant for the tick-less mode.
 - * @note    If this value is zero then the system uses the classic
 - *          periodic tick. This value represents the minimum number
 - *          of ticks that is safe to specify in a timeout directive.
 - *          The value one is not valid, timeouts are rounded up to
 - *          this value.
 - */
 -#define CH_CFG_ST_TIMEDELTA                 2
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel parameters and options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Round robin interval.
 - * @details This constant is the number of system ticks allowed for the
 - *          threads before preemption occurs. Setting this value to zero
 - *          disables the preemption for threads with equal priority and the
 - *          round robin becomes cooperative. Note that higher priority
 - *          threads can still preempt, the kernel is always preemptive.
 - * @note    Disabling the round robin preemption makes the kernel more compact
 - *          and generally faster.
 - * @note    The round robin preemption is not supported in tickless mode and
 - *          must be set to zero in that case.
 - */
 -#define CH_CFG_TIME_QUANTUM                 0
 -
 -/**
 - * @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
 -
 -/**
 - * @brief   Idle thread automatic spawn suppression.
 - * @details When this option is activated the function @p chSysInit()
 - *          does not spawn the idle thread. The application @p main()
 - *          function becomes the idle thread and must implement an
 - *          infinite loop. */
 -#define CH_CFG_NO_IDLE_THREAD               FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Performance options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   OS optimization.
 - * @details If enabled then time efficient rather than space efficient code
 - *          is used when two possible implementations exist.
 - *
 - * @note    This is not related to the compiler optimization options.
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_OPTIMIZE_SPEED               TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Subsystem options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Time Measurement APIs.
 - * @details If enabled then the time measurement APIs are included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_TM                       TRUE
 -
 -/**
 - * @brief   Threads registry APIs.
 - * @details If enabled then the registry APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_REGISTRY                 TRUE
 -
 -/**
 - * @brief   Threads synchronization APIs.
 - * @details If enabled then the @p chThdWait() function is included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_WAITEXIT                 TRUE
 -
 -/**
 - * @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   Semaphores queuing mode.
 - * @details If enabled then the threads are enqueued on semaphores by
 - *          priority rather than in FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_SEMAPHORES.
 - */
 -#define CH_CFG_USE_SEMAPHORES_PRIORITY      FALSE
 -
 -/**
 - * @brief   Mutexes APIs.
 - * @details If enabled then the mutexes APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MUTEXES                  TRUE
 -
 -/**
 - * @brief   Enables recursive behavior on mutexes.
 - * @note    Recursive mutexes are heavier and have an increased
 - *          memory footprint.
 - *
 - * @note    The default is @p FALSE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_MUTEXES_RECURSIVE        FALSE
 -
 -/**
 - * @brief   Conditional Variables APIs.
 - * @details If enabled then the conditional variables APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_CONDVARS                 TRUE
 -
 -/**
 - * @brief   Conditional Variables APIs with timeout.
 - * @details If enabled then the conditional variables APIs with timeout
 - *          specification are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_CONDVARS.
 - */
 -#define CH_CFG_USE_CONDVARS_TIMEOUT         TRUE
 -
 -/**
 - * @brief   Events Flags APIs.
 - * @details If enabled then the event flags APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_EVENTS                   TRUE
 -
 -/**
 - * @brief   Events Flags APIs with timeout.
 - * @details If enabled then the events APIs with timeout specification
 - *          are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_EVENTS.
 - */
 -#define CH_CFG_USE_EVENTS_TIMEOUT           TRUE
 -
 -/**
 - * @brief   Synchronous Messages APIs.
 - * @details If enabled then the synchronous messages APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MESSAGES                 TRUE
 -
 -/**
 - * @brief   Synchronous Messages queuing mode.
 - * @details If enabled then messages are served by priority rather than in
 - *          FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_MESSAGES.
 - */
 -#define CH_CFG_USE_MESSAGES_PRIORITY        FALSE
 -
 -/**
 - * @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   I/O Queues APIs.
 - * @details If enabled then the I/O queues APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_QUEUES                   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.
 - * @note    Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
 - *          @p CH_CFG_USE_SEMAPHORES.
 - * @note    Mutexes are recommended.
 - */
 -#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   Dynamic Threads APIs.
 - * @details If enabled then the dynamic threads creation APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_WAITEXIT.
 - * @note    Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
 - */
 -#define CH_CFG_USE_DYNAMIC                  TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Debug options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Debug option, kernel statistics.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_STATISTICS                   TRUE
 -
 -/**
 - * @brief   Debug option, system state check.
 - * @details If enabled the correct call protocol for system APIs is checked
 - *          at runtime.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_SYSTEM_STATE_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, parameters checks.
 - * @details If enabled then the checks on the API functions input
 - *          parameters are activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_CHECKS                TRUE
 -
 -/**
 - * @brief   Debug option, consistency checks.
 - * @details If enabled then all the assertions in the kernel code are
 - *          activated. This includes consistency checks inside the kernel,
 - *          runtime anomalies and port-defined checks.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_ASSERTS               TRUE
 -
 -/**
 - * @brief   Debug option, trace buffer.
 - * @details If enabled then the context switch circular trace buffer is
 - *          activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_TRACE                 TRUE
 -
 -/**
 - * @brief   Debug option, stack checks.
 - * @details If enabled then a runtime stack check is performed.
 - *
 - * @note    The default is @p FALSE.
 - * @note    The stack check is performed in a architecture/port dependent way.
 - *          It may not be implemented or some ports.
 - * @note    The default failure mode is to halt the system with the global
 - *          @p panic_msg variable set to @p NULL.
 - */
 -#define CH_DBG_ENABLE_STACK_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, stacks initialization.
 - * @details If enabled then the threads working area is filled with a byte
 - *          value when a thread is created. This can be useful for the
 - *          runtime measurement of the used stack.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_FILL_THREADS                 TRUE
 -
 -/**
 - * @brief   Debug option, threads profiling.
 - * @details If enabled then a field is added to the @p thread_t structure that
 - *          counts the system ticks occurred while executing the thread.
 - *
 - * @note    The default is @p FALSE.
 - * @note    This debug option is not currently compatible with the
 - *          tickless mode.
 - */
 -#define CH_DBG_THREADS_PROFILING            FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel hooks
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Threads descriptor structure extension.
 - * @details User fields added to the end of the @p thread_t structure.
 - */
 -#define CH_CFG_THREAD_EXTRA_FIELDS                                          \
 -  /* Add threads custom fields here.*/
 -
 -/**
 - * @brief   Threads initialization hook.
 - * @details User initialization code added to the @p chThdInit() API.
 - *
 - * @note    It is invoked from within @p chThdInit() and implicitly from all
 - *          the threads creation APIs.
 - */
 -#define CH_CFG_THREAD_INIT_HOOK(tp) {                                       \
 -  /* Add threads initialization code here.*/                                \
 -}
 -
 -/**
 - * @brief   Threads finalization hook.
 - * @details User finalization code added to the @p chThdExit() API.
 - *
 - * @note    It is inserted into lock zone.
 - * @note    It is also invoked when the threads simply return in order to
 - *          terminate.
 - */
 -#define CH_CFG_THREAD_EXIT_HOOK(tp) {                                       \
 -  /* Add threads finalization code here.*/                                  \
 -}
 -
 -/**
 - * @brief   Context switch hook.
 - * @details This hook is invoked just before switching between threads.
 - */
 -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) {                              \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/**
 - * @brief   Idle thread enter hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to activate a power saving mode.
 - */
 -#define CH_CFG_IDLE_ENTER_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle thread leave hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to deactivate a power saving mode.
 - */
 -#define CH_CFG_IDLE_LEAVE_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle Loop hook.
 - * @details This hook is continuously invoked by the idle thread loop.
 - */
 -#define CH_CFG_IDLE_LOOP_HOOK() {                                           \
 -  /* Idle loop code here.*/                                                 \
 -}
 -
 -/**
 - * @brief   System tick event hook.
 - * @details This hook is invoked in the system tick handler immediately
 - *          after processing the virtual timers queue.
 - */
 -#define CH_CFG_SYSTEM_TICK_HOOK() {                                         \
 -  /* System tick event code here.*/                                         \
 -}
 -
 -/**
 - * @brief   System halt hook.
 - * @details This hook is invoked in case to a system halting error before
 - *          the system is halted.
 - */
 -#define CH_CFG_SYSTEM_HALT_HOOK(reason) {                                   \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/* Port-specific settings (override port settings defaulted in chcore.h).    */
 -/*===========================================================================*/
 -
 -#endif  /* _CHCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/PWM-ICU/halconf.h b/testhal/STM32L1xx/PWM-ICU/halconf.h deleted file mode 100644 index a5adf535c..000000000 --- a/testhal/STM32L1xx/PWM-ICU/halconf.h +++ /dev/null @@ -1,319 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/halconf.h
 - * @brief   HAL configuration header.
 - * @details HAL configuration file, this file allows to enable or disable the
 - *          various device drivers from your application. You may also use
 - *          this file in order to override the device drivers default settings.
 - *
 - * @addtogroup HAL_CONF
 - * @{
 - */
 -
 -#ifndef _HALCONF_H_
 -#define _HALCONF_H_
 -
 -#include "mcuconf.h"
 -
 -/**
 - * @brief   Enables the TM subsystem.
 - */
 -#if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
 -#define HAL_USE_TM                  TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the PAL subsystem.
 - */
 -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
 -#define HAL_USE_PAL                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the ADC subsystem.
 - */
 -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
 -#define HAL_USE_ADC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the CAN subsystem.
 - */
 -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
 -#define HAL_USE_CAN                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the EXT subsystem.
 - */
 -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
 -#define HAL_USE_EXT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the GPT subsystem.
 - */
 -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
 -#define HAL_USE_GPT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2C subsystem.
 - */
 -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
 -#define HAL_USE_I2C                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2S subsystem.
 - */
 -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
 -#define HAL_USE_I2S                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the ICU subsystem.
 - */
 -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
 -#define HAL_USE_ICU                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the MAC subsystem.
 - */
 -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
 -#define HAL_USE_MAC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MMC_SPI subsystem.
 - */
 -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_MMC_SPI             FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the PWM subsystem.
 - */
 -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
 -#define HAL_USE_PWM                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the RTC subsystem.
 - */
 -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
 -#define HAL_USE_RTC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SDC subsystem.
 - */
 -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
 -#define HAL_USE_SDC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL              FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL over USB subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL_USB          FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SPI subsystem.
 - */
 -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_SPI                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the UART subsystem.
 - */
 -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
 -#define HAL_USE_UART                FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the USB subsystem.
 - */
 -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_USB                 FALSE
 -#endif
 -
 -/*===========================================================================*/
 -/* ADC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
 -#define ADC_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define ADC_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* CAN driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Sleep mode related APIs inclusion switch.
 - */
 -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
 -#define CAN_USE_SLEEP_MODE          TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* I2C driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables the mutual exclusion APIs on the I2C bus.
 - */
 -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define I2C_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MAC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
 -#define MAC_USE_ZERO_COPY           FALSE
 -#endif
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
 -#define MAC_USE_EVENTS              TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MMC_SPI driver related settings.                                          */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - *          This option is recommended also if the SPI driver does not
 - *          use a DMA channel and heavily loads the CPU.
 - */
 -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define MMC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SDC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Number of initialization attempts before rejecting the card.
 - * @note    Attempts are performed at 10mS intervals.
 - */
 -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
 -#define SDC_INIT_RETRY              100
 -#endif
 -
 -/**
 - * @brief   Include support for MMC cards.
 - * @note    MMC support is not yet implemented so this option must be kept
 - *          at @p FALSE.
 - */
 -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
 -#define SDC_MMC_SUPPORT             FALSE
 -#endif
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - */
 -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define SDC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SERIAL driver related settings.                                           */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Default bit rate.
 - * @details Configuration parameter, this is the baud rate selected for the
 - *          default configuration.
 - */
 -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
 -#define SERIAL_DEFAULT_BITRATE      38400
 -#endif
 -
 -/**
 - * @brief   Serial buffers size.
 - * @details Configuration parameter, you can change the depth of the queue
 - *          buffers depending on the requirements of your application.
 - * @note    The default is 64 bytes for both the transmission and receive
 - *          buffers.
 - */
 -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
 -#define SERIAL_BUFFERS_SIZE         16
 -#endif
 -
 -/*===========================================================================*/
 -/* SPI driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
 -#define SPI_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define SPI_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -#endif /* _HALCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/PWM-ICU/main.c b/testhal/STM32L1xx/PWM-ICU/main.c deleted file mode 100644 index 9e5955e4a..000000000 --- a/testhal/STM32L1xx/PWM-ICU/main.c +++ /dev/null @@ -1,140 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -#include "ch.h"
 -#include "hal.h"
 -
 -static void pwmpcb(PWMDriver *pwmp) {
 -
 -  (void)pwmp;
 -  palClearPad(GPIOB, GPIOB_LED4);
 -}
 -
 -static void pwmc1cb(PWMDriver *pwmp) {
 -
 -  (void)pwmp;
 -  palSetPad(GPIOB, GPIOB_LED4);
 -}
 -
 -static PWMConfig pwmcfg = {
 -  10000,                                    /* 10kHz PWM clock frequency.   */
 -  10000,                                    /* Initial PWM period 1S.       */
 -  pwmpcb,
 -  {
 -   {PWM_OUTPUT_ACTIVE_HIGH, pwmc1cb},
 -   {PWM_OUTPUT_DISABLED, NULL},
 -   {PWM_OUTPUT_DISABLED, NULL},
 -   {PWM_OUTPUT_DISABLED, NULL}
 -  },
 -  0,
 -  0
 -};
 -
 -icucnt_t last_width, last_period;
 -
 -static void icuwidthcb(ICUDriver *icup) {
 -
 -  palSetPad(GPIOB, GPIOB_LED3);
 -  last_width = icuGetWidth(icup);
 -}
 -
 -static void icuperiodcb(ICUDriver *icup) {
 -
 -  palClearPad(GPIOB, GPIOB_LED3);
 -  last_period = icuGetPeriod(icup);
 -}
 -
 -static ICUConfig icucfg = {
 -  ICU_INPUT_ACTIVE_HIGH,
 -  10000,                                    /* 10kHz ICU clock frequency.   */
 -  icuwidthcb,
 -  icuperiodcb,
 -  NULL,
 -  ICU_CHANNEL_1,
 -  0
 -};
 -
 -/*
 - * Application entry point.
 - */
 -int main(void) {
 -
 -  /*
 -   * System initializations.
 -   * - HAL initialization, this also initializes the configured device drivers
 -   *   and performs the board-specific initializations.
 -   * - Kernel initialization, the main() function becomes a thread and the
 -   *   RTOS is active.
 -   */
 -  halInit();
 -  chSysInit();
 -
 -  /*
 -   * Initializes the PWM driver 2 and ICU driver 3.
 -   * GPIOA15 is the PWM output.
 -   * GPIOC6 is the ICU input.
 -   * The two pins have to be externally connected together.
 -   */
 -  pwmStart(&PWMD2, &pwmcfg);
 -  palSetPadMode(GPIOA, 15, PAL_MODE_ALTERNATE(1));
 -  icuStart(&ICUD3, &icucfg);
 -  palSetPadMode(GPIOC, 6, PAL_MODE_ALTERNATE(2));
 -  icuEnable(&ICUD3);
 -  chThdSleepMilliseconds(2000);
 -
 -  /*
 -   * Starts the PWM channel 0 using 75% duty cycle.
 -   */
 -  pwmEnableChannel(&PWMD2, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD2, 7500));
 -  chThdSleepMilliseconds(5000);
 -
 -  /*
 -   * Changes the PWM channel 0 to 50% duty cycle.
 -   */
 -  pwmEnableChannel(&PWMD2, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD2, 5000));
 -  chThdSleepMilliseconds(5000);
 -
 -  /*
 -   * Changes the PWM channel 0 to 25% duty cycle.
 -   */
 -  pwmEnableChannel(&PWMD2, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD2, 2500));
 -  chThdSleepMilliseconds(5000);
 -
 -  /*
 -   * Changes PWM period to half second the duty cycle becomes 50%
 -   * implicitly.
 -   */
 -  pwmChangePeriod(&PWMD2, 5000);
 -  chThdSleepMilliseconds(5000);
 -
 -  /*
 -   * Disables channel 0 and stops the drivers.
 -   */
 -  pwmDisableChannel(&PWMD2, 0);
 -  pwmStop(&PWMD2);
 -  icuDisable(&ICUD3);
 -  icuStop(&ICUD3);
 -  palClearPad(GPIOB, GPIOB_LED3);
 -  palClearPad(GPIOB, GPIOB_LED4);
 -
 -  /*
 -   * Normal main() thread activity, in this demo it does nothing.
 -   */
 -  while (TRUE) {
 -    chThdSleepMilliseconds(500);
 -  }
 -  return 0;
 -}
 diff --git a/testhal/STM32L1xx/PWM-ICU/mcuconf.h b/testhal/STM32L1xx/PWM-ICU/mcuconf.h deleted file mode 100644 index ee982438b..000000000 --- a/testhal/STM32L1xx/PWM-ICU/mcuconf.h +++ /dev/null @@ -1,177 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/*
 - * STM32L1xx drivers configuration.
 - * The following settings override the default settings present in
 - * the various device driver implementation headers.
 - * Note that the settings for each driver only have effect if the whole
 - * driver is enabled in halconf.h.
 - *
 - * IRQ priorities:
 - * 15...0       Lowest...Highest.
 - *
 - * DMA priorities:
 - * 0...3        Lowest...Highest.
 - */
 -
 -#define STM32L1xx_MCUCONF
 -
 -/*
 - * HAL driver system settings.
 - */
 -#define STM32_NO_INIT                       FALSE
 -#define STM32_HSI_ENABLED                   TRUE
 -#define STM32_LSI_ENABLED                   TRUE
 -#define STM32_HSE_ENABLED                   FALSE
 -#define STM32_LSE_ENABLED                   TRUE
 -#define STM32_ADC_CLOCK_ENABLED             TRUE
 -#define STM32_USB_CLOCK_ENABLED             TRUE
 -#define STM32_MSIRANGE                      STM32_MSIRANGE_2M
 -#define STM32_SW                            STM32_SW_PLL
 -#define STM32_PLLSRC                        STM32_PLLSRC_HSI
 -#define STM32_PLLMUL_VALUE                  6
 -#define STM32_PLLDIV_VALUE                  3
 -#define STM32_HPRE                          STM32_HPRE_DIV1
 -#define STM32_PPRE1                         STM32_PPRE1_DIV1
 -#define STM32_PPRE2                         STM32_PPRE2_DIV1
 -#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
 -#define STM32_MCOPRE                        STM32_MCOPRE_DIV1
 -#define STM32_RTCSEL                        STM32_RTCSEL_LSE
 -#define STM32_RTCPRE                        STM32_RTCPRE_DIV2
 -#define STM32_VOS                           STM32_VOS_1P8
 -#define STM32_PVD_ENABLE                    FALSE
 -#define STM32_PLS                           STM32_PLS_LEV0
 -
 -/*
 - * ADC driver system settings.
 - */
 -#define STM32_ADC_USE_ADC1                  FALSE
 -#define STM32_ADC_ADC1_DMA_PRIORITY         2
 -#define STM32_ADC_IRQ_PRIORITY              6
 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY     6
 -
 -/*
 - * EXT driver system settings.
 - */
 -#define STM32_EXT_EXTI0_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI1_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI2_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI3_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI4_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY      6
 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY    6
 -#define STM32_EXT_EXTI16_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI17_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI18_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI19_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI20_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI21_22_IRQ_PRIORITY    6
 -
 -/*
 - * GPT driver system settings.
 - */
 -#define STM32_GPT_USE_TIM2                  FALSE
 -#define STM32_GPT_USE_TIM3                  FALSE
 -#define STM32_GPT_USE_TIM4                  FALSE
 -#define STM32_GPT_TIM2_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM3_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM4_IRQ_PRIORITY         7
 -
 -/*
 - * I2C driver system settings.
 - */
 -#define STM32_I2C_USE_I2C1                  FALSE
 -#define STM32_I2C_USE_I2C2                  FALSE
 -#define STM32_I2C_BUSY_TIMEOUT              50
 -#define STM32_I2C_I2C1_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C2_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C1_DMA_PRIORITY         3
 -#define STM32_I2C_I2C2_DMA_PRIORITY         3
 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
 -
 -/*
 - * ICU driver system settings.
 - */
 -#define STM32_ICU_USE_TIM2                  FALSE
 -#define STM32_ICU_USE_TIM3                  TRUE
 -#define STM32_ICU_USE_TIM4                  FALSE
 -#define STM32_ICU_USE_TIM9                  FALSE
 -#define STM32_ICU_TIM2_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM3_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM4_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * PWM driver system settings.
 - */
 -#define STM32_PWM_USE_TIM2                  TRUE
 -#define STM32_PWM_USE_TIM3                  FALSE
 -#define STM32_PWM_USE_TIM4                  FALSE
 -#define STM32_PWM_USE_TIM9                  FALSE
 -#define STM32_PWM_TIM2_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM3_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM4_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * SERIAL driver system settings.
 - */
 -#define STM32_SERIAL_USE_USART1             FALSE
 -#define STM32_SERIAL_USE_USART2             FALSE
 -#define STM32_SERIAL_USE_USART3             FALSE
 -#define STM32_SERIAL_USART1_PRIORITY        12
 -#define STM32_SERIAL_USART2_PRIORITY        12
 -#define STM32_SERIAL_USART3_PRIORITY        12
 -
 -/*
 - * SPI driver system settings.
 - */
 -#define STM32_SPI_USE_SPI1                  FALSE
 -#define STM32_SPI_USE_SPI2                  FALSE
 -#define STM32_SPI_SPI1_DMA_PRIORITY         1
 -#define STM32_SPI_SPI2_DMA_PRIORITY         1
 -#define STM32_SPI_SPI1_IRQ_PRIORITY         10
 -#define STM32_SPI_SPI2_IRQ_PRIORITY         10
 -#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
 -
 -/*
 - * ST driver system settings.
 - */
 -#define STM32_ST_IRQ_PRIORITY               8
 -#define STM32_ST_USE_TIMER                  4
 -
 -/*
 - * UART driver system settings.
 - */
 -#define STM32_UART_USE_USART1               FALSE
 -#define STM32_UART_USE_USART2               FALSE
 -#define STM32_UART_USE_USART3               FALSE
 -#define STM32_UART_USART1_IRQ_PRIORITY      12
 -#define STM32_UART_USART2_IRQ_PRIORITY      12
 -#define STM32_UART_USART3_IRQ_PRIORITY      12
 -#define STM32_UART_USART1_DMA_PRIORITY      0
 -#define STM32_UART_USART2_DMA_PRIORITY      0
 -#define STM32_UART_USART3_DMA_PRIORITY      0
 -#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
 -
 -/*
 - * USB driver system settings.
 - */
 -#define STM32_USB_USE_USB1                  FALSE
 -#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
 -#define STM32_USB_USB1_HP_IRQ_PRIORITY      13
 -#define STM32_USB_USB1_LP_IRQ_PRIORITY      14
 diff --git a/testhal/STM32L1xx/PWM-ICU/readme.txt b/testhal/STM32L1xx/PWM-ICU/readme.txt deleted file mode 100644 index 52a2dd2ad..000000000 --- a/testhal/STM32L1xx/PWM-ICU/readme.txt +++ /dev/null @@ -1,31 +0,0 @@ -*****************************************************************************
 -** ChibiOS/RT HAL - PWM-ICU drivers demo for STM32L1xx.                    **
 -*****************************************************************************
 -
 -** TARGET **
 -
 -The demo will on an STMicroelectronics STM32L-Discovery board.
 -
 -** The Demo **
 -
 -The application demonstrates the use of the STM32L1xx PWM-ICU drivers.
 -
 -** Board Setup **
 -
 -- Remove the LCD module.
 -- Connect PA15 and PC6 together.
 -
 -** Build Procedure **
 -
 -The demo has been tested using the free Codesourcery GCC-based toolchain
 -and YAGARTO.
 -Just modify the TRGT line in the makefile in order to use different GCC ports.
 -
 -** Notes **
 -
 -Some files used by the demo are not part of ChibiOS/RT but are copyright of
 -ST Microelectronics and are licensed under a different license.
 -Also note that not all the files present in the ST library are distributed
 -with ChibiOS/RT, you can find the whole library on the ST web site:
 -
 -                             http://www.st.com
 diff --git a/testhal/STM32L1xx/SPI/.cproject b/testhal/STM32L1xx/SPI/.cproject deleted file mode 100644 index b2bc5eb2d..000000000 --- a/testhal/STM32L1xx/SPI/.cproject +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 -<?fileVersion 4.0.0?>
 -
 -<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
 -	<storageModule moduleId="org.eclipse.cdt.core.settings">
 -		<cconfiguration id="0.1424118721">
 -			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1424118721" moduleId="org.eclipse.cdt.core.settings" name="Default">
 -				<externalSettings/>
 -				<extensions>
 -					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -				</extensions>
 -			</storageModule>
 -			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -				<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1424118721" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
 -					<folderInfo id="0.1424118721." name="/" resourcePath="">
 -						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.922401014" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
 -							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.922401014.596452208" name=""/>
 -							<builder id="org.eclipse.cdt.build.core.settings.default.builder.570600761" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1717621181" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.1545208742" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.806260905" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.1300926506" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1648234329" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.912546703" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.801317788" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -						</toolChain>
 -					</folderInfo>
 -				</configuration>
 -			</storageModule>
 -			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
 -		</cconfiguration>
 -	</storageModule>
 -	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -		<project id="STM32L1xx-SPI.null.667420997" name="STM32L1xx-SPI"/>
 -	</storageModule>
 -	<storageModule moduleId="scannerConfiguration">
 -		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
 -		<scannerConfigBuildInfo instanceId="0.1424118721">
 -			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
 -		</scannerConfigBuildInfo>
 -	</storageModule>
 -	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
 -</cproject>
 diff --git a/testhal/STM32L1xx/SPI/.project b/testhal/STM32L1xx/SPI/.project deleted file mode 100644 index 5e89c246f..000000000 --- a/testhal/STM32L1xx/SPI/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
 -<projectDescription>
 -	<name>STM32L1xx-SPI</name>
 -	<comment></comment>
 -	<projects>
 -	</projects>
 -	<buildSpec>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
 -			<triggers>clean,full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
 -			<triggers>full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -	</buildSpec>
 -	<natures>
 -		<nature>org.eclipse.cdt.core.cnature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
 -	</natures>
 -	<linkedResources>
 -		<link>
 -			<name>os</name>
 -			<type>2</type>
 -			<locationURI>CHIBIOS/os</locationURI>
 -		</link>
 -	</linkedResources>
 -</projectDescription>
 diff --git a/testhal/STM32L1xx/SPI/Makefile b/testhal/STM32L1xx/SPI/Makefile deleted file mode 100644 index ad1bb67f8..000000000 --- a/testhal/STM32L1xx/SPI/Makefile +++ /dev/null @@ -1,198 +0,0 @@ -##############################################################################
 -# Build global options
 -# NOTE: Can be overridden externally.
 -#
 -
 -# Compiler options here.
 -ifeq ($(USE_OPT),)
 -  USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
 -endif
 -
 -# C specific options here (added to USE_OPT).
 -ifeq ($(USE_COPT),)
 -  USE_COPT = 
 -endif
 -
 -# C++ specific options here (added to USE_OPT).
 -ifeq ($(USE_CPPOPT),)
 -  USE_CPPOPT = -fno-rtti
 -endif
 -
 -# Enable this if you want the linker to remove unused code and data
 -ifeq ($(USE_LINK_GC),)
 -  USE_LINK_GC = yes
 -endif
 -
 -# Linker extra options here.
 -ifeq ($(USE_LDOPT),)
 -  USE_LDOPT = 
 -endif
 -
 -# Enable this if you want link time optimizations (LTO)
 -ifeq ($(USE_LTO),)
 -  USE_LTO = yes
 -endif
 -
 -# If enabled, this option allows to compile the application in THUMB mode.
 -ifeq ($(USE_THUMB),)
 -  USE_THUMB = yes
 -endif
 -
 -# Enable this if you want to see the full log while compiling.
 -ifeq ($(USE_VERBOSE_COMPILE),)
 -  USE_VERBOSE_COMPILE = no
 -endif
 -
 -#
 -# Build global options
 -##############################################################################
 -
 -##############################################################################
 -# Architecture or project specific options
 -#
 -
 -# Stack size to be allocated to the Cortex-M process stack. This stack is
 -# the stack used by the main() thread.
 -ifeq ($(USE_PROCESS_STACKSIZE),)
 -  USE_PROCESS_STACKSIZE = 0x400
 -endif
 -
 -# Stack size to the allocated to the Cortex-M main/exceptions stack. This
 -# stack is used for processing interrupts and exceptions.
 -ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
 -  USE_EXCEPTIONS_STACKSIZE = 0x400
 -endif
 -
 -#
 -# Architecture or project specific options
 -##############################################################################
 -
 -##############################################################################
 -# Project, sources and paths
 -#
 -
 -# Define project name here
 -PROJECT = ch
 -
 -# Imported source files and paths
 -CHIBIOS = ../../..
 -include $(CHIBIOS)/os/hal/hal.mk
 -include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
 -include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
 -include $(CHIBIOS)/os/hal/osal/rt/osal.mk
 -include $(CHIBIOS)/os/rt/rt.mk
 -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk
 -#include $(CHIBIOS)/test/rt/test.mk
 -
 -# Define linker script file here
 -LDSCRIPT= $(PORTLD)/STM32L152xB.ld
 -
 -# C sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CSRC = $(PORTSRC) \
 -       $(KERNSRC) \
 -       $(TESTSRC) \
 -       $(HALSRC) \
 -       $(OSALSRC) \
 -       $(PLATFORMSRC) \
 -       $(BOARDSRC) \
 -       main.c
 -
 -# C++ sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CPPSRC =
 -
 -# C sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACSRC =
 -
 -# C++ sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACPPSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCPPSRC =
 -
 -# List ASM source files here
 -ASMSRC = $(PORTASM)
 -
 -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
 -         $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
 -         $(CHIBIOS)/os/various
 -
 -#
 -# Project, sources and paths
 -##############################################################################
 -
 -##############################################################################
 -# Compiler settings
 -#
 -
 -MCU  = cortex-m3
 -
 -#TRGT = arm-elf-
 -TRGT = arm-none-eabi-
 -CC   = $(TRGT)gcc
 -CPPC = $(TRGT)g++
 -# Enable loading with g++ only if you need C++ runtime support.
 -# NOTE: You can use C++ even without C++ support if you are careful. C++
 -#       runtime support makes code size explode.
 -LD   = $(TRGT)gcc
 -#LD   = $(TRGT)g++
 -CP   = $(TRGT)objcopy
 -AS   = $(TRGT)gcc -x assembler-with-cpp
 -OD   = $(TRGT)objdump
 -SZ   = $(TRGT)size
 -HEX  = $(CP) -O ihex
 -BIN  = $(CP) -O binary
 -
 -# ARM-specific options here
 -AOPT =
 -
 -# THUMB-specific options here
 -TOPT = -mthumb -DTHUMB
 -
 -# Define C warning options here
 -CWARN = -Wall -Wextra -Wstrict-prototypes
 -
 -# Define C++ warning options here
 -CPPWARN = -Wall -Wextra
 -
 -#
 -# Compiler settings
 -##############################################################################
 -
 -##############################################################################
 -# Start of user section
 -#
 -
 -# List all user C define here, like -D_DEBUG=1
 -UDEFS =
 -
 -# Define ASM defines here
 -UADEFS =
 -
 -# List all user directories here
 -UINCDIR =
 -
 -# List the user directory to look for the libraries here
 -ULIBDIR =
 -
 -# List all user libraries here
 -ULIBS =
 -
 -#
 -# End of user defines
 -##############################################################################
 -
 -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
 -include $(RULESPATH)/rules.mk
 diff --git a/testhal/STM32L1xx/SPI/chconf.h b/testhal/STM32L1xx/SPI/chconf.h deleted file mode 100644 index 68af751f1..000000000 --- a/testhal/STM32L1xx/SPI/chconf.h +++ /dev/null @@ -1,498 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/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.
 - *
 - * @addtogroup config
 - * @details Kernel related settings and hooks.
 - * @{
 - */
 -
 -#ifndef _CHCONF_H_
 -#define _CHCONF_H_
 -
 -/*===========================================================================*/
 -/**
 - * @name System timers settings
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   System time counter resolution.
 - * @note    Allowed values are 16 or 32 bits.
 - */
 -#define CH_CFG_ST_RESOLUTION                16
 -
 -/**
 - * @brief   System tick frequency.
 - * @details Frequency of the system timer that drives the system ticks. This
 - *          setting also defines the system tick time unit.
 - */
 -#define CH_CFG_ST_FREQUENCY                 1000
 -
 -/**
 - * @brief   Time delta constant for the tick-less mode.
 - * @note    If this value is zero then the system uses the classic
 - *          periodic tick. This value represents the minimum number
 - *          of ticks that is safe to specify in a timeout directive.
 - *          The value one is not valid, timeouts are rounded up to
 - *          this value.
 - */
 -#define CH_CFG_ST_TIMEDELTA                 2
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel parameters and options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Round robin interval.
 - * @details This constant is the number of system ticks allowed for the
 - *          threads before preemption occurs. Setting this value to zero
 - *          disables the preemption for threads with equal priority and the
 - *          round robin becomes cooperative. Note that higher priority
 - *          threads can still preempt, the kernel is always preemptive.
 - * @note    Disabling the round robin preemption makes the kernel more compact
 - *          and generally faster.
 - * @note    The round robin preemption is not supported in tickless mode and
 - *          must be set to zero in that case.
 - */
 -#define CH_CFG_TIME_QUANTUM                 0
 -
 -/**
 - * @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
 -
 -/**
 - * @brief   Idle thread automatic spawn suppression.
 - * @details When this option is activated the function @p chSysInit()
 - *          does not spawn the idle thread. The application @p main()
 - *          function becomes the idle thread and must implement an
 - *          infinite loop. */
 -#define CH_CFG_NO_IDLE_THREAD               FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Performance options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   OS optimization.
 - * @details If enabled then time efficient rather than space efficient code
 - *          is used when two possible implementations exist.
 - *
 - * @note    This is not related to the compiler optimization options.
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_OPTIMIZE_SPEED               TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Subsystem options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Time Measurement APIs.
 - * @details If enabled then the time measurement APIs are included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_TM                       TRUE
 -
 -/**
 - * @brief   Threads registry APIs.
 - * @details If enabled then the registry APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_REGISTRY                 TRUE
 -
 -/**
 - * @brief   Threads synchronization APIs.
 - * @details If enabled then the @p chThdWait() function is included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_WAITEXIT                 TRUE
 -
 -/**
 - * @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   Semaphores queuing mode.
 - * @details If enabled then the threads are enqueued on semaphores by
 - *          priority rather than in FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_SEMAPHORES.
 - */
 -#define CH_CFG_USE_SEMAPHORES_PRIORITY      FALSE
 -
 -/**
 - * @brief   Mutexes APIs.
 - * @details If enabled then the mutexes APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MUTEXES                  TRUE
 -
 -/**
 - * @brief   Enables recursive behavior on mutexes.
 - * @note    Recursive mutexes are heavier and have an increased
 - *          memory footprint.
 - *
 - * @note    The default is @p FALSE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_MUTEXES_RECURSIVE        FALSE
 -
 -/**
 - * @brief   Conditional Variables APIs.
 - * @details If enabled then the conditional variables APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_CONDVARS                 TRUE
 -
 -/**
 - * @brief   Conditional Variables APIs with timeout.
 - * @details If enabled then the conditional variables APIs with timeout
 - *          specification are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_CONDVARS.
 - */
 -#define CH_CFG_USE_CONDVARS_TIMEOUT         TRUE
 -
 -/**
 - * @brief   Events Flags APIs.
 - * @details If enabled then the event flags APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_EVENTS                   TRUE
 -
 -/**
 - * @brief   Events Flags APIs with timeout.
 - * @details If enabled then the events APIs with timeout specification
 - *          are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_EVENTS.
 - */
 -#define CH_CFG_USE_EVENTS_TIMEOUT           TRUE
 -
 -/**
 - * @brief   Synchronous Messages APIs.
 - * @details If enabled then the synchronous messages APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MESSAGES                 TRUE
 -
 -/**
 - * @brief   Synchronous Messages queuing mode.
 - * @details If enabled then messages are served by priority rather than in
 - *          FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_MESSAGES.
 - */
 -#define CH_CFG_USE_MESSAGES_PRIORITY        FALSE
 -
 -/**
 - * @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   I/O Queues APIs.
 - * @details If enabled then the I/O queues APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_QUEUES                   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.
 - * @note    Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
 - *          @p CH_CFG_USE_SEMAPHORES.
 - * @note    Mutexes are recommended.
 - */
 -#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   Dynamic Threads APIs.
 - * @details If enabled then the dynamic threads creation APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_WAITEXIT.
 - * @note    Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
 - */
 -#define CH_CFG_USE_DYNAMIC                  TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Debug options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Debug option, kernel statistics.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_STATISTICS                   TRUE
 -
 -/**
 - * @brief   Debug option, system state check.
 - * @details If enabled the correct call protocol for system APIs is checked
 - *          at runtime.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_SYSTEM_STATE_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, parameters checks.
 - * @details If enabled then the checks on the API functions input
 - *          parameters are activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_CHECKS                TRUE
 -
 -/**
 - * @brief   Debug option, consistency checks.
 - * @details If enabled then all the assertions in the kernel code are
 - *          activated. This includes consistency checks inside the kernel,
 - *          runtime anomalies and port-defined checks.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_ASSERTS               TRUE
 -
 -/**
 - * @brief   Debug option, trace buffer.
 - * @details If enabled then the context switch circular trace buffer is
 - *          activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_TRACE                 TRUE
 -
 -/**
 - * @brief   Debug option, stack checks.
 - * @details If enabled then a runtime stack check is performed.
 - *
 - * @note    The default is @p FALSE.
 - * @note    The stack check is performed in a architecture/port dependent way.
 - *          It may not be implemented or some ports.
 - * @note    The default failure mode is to halt the system with the global
 - *          @p panic_msg variable set to @p NULL.
 - */
 -#define CH_DBG_ENABLE_STACK_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, stacks initialization.
 - * @details If enabled then the threads working area is filled with a byte
 - *          value when a thread is created. This can be useful for the
 - *          runtime measurement of the used stack.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_FILL_THREADS                 TRUE
 -
 -/**
 - * @brief   Debug option, threads profiling.
 - * @details If enabled then a field is added to the @p thread_t structure that
 - *          counts the system ticks occurred while executing the thread.
 - *
 - * @note    The default is @p FALSE.
 - * @note    This debug option is not currently compatible with the
 - *          tickless mode.
 - */
 -#define CH_DBG_THREADS_PROFILING            FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel hooks
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Threads descriptor structure extension.
 - * @details User fields added to the end of the @p thread_t structure.
 - */
 -#define CH_CFG_THREAD_EXTRA_FIELDS                                          \
 -  /* Add threads custom fields here.*/
 -
 -/**
 - * @brief   Threads initialization hook.
 - * @details User initialization code added to the @p chThdInit() API.
 - *
 - * @note    It is invoked from within @p chThdInit() and implicitly from all
 - *          the threads creation APIs.
 - */
 -#define CH_CFG_THREAD_INIT_HOOK(tp) {                                       \
 -  /* Add threads initialization code here.*/                                \
 -}
 -
 -/**
 - * @brief   Threads finalization hook.
 - * @details User finalization code added to the @p chThdExit() API.
 - *
 - * @note    It is inserted into lock zone.
 - * @note    It is also invoked when the threads simply return in order to
 - *          terminate.
 - */
 -#define CH_CFG_THREAD_EXIT_HOOK(tp) {                                       \
 -  /* Add threads finalization code here.*/                                  \
 -}
 -
 -/**
 - * @brief   Context switch hook.
 - * @details This hook is invoked just before switching between threads.
 - */
 -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) {                              \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/**
 - * @brief   Idle thread enter hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to activate a power saving mode.
 - */
 -#define CH_CFG_IDLE_ENTER_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle thread leave hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to deactivate a power saving mode.
 - */
 -#define CH_CFG_IDLE_LEAVE_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle Loop hook.
 - * @details This hook is continuously invoked by the idle thread loop.
 - */
 -#define CH_CFG_IDLE_LOOP_HOOK() {                                           \
 -  /* Idle loop code here.*/                                                 \
 -}
 -
 -/**
 - * @brief   System tick event hook.
 - * @details This hook is invoked in the system tick handler immediately
 - *          after processing the virtual timers queue.
 - */
 -#define CH_CFG_SYSTEM_TICK_HOOK() {                                         \
 -  /* System tick event code here.*/                                         \
 -}
 -
 -/**
 - * @brief   System halt hook.
 - * @details This hook is invoked in case to a system halting error before
 - *          the system is halted.
 - */
 -#define CH_CFG_SYSTEM_HALT_HOOK(reason) {                                   \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/* Port-specific settings (override port settings defaulted in chcore.h).    */
 -/*===========================================================================*/
 -
 -#endif  /* _CHCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/SPI/halconf.h b/testhal/STM32L1xx/SPI/halconf.h deleted file mode 100644 index 6549d25d6..000000000 --- a/testhal/STM32L1xx/SPI/halconf.h +++ /dev/null @@ -1,319 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/halconf.h
 - * @brief   HAL configuration header.
 - * @details HAL configuration file, this file allows to enable or disable the
 - *          various device drivers from your application. You may also use
 - *          this file in order to override the device drivers default settings.
 - *
 - * @addtogroup HAL_CONF
 - * @{
 - */
 -
 -#ifndef _HALCONF_H_
 -#define _HALCONF_H_
 -
 -#include "mcuconf.h"
 -
 -/**
 - * @brief   Enables the TM subsystem.
 - */
 -#if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
 -#define HAL_USE_TM                  TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the PAL subsystem.
 - */
 -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
 -#define HAL_USE_PAL                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the ADC subsystem.
 - */
 -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
 -#define HAL_USE_ADC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the CAN subsystem.
 - */
 -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
 -#define HAL_USE_CAN                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the EXT subsystem.
 - */
 -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
 -#define HAL_USE_EXT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the GPT subsystem.
 - */
 -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
 -#define HAL_USE_GPT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2C subsystem.
 - */
 -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
 -#define HAL_USE_I2C                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2S subsystem.
 - */
 -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
 -#define HAL_USE_I2S                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the ICU subsystem.
 - */
 -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
 -#define HAL_USE_ICU                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MAC subsystem.
 - */
 -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
 -#define HAL_USE_MAC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MMC_SPI subsystem.
 - */
 -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_MMC_SPI             FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the PWM subsystem.
 - */
 -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
 -#define HAL_USE_PWM                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the RTC subsystem.
 - */
 -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
 -#define HAL_USE_RTC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SDC subsystem.
 - */
 -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
 -#define HAL_USE_SDC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL              FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL over USB subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL_USB          FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SPI subsystem.
 - */
 -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_SPI                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the UART subsystem.
 - */
 -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
 -#define HAL_USE_UART                FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the USB subsystem.
 - */
 -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_USB                 FALSE
 -#endif
 -
 -/*===========================================================================*/
 -/* ADC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
 -#define ADC_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define ADC_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* CAN driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Sleep mode related APIs inclusion switch.
 - */
 -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
 -#define CAN_USE_SLEEP_MODE          TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* I2C driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables the mutual exclusion APIs on the I2C bus.
 - */
 -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define I2C_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MAC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
 -#define MAC_USE_ZERO_COPY           FALSE
 -#endif
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
 -#define MAC_USE_EVENTS              TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MMC_SPI driver related settings.                                          */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - *          This option is recommended also if the SPI driver does not
 - *          use a DMA channel and heavily loads the CPU.
 - */
 -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define MMC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SDC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Number of initialization attempts before rejecting the card.
 - * @note    Attempts are performed at 10mS intervals.
 - */
 -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
 -#define SDC_INIT_RETRY              100
 -#endif
 -
 -/**
 - * @brief   Include support for MMC cards.
 - * @note    MMC support is not yet implemented so this option must be kept
 - *          at @p FALSE.
 - */
 -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
 -#define SDC_MMC_SUPPORT             FALSE
 -#endif
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - */
 -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define SDC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SERIAL driver related settings.                                           */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Default bit rate.
 - * @details Configuration parameter, this is the baud rate selected for the
 - *          default configuration.
 - */
 -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
 -#define SERIAL_DEFAULT_BITRATE      38400
 -#endif
 -
 -/**
 - * @brief   Serial buffers size.
 - * @details Configuration parameter, you can change the depth of the queue
 - *          buffers depending on the requirements of your application.
 - * @note    The default is 64 bytes for both the transmission and receive
 - *          buffers.
 - */
 -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
 -#define SERIAL_BUFFERS_SIZE         16
 -#endif
 -
 -/*===========================================================================*/
 -/* SPI driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
 -#define SPI_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define SPI_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -#endif /* _HALCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/SPI/main.c b/testhal/STM32L1xx/SPI/main.c deleted file mode 100644 index 4931106fd..000000000 --- a/testhal/STM32L1xx/SPI/main.c +++ /dev/null @@ -1,139 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -#include "ch.h"
 -#include "hal.h"
 -
 -/*
 - * Maximum speed SPI configuration (16MHz, CPHA=0, CPOL=0, MSb first).
 - */
 -static const SPIConfig hs_spicfg = {
 -  NULL,
 -  GPIOB,
 -  12,
 -  0
 -};
 -
 -/*
 - * Low speed SPI configuration (256kHz, CPHA=0, CPOL=0, MSb first).
 - */
 -static const SPIConfig ls_spicfg = {
 -  NULL,
 -  GPIOB,
 -  12,
 -  SPI_CR1_BR_2 | SPI_CR1_BR_1
 -};
 -
 -/*
 - * SPI TX and RX buffers.
 - */
 -static uint8_t txbuf[512];
 -static uint8_t rxbuf[512];
 -
 -/*
 - * SPI bus contender 1.
 - */
 -static THD_WORKING_AREA(spi_thread_1_wa, 256);
 -static THD_FUNCTION(spi_thread_1, p) {
 -
 -  (void)p;
 -
 -  chRegSetThreadName("SPI thread 1");
 -  while (TRUE) {
 -    spiAcquireBus(&SPID2);              /* Acquire ownership of the bus.    */
 -    palSetPad(GPIOB, GPIOB_LED4);       /* LED ON.                          */
 -    spiStart(&SPID2, &hs_spicfg);       /* Setup transfer parameters.       */
 -    spiSelect(&SPID2);                  /* Slave Select assertion.          */
 -    spiExchange(&SPID2, 512,
 -                txbuf, rxbuf);          /* Atomic transfer operations.      */
 -    spiUnselect(&SPID2);                /* Slave Select de-assertion.       */
 -    spiReleaseBus(&SPID2);              /* Ownership release.               */
 -  }
 -  return 0;
 -}
 -
 -/*
 - * SPI bus contender 2.
 - */
 -static THD_WORKING_AREA(spi_thread_2_wa, 256);
 -static THD_FUNCTION(spi_thread_2, p) {
 -
 -  (void)p;
 -
 -  chRegSetThreadName("SPI thread 2");
 -  while (TRUE) {
 -    spiAcquireBus(&SPID2);              /* Acquire ownership of the bus.    */
 -    palClearPad(GPIOB, GPIOB_LED4);     /* LED OFF.                         */
 -    spiStart(&SPID2, &ls_spicfg);       /* Setup transfer parameters.       */
 -    spiSelect(&SPID2);                  /* Slave Select assertion.          */
 -    spiExchange(&SPID2, 512,
 -                txbuf, rxbuf);          /* Atomic transfer operations.      */
 -    spiUnselect(&SPID2);                /* Slave Select de-assertion.       */
 -    spiReleaseBus(&SPID2);              /* Ownership release.               */
 -  }
 -  return 0;
 -}
 -
 -/*
 - * Application entry point.
 - */
 -int main(void) {
 -  unsigned i;
 -
 -  /*
 -   * System initializations.
 -   * - HAL initialization, this also initializes the configured device drivers
 -   *   and performs the board-specific initializations.
 -   * - Kernel initialization, the main() function becomes a thread and the
 -   *   RTOS is active.
 -   */
 -  halInit();
 -  chSysInit();
 -
 -  /*
 -   * SPI1 I/O pins setup.
 -   */
 -  palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL |
 -                           PAL_STM32_OSPEED_HIGHEST);           /* NSS.     */
 -  palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) |
 -                           PAL_STM32_OSPEED_HIGHEST);           /* SCK.     */
 -  palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5));              /* MISO.    */
 -  palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) |
 -                           PAL_STM32_OSPEED_HIGHEST);           /* MOSI.    */
 -  palSetPad(GPIOB, 12);
 -
 -  /*
 -   * Prepare transmit pattern.
 -   */
 -  for (i = 0; i < sizeof(txbuf); i++)
 -    txbuf[i] = (uint8_t)i;
 -
 -  /*
 -   * Starting the transmitter and receiver threads.
 -   */
 -  chThdCreateStatic(spi_thread_1_wa, sizeof(spi_thread_1_wa),
 -                    NORMALPRIO + 1, spi_thread_1, NULL);
 -  chThdCreateStatic(spi_thread_2_wa, sizeof(spi_thread_2_wa),
 -                    NORMALPRIO + 1, spi_thread_2, NULL);
 -
 -  /*
 -   * Normal main() thread activity, in this demo it does nothing.
 -   */
 -  while (TRUE) {
 -    chThdSleepMilliseconds(500);
 -  }
 -  return 0;
 -}
 diff --git a/testhal/STM32L1xx/SPI/mcuconf.h b/testhal/STM32L1xx/SPI/mcuconf.h deleted file mode 100644 index f91b311e4..000000000 --- a/testhal/STM32L1xx/SPI/mcuconf.h +++ /dev/null @@ -1,177 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/*
 - * STM32L1xx drivers configuration.
 - * The following settings override the default settings present in
 - * the various device driver implementation headers.
 - * Note that the settings for each driver only have effect if the whole
 - * driver is enabled in halconf.h.
 - *
 - * IRQ priorities:
 - * 15...0       Lowest...Highest.
 - *
 - * DMA priorities:
 - * 0...3        Lowest...Highest.
 - */
 -
 -#define STM32L1xx_MCUCONF
 -
 -/*
 - * HAL driver system settings.
 - */
 -#define STM32_NO_INIT                       FALSE
 -#define STM32_HSI_ENABLED                   TRUE
 -#define STM32_LSI_ENABLED                   TRUE
 -#define STM32_HSE_ENABLED                   FALSE
 -#define STM32_LSE_ENABLED                   TRUE
 -#define STM32_ADC_CLOCK_ENABLED             TRUE
 -#define STM32_USB_CLOCK_ENABLED             TRUE
 -#define STM32_MSIRANGE                      STM32_MSIRANGE_2M
 -#define STM32_SW                            STM32_SW_PLL
 -#define STM32_PLLSRC                        STM32_PLLSRC_HSI
 -#define STM32_PLLMUL_VALUE                  6
 -#define STM32_PLLDIV_VALUE                  3
 -#define STM32_HPRE                          STM32_HPRE_DIV1
 -#define STM32_PPRE1                         STM32_PPRE1_DIV1
 -#define STM32_PPRE2                         STM32_PPRE2_DIV1
 -#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
 -#define STM32_MCOPRE                        STM32_MCOPRE_DIV1
 -#define STM32_RTCSEL                        STM32_RTCSEL_LSE
 -#define STM32_RTCPRE                        STM32_RTCPRE_DIV2
 -#define STM32_VOS                           STM32_VOS_1P8
 -#define STM32_PVD_ENABLE                    FALSE
 -#define STM32_PLS                           STM32_PLS_LEV0
 -
 -/*
 - * ADC driver system settings.
 - */
 -#define STM32_ADC_USE_ADC1                  FALSE
 -#define STM32_ADC_ADC1_DMA_PRIORITY         2
 -#define STM32_ADC_IRQ_PRIORITY              6
 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY     6
 -
 -/*
 - * EXT driver system settings.
 - */
 -#define STM32_EXT_EXTI0_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI1_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI2_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI3_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI4_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY      6
 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY    6
 -#define STM32_EXT_EXTI16_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI17_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI18_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI19_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI20_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI21_22_IRQ_PRIORITY    6
 -
 -/*
 - * GPT driver system settings.
 - */
 -#define STM32_GPT_USE_TIM2                  FALSE
 -#define STM32_GPT_USE_TIM3                  FALSE
 -#define STM32_GPT_USE_TIM4                  FALSE
 -#define STM32_GPT_TIM2_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM3_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM4_IRQ_PRIORITY         7
 -
 -/*
 - * I2C driver system settings.
 - */
 -#define STM32_I2C_USE_I2C1                  FALSE
 -#define STM32_I2C_USE_I2C2                  FALSE
 -#define STM32_I2C_BUSY_TIMEOUT              50
 -#define STM32_I2C_I2C1_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C2_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C1_DMA_PRIORITY         3
 -#define STM32_I2C_I2C2_DMA_PRIORITY         3
 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
 -
 -/*
 - * ICU driver system settings.
 - */
 -#define STM32_ICU_USE_TIM2                  FALSE
 -#define STM32_ICU_USE_TIM3                  FALSE
 -#define STM32_ICU_USE_TIM4                  FALSE
 -#define STM32_ICU_USE_TIM9                  FALSE
 -#define STM32_ICU_TIM2_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM3_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM4_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * PWM driver system settings.
 - */
 -#define STM32_PWM_USE_TIM2                  FALSE
 -#define STM32_PWM_USE_TIM3                  FALSE
 -#define STM32_PWM_USE_TIM4                  FALSE
 -#define STM32_PWM_USE_TIM9                  FALSE
 -#define STM32_PWM_TIM2_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM3_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM4_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * SERIAL driver system settings.
 - */
 -#define STM32_SERIAL_USE_USART1             FALSE
 -#define STM32_SERIAL_USE_USART2             FALSE
 -#define STM32_SERIAL_USE_USART3             FALSE
 -#define STM32_SERIAL_USART1_PRIORITY        12
 -#define STM32_SERIAL_USART2_PRIORITY        12
 -#define STM32_SERIAL_USART3_PRIORITY        12
 -
 -/*
 - * SPI driver system settings.
 - */
 -#define STM32_SPI_USE_SPI1                  TRUE
 -#define STM32_SPI_USE_SPI2                  TRUE
 -#define STM32_SPI_SPI1_DMA_PRIORITY         1
 -#define STM32_SPI_SPI2_DMA_PRIORITY         1
 -#define STM32_SPI_SPI1_IRQ_PRIORITY         10
 -#define STM32_SPI_SPI2_IRQ_PRIORITY         10
 -#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
 -
 -/*
 - * ST driver system settings.
 - */
 -#define STM32_ST_IRQ_PRIORITY               8
 -#define STM32_ST_USE_TIMER                  2
 -
 -/*
 - * UART driver system settings.
 - */
 -#define STM32_UART_USE_USART1               FALSE
 -#define STM32_UART_USE_USART2               FALSE
 -#define STM32_UART_USE_USART3               FALSE
 -#define STM32_UART_USART1_IRQ_PRIORITY      12
 -#define STM32_UART_USART2_IRQ_PRIORITY      12
 -#define STM32_UART_USART3_IRQ_PRIORITY      12
 -#define STM32_UART_USART1_DMA_PRIORITY      0
 -#define STM32_UART_USART2_DMA_PRIORITY      0
 -#define STM32_UART_USART3_DMA_PRIORITY      0
 -#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
 -
 -/*
 - * USB driver system settings.
 - */
 -#define STM32_USB_USE_USB1                  FALSE
 -#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
 -#define STM32_USB_USB1_HP_IRQ_PRIORITY      13
 -#define STM32_USB_USB1_LP_IRQ_PRIORITY      14
 diff --git a/testhal/STM32L1xx/SPI/readme.txt b/testhal/STM32L1xx/SPI/readme.txt deleted file mode 100644 index 2ce870851..000000000 --- a/testhal/STM32L1xx/SPI/readme.txt +++ /dev/null @@ -1,31 +0,0 @@ -*****************************************************************************
 -** ChibiOS/RT HAL - SPI driver demo for STM32L1xx.                         **
 -*****************************************************************************
 -
 -** TARGET **
 -
 -The demo runs on an STMicroelectronics STM32L-Discovery board.
 -
 -** The Demo **
 -
 -The application demonstrates the use of the STM32L1xx SPI driver.
 -
 -** Board Setup **
 -
 -- Remove the LCD module.
 -- Connect PB14 and PB15 together for SPI loop-back.
 -
 -** Build Procedure **
 -
 -The demo has been tested using the free Codesourcery GCC-based toolchain
 -and YAGARTO.
 -Just modify the TRGT line in the makefile in order to use different GCC ports.
 -
 -** Notes **
 -
 -Some files used by the demo are not part of ChibiOS/RT but are copyright of
 -ST Microelectronics and are licensed under a different license.
 -Also note that not all the files present in the ST library are distributed
 -with ChibiOS/RT, you can find the whole library on the ST web site:
 -
 -                             http://www.st.com
 diff --git a/testhal/STM32L1xx/UART/.cproject b/testhal/STM32L1xx/UART/.cproject deleted file mode 100644 index dc7b9ec94..000000000 --- a/testhal/STM32L1xx/UART/.cproject +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 -<?fileVersion 4.0.0?>
 -
 -<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
 -	<storageModule moduleId="org.eclipse.cdt.core.settings">
 -		<cconfiguration id="0.1026663977">
 -			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1026663977" moduleId="org.eclipse.cdt.core.settings" name="Default">
 -				<externalSettings/>
 -				<extensions>
 -					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
 -				</extensions>
 -			</storageModule>
 -			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -				<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1026663977" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
 -					<folderInfo id="0.1026663977." name="/" resourcePath="">
 -						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1637093315" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
 -							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1637093315.1937313473" name=""/>
 -							<builder id="org.eclipse.cdt.build.core.settings.default.builder.951794331" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.952936432" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.117713908" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.487313028" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.948324646" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.149098313" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -							<tool id="org.eclipse.cdt.build.core.settings.holder.1900728558" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
 -								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.639846544" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
 -							</tool>
 -						</toolChain>
 -					</folderInfo>
 -				</configuration>
 -			</storageModule>
 -			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
 -		</cconfiguration>
 -	</storageModule>
 -	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 -		<project id="STM32L1xx-UART.null.894515477" name="STM32L1xx-UART"/>
 -	</storageModule>
 -	<storageModule moduleId="scannerConfiguration">
 -		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
 -		<scannerConfigBuildInfo instanceId="0.1026663977">
 -			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
 -		</scannerConfigBuildInfo>
 -	</storageModule>
 -	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
 -</cproject>
 diff --git a/testhal/STM32L1xx/UART/.project b/testhal/STM32L1xx/UART/.project deleted file mode 100644 index ef391b72f..000000000 --- a/testhal/STM32L1xx/UART/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
 -<projectDescription>
 -	<name>STM32L1xx-UART</name>
 -	<comment></comment>
 -	<projects>
 -	</projects>
 -	<buildSpec>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
 -			<triggers>clean,full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -		<buildCommand>
 -			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
 -			<triggers>full,incremental,</triggers>
 -			<arguments>
 -			</arguments>
 -		</buildCommand>
 -	</buildSpec>
 -	<natures>
 -		<nature>org.eclipse.cdt.core.cnature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
 -		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
 -	</natures>
 -	<linkedResources>
 -		<link>
 -			<name>os</name>
 -			<type>2</type>
 -			<locationURI>CHIBIOS/os</locationURI>
 -		</link>
 -	</linkedResources>
 -</projectDescription>
 diff --git a/testhal/STM32L1xx/UART/Makefile b/testhal/STM32L1xx/UART/Makefile deleted file mode 100644 index ad1bb67f8..000000000 --- a/testhal/STM32L1xx/UART/Makefile +++ /dev/null @@ -1,198 +0,0 @@ -##############################################################################
 -# Build global options
 -# NOTE: Can be overridden externally.
 -#
 -
 -# Compiler options here.
 -ifeq ($(USE_OPT),)
 -  USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
 -endif
 -
 -# C specific options here (added to USE_OPT).
 -ifeq ($(USE_COPT),)
 -  USE_COPT = 
 -endif
 -
 -# C++ specific options here (added to USE_OPT).
 -ifeq ($(USE_CPPOPT),)
 -  USE_CPPOPT = -fno-rtti
 -endif
 -
 -# Enable this if you want the linker to remove unused code and data
 -ifeq ($(USE_LINK_GC),)
 -  USE_LINK_GC = yes
 -endif
 -
 -# Linker extra options here.
 -ifeq ($(USE_LDOPT),)
 -  USE_LDOPT = 
 -endif
 -
 -# Enable this if you want link time optimizations (LTO)
 -ifeq ($(USE_LTO),)
 -  USE_LTO = yes
 -endif
 -
 -# If enabled, this option allows to compile the application in THUMB mode.
 -ifeq ($(USE_THUMB),)
 -  USE_THUMB = yes
 -endif
 -
 -# Enable this if you want to see the full log while compiling.
 -ifeq ($(USE_VERBOSE_COMPILE),)
 -  USE_VERBOSE_COMPILE = no
 -endif
 -
 -#
 -# Build global options
 -##############################################################################
 -
 -##############################################################################
 -# Architecture or project specific options
 -#
 -
 -# Stack size to be allocated to the Cortex-M process stack. This stack is
 -# the stack used by the main() thread.
 -ifeq ($(USE_PROCESS_STACKSIZE),)
 -  USE_PROCESS_STACKSIZE = 0x400
 -endif
 -
 -# Stack size to the allocated to the Cortex-M main/exceptions stack. This
 -# stack is used for processing interrupts and exceptions.
 -ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
 -  USE_EXCEPTIONS_STACKSIZE = 0x400
 -endif
 -
 -#
 -# Architecture or project specific options
 -##############################################################################
 -
 -##############################################################################
 -# Project, sources and paths
 -#
 -
 -# Define project name here
 -PROJECT = ch
 -
 -# Imported source files and paths
 -CHIBIOS = ../../..
 -include $(CHIBIOS)/os/hal/hal.mk
 -include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
 -include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
 -include $(CHIBIOS)/os/hal/osal/rt/osal.mk
 -include $(CHIBIOS)/os/rt/rt.mk
 -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk
 -#include $(CHIBIOS)/test/rt/test.mk
 -
 -# Define linker script file here
 -LDSCRIPT= $(PORTLD)/STM32L152xB.ld
 -
 -# C sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CSRC = $(PORTSRC) \
 -       $(KERNSRC) \
 -       $(TESTSRC) \
 -       $(HALSRC) \
 -       $(OSALSRC) \
 -       $(PLATFORMSRC) \
 -       $(BOARDSRC) \
 -       main.c
 -
 -# C++ sources that can be compiled in ARM or THUMB mode depending on the global
 -# setting.
 -CPPSRC =
 -
 -# C sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACSRC =
 -
 -# C++ sources to be compiled in ARM mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -ACPPSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCSRC =
 -
 -# C sources to be compiled in THUMB mode regardless of the global setting.
 -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
 -#       option that results in lower performance and larger code size.
 -TCPPSRC =
 -
 -# List ASM source files here
 -ASMSRC = $(PORTASM)
 -
 -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
 -         $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
 -         $(CHIBIOS)/os/various
 -
 -#
 -# Project, sources and paths
 -##############################################################################
 -
 -##############################################################################
 -# Compiler settings
 -#
 -
 -MCU  = cortex-m3
 -
 -#TRGT = arm-elf-
 -TRGT = arm-none-eabi-
 -CC   = $(TRGT)gcc
 -CPPC = $(TRGT)g++
 -# Enable loading with g++ only if you need C++ runtime support.
 -# NOTE: You can use C++ even without C++ support if you are careful. C++
 -#       runtime support makes code size explode.
 -LD   = $(TRGT)gcc
 -#LD   = $(TRGT)g++
 -CP   = $(TRGT)objcopy
 -AS   = $(TRGT)gcc -x assembler-with-cpp
 -OD   = $(TRGT)objdump
 -SZ   = $(TRGT)size
 -HEX  = $(CP) -O ihex
 -BIN  = $(CP) -O binary
 -
 -# ARM-specific options here
 -AOPT =
 -
 -# THUMB-specific options here
 -TOPT = -mthumb -DTHUMB
 -
 -# Define C warning options here
 -CWARN = -Wall -Wextra -Wstrict-prototypes
 -
 -# Define C++ warning options here
 -CPPWARN = -Wall -Wextra
 -
 -#
 -# Compiler settings
 -##############################################################################
 -
 -##############################################################################
 -# Start of user section
 -#
 -
 -# List all user C define here, like -D_DEBUG=1
 -UDEFS =
 -
 -# Define ASM defines here
 -UADEFS =
 -
 -# List all user directories here
 -UINCDIR =
 -
 -# List the user directory to look for the libraries here
 -ULIBDIR =
 -
 -# List all user libraries here
 -ULIBS =
 -
 -#
 -# End of user defines
 -##############################################################################
 -
 -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
 -include $(RULESPATH)/rules.mk
 diff --git a/testhal/STM32L1xx/UART/chconf.h b/testhal/STM32L1xx/UART/chconf.h deleted file mode 100644 index 68af751f1..000000000 --- a/testhal/STM32L1xx/UART/chconf.h +++ /dev/null @@ -1,498 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/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.
 - *
 - * @addtogroup config
 - * @details Kernel related settings and hooks.
 - * @{
 - */
 -
 -#ifndef _CHCONF_H_
 -#define _CHCONF_H_
 -
 -/*===========================================================================*/
 -/**
 - * @name System timers settings
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   System time counter resolution.
 - * @note    Allowed values are 16 or 32 bits.
 - */
 -#define CH_CFG_ST_RESOLUTION                16
 -
 -/**
 - * @brief   System tick frequency.
 - * @details Frequency of the system timer that drives the system ticks. This
 - *          setting also defines the system tick time unit.
 - */
 -#define CH_CFG_ST_FREQUENCY                 1000
 -
 -/**
 - * @brief   Time delta constant for the tick-less mode.
 - * @note    If this value is zero then the system uses the classic
 - *          periodic tick. This value represents the minimum number
 - *          of ticks that is safe to specify in a timeout directive.
 - *          The value one is not valid, timeouts are rounded up to
 - *          this value.
 - */
 -#define CH_CFG_ST_TIMEDELTA                 2
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel parameters and options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Round robin interval.
 - * @details This constant is the number of system ticks allowed for the
 - *          threads before preemption occurs. Setting this value to zero
 - *          disables the preemption for threads with equal priority and the
 - *          round robin becomes cooperative. Note that higher priority
 - *          threads can still preempt, the kernel is always preemptive.
 - * @note    Disabling the round robin preemption makes the kernel more compact
 - *          and generally faster.
 - * @note    The round robin preemption is not supported in tickless mode and
 - *          must be set to zero in that case.
 - */
 -#define CH_CFG_TIME_QUANTUM                 0
 -
 -/**
 - * @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
 -
 -/**
 - * @brief   Idle thread automatic spawn suppression.
 - * @details When this option is activated the function @p chSysInit()
 - *          does not spawn the idle thread. The application @p main()
 - *          function becomes the idle thread and must implement an
 - *          infinite loop. */
 -#define CH_CFG_NO_IDLE_THREAD               FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Performance options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   OS optimization.
 - * @details If enabled then time efficient rather than space efficient code
 - *          is used when two possible implementations exist.
 - *
 - * @note    This is not related to the compiler optimization options.
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_OPTIMIZE_SPEED               TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Subsystem options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Time Measurement APIs.
 - * @details If enabled then the time measurement APIs are included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_TM                       TRUE
 -
 -/**
 - * @brief   Threads registry APIs.
 - * @details If enabled then the registry APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_REGISTRY                 TRUE
 -
 -/**
 - * @brief   Threads synchronization APIs.
 - * @details If enabled then the @p chThdWait() function is included in
 - *          the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_WAITEXIT                 TRUE
 -
 -/**
 - * @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   Semaphores queuing mode.
 - * @details If enabled then the threads are enqueued on semaphores by
 - *          priority rather than in FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_SEMAPHORES.
 - */
 -#define CH_CFG_USE_SEMAPHORES_PRIORITY      FALSE
 -
 -/**
 - * @brief   Mutexes APIs.
 - * @details If enabled then the mutexes APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MUTEXES                  TRUE
 -
 -/**
 - * @brief   Enables recursive behavior on mutexes.
 - * @note    Recursive mutexes are heavier and have an increased
 - *          memory footprint.
 - *
 - * @note    The default is @p FALSE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_MUTEXES_RECURSIVE        FALSE
 -
 -/**
 - * @brief   Conditional Variables APIs.
 - * @details If enabled then the conditional variables APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_MUTEXES.
 - */
 -#define CH_CFG_USE_CONDVARS                 TRUE
 -
 -/**
 - * @brief   Conditional Variables APIs with timeout.
 - * @details If enabled then the conditional variables APIs with timeout
 - *          specification are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_CONDVARS.
 - */
 -#define CH_CFG_USE_CONDVARS_TIMEOUT         TRUE
 -
 -/**
 - * @brief   Events Flags APIs.
 - * @details If enabled then the event flags APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_EVENTS                   TRUE
 -
 -/**
 - * @brief   Events Flags APIs with timeout.
 - * @details If enabled then the events APIs with timeout specification
 - *          are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_EVENTS.
 - */
 -#define CH_CFG_USE_EVENTS_TIMEOUT           TRUE
 -
 -/**
 - * @brief   Synchronous Messages APIs.
 - * @details If enabled then the synchronous messages APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_MESSAGES                 TRUE
 -
 -/**
 - * @brief   Synchronous Messages queuing mode.
 - * @details If enabled then messages are served by priority rather than in
 - *          FIFO order.
 - *
 - * @note    The default is @p FALSE. Enable this if you have special
 - *          requirements.
 - * @note    Requires @p CH_CFG_USE_MESSAGES.
 - */
 -#define CH_CFG_USE_MESSAGES_PRIORITY        FALSE
 -
 -/**
 - * @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   I/O Queues APIs.
 - * @details If enabled then the I/O queues APIs are included in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - */
 -#define CH_CFG_USE_QUEUES                   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.
 - * @note    Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
 - *          @p CH_CFG_USE_SEMAPHORES.
 - * @note    Mutexes are recommended.
 - */
 -#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   Dynamic Threads APIs.
 - * @details If enabled then the dynamic threads creation APIs are included
 - *          in the kernel.
 - *
 - * @note    The default is @p TRUE.
 - * @note    Requires @p CH_CFG_USE_WAITEXIT.
 - * @note    Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
 - */
 -#define CH_CFG_USE_DYNAMIC                  TRUE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Debug options
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Debug option, kernel statistics.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_STATISTICS                   TRUE
 -
 -/**
 - * @brief   Debug option, system state check.
 - * @details If enabled the correct call protocol for system APIs is checked
 - *          at runtime.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_SYSTEM_STATE_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, parameters checks.
 - * @details If enabled then the checks on the API functions input
 - *          parameters are activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_CHECKS                TRUE
 -
 -/**
 - * @brief   Debug option, consistency checks.
 - * @details If enabled then all the assertions in the kernel code are
 - *          activated. This includes consistency checks inside the kernel,
 - *          runtime anomalies and port-defined checks.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_ASSERTS               TRUE
 -
 -/**
 - * @brief   Debug option, trace buffer.
 - * @details If enabled then the context switch circular trace buffer is
 - *          activated.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_ENABLE_TRACE                 TRUE
 -
 -/**
 - * @brief   Debug option, stack checks.
 - * @details If enabled then a runtime stack check is performed.
 - *
 - * @note    The default is @p FALSE.
 - * @note    The stack check is performed in a architecture/port dependent way.
 - *          It may not be implemented or some ports.
 - * @note    The default failure mode is to halt the system with the global
 - *          @p panic_msg variable set to @p NULL.
 - */
 -#define CH_DBG_ENABLE_STACK_CHECK           TRUE
 -
 -/**
 - * @brief   Debug option, stacks initialization.
 - * @details If enabled then the threads working area is filled with a byte
 - *          value when a thread is created. This can be useful for the
 - *          runtime measurement of the used stack.
 - *
 - * @note    The default is @p FALSE.
 - */
 -#define CH_DBG_FILL_THREADS                 TRUE
 -
 -/**
 - * @brief   Debug option, threads profiling.
 - * @details If enabled then a field is added to the @p thread_t structure that
 - *          counts the system ticks occurred while executing the thread.
 - *
 - * @note    The default is @p FALSE.
 - * @note    This debug option is not currently compatible with the
 - *          tickless mode.
 - */
 -#define CH_DBG_THREADS_PROFILING            FALSE
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/**
 - * @name Kernel hooks
 - * @{
 - */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Threads descriptor structure extension.
 - * @details User fields added to the end of the @p thread_t structure.
 - */
 -#define CH_CFG_THREAD_EXTRA_FIELDS                                          \
 -  /* Add threads custom fields here.*/
 -
 -/**
 - * @brief   Threads initialization hook.
 - * @details User initialization code added to the @p chThdInit() API.
 - *
 - * @note    It is invoked from within @p chThdInit() and implicitly from all
 - *          the threads creation APIs.
 - */
 -#define CH_CFG_THREAD_INIT_HOOK(tp) {                                       \
 -  /* Add threads initialization code here.*/                                \
 -}
 -
 -/**
 - * @brief   Threads finalization hook.
 - * @details User finalization code added to the @p chThdExit() API.
 - *
 - * @note    It is inserted into lock zone.
 - * @note    It is also invoked when the threads simply return in order to
 - *          terminate.
 - */
 -#define CH_CFG_THREAD_EXIT_HOOK(tp) {                                       \
 -  /* Add threads finalization code here.*/                                  \
 -}
 -
 -/**
 - * @brief   Context switch hook.
 - * @details This hook is invoked just before switching between threads.
 - */
 -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) {                              \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/**
 - * @brief   Idle thread enter hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to activate a power saving mode.
 - */
 -#define CH_CFG_IDLE_ENTER_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle thread leave hook.
 - * @note    This hook is invoked within a critical zone, no OS functions
 - *          should be invoked from here.
 - * @note    This macro can be used to deactivate a power saving mode.
 - */
 -#define CH_CFG_IDLE_LEAVE_HOOK() {                                         \
 -}
 -
 -/**
 - * @brief   Idle Loop hook.
 - * @details This hook is continuously invoked by the idle thread loop.
 - */
 -#define CH_CFG_IDLE_LOOP_HOOK() {                                           \
 -  /* Idle loop code here.*/                                                 \
 -}
 -
 -/**
 - * @brief   System tick event hook.
 - * @details This hook is invoked in the system tick handler immediately
 - *          after processing the virtual timers queue.
 - */
 -#define CH_CFG_SYSTEM_TICK_HOOK() {                                         \
 -  /* System tick event code here.*/                                         \
 -}
 -
 -/**
 - * @brief   System halt hook.
 - * @details This hook is invoked in case to a system halting error before
 - *          the system is halted.
 - */
 -#define CH_CFG_SYSTEM_HALT_HOOK(reason) {                                   \
 -  /* System halt code here.*/                                               \
 -}
 -
 -/** @} */
 -
 -/*===========================================================================*/
 -/* Port-specific settings (override port settings defaulted in chcore.h).    */
 -/*===========================================================================*/
 -
 -#endif  /* _CHCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/UART/halconf.h b/testhal/STM32L1xx/UART/halconf.h deleted file mode 100644 index 243190f6d..000000000 --- a/testhal/STM32L1xx/UART/halconf.h +++ /dev/null @@ -1,319 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/**
 - * @file    templates/halconf.h
 - * @brief   HAL configuration header.
 - * @details HAL configuration file, this file allows to enable or disable the
 - *          various device drivers from your application. You may also use
 - *          this file in order to override the device drivers default settings.
 - *
 - * @addtogroup HAL_CONF
 - * @{
 - */
 -
 -#ifndef _HALCONF_H_
 -#define _HALCONF_H_
 -
 -#include "mcuconf.h"
 -
 -/**
 - * @brief   Enables the TM subsystem.
 - */
 -#if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
 -#define HAL_USE_TM                  TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the PAL subsystem.
 - */
 -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
 -#define HAL_USE_PAL                 TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the ADC subsystem.
 - */
 -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
 -#define HAL_USE_ADC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the CAN subsystem.
 - */
 -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
 -#define HAL_USE_CAN                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the EXT subsystem.
 - */
 -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
 -#define HAL_USE_EXT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the GPT subsystem.
 - */
 -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
 -#define HAL_USE_GPT                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2C subsystem.
 - */
 -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
 -#define HAL_USE_I2C                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the I2S subsystem.
 - */
 -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
 -#define HAL_USE_I2S                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the ICU subsystem.
 - */
 -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
 -#define HAL_USE_ICU                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MAC subsystem.
 - */
 -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
 -#define HAL_USE_MAC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the MMC_SPI subsystem.
 - */
 -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_MMC_SPI             FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the PWM subsystem.
 - */
 -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
 -#define HAL_USE_PWM                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the RTC subsystem.
 - */
 -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
 -#define HAL_USE_RTC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SDC subsystem.
 - */
 -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
 -#define HAL_USE_SDC                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL              FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SERIAL over USB subsystem.
 - */
 -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_SERIAL_USB          FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the SPI subsystem.
 - */
 -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
 -#define HAL_USE_SPI                 FALSE
 -#endif
 -
 -/**
 - * @brief   Enables the UART subsystem.
 - */
 -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
 -#define HAL_USE_UART                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the USB subsystem.
 - */
 -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
 -#define HAL_USE_USB                 FALSE
 -#endif
 -
 -/*===========================================================================*/
 -/* ADC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
 -#define ADC_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define ADC_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* CAN driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Sleep mode related APIs inclusion switch.
 - */
 -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
 -#define CAN_USE_SLEEP_MODE          TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* I2C driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables the mutual exclusion APIs on the I2C bus.
 - */
 -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define I2C_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MAC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
 -#define MAC_USE_ZERO_COPY           FALSE
 -#endif
 -
 -/**
 - * @brief   Enables an event sources for incoming packets.
 - */
 -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
 -#define MAC_USE_EVENTS              TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* MMC_SPI driver related settings.                                          */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - *          This option is recommended also if the SPI driver does not
 - *          use a DMA channel and heavily loads the CPU.
 - */
 -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define MMC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SDC driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Number of initialization attempts before rejecting the card.
 - * @note    Attempts are performed at 10mS intervals.
 - */
 -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
 -#define SDC_INIT_RETRY              100
 -#endif
 -
 -/**
 - * @brief   Include support for MMC cards.
 - * @note    MMC support is not yet implemented so this option must be kept
 - *          at @p FALSE.
 - */
 -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
 -#define SDC_MMC_SUPPORT             FALSE
 -#endif
 -
 -/**
 - * @brief   Delays insertions.
 - * @details If enabled this options inserts delays into the MMC waiting
 - *          routines releasing some extra CPU time for the threads with
 - *          lower priority, this may slow down the driver a bit however.
 - */
 -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
 -#define SDC_NICE_WAITING            TRUE
 -#endif
 -
 -/*===========================================================================*/
 -/* SERIAL driver related settings.                                           */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Default bit rate.
 - * @details Configuration parameter, this is the baud rate selected for the
 - *          default configuration.
 - */
 -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
 -#define SERIAL_DEFAULT_BITRATE      38400
 -#endif
 -
 -/**
 - * @brief   Serial buffers size.
 - * @details Configuration parameter, you can change the depth of the queue
 - *          buffers depending on the requirements of your application.
 - * @note    The default is 64 bytes for both the transmission and receive
 - *          buffers.
 - */
 -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
 -#define SERIAL_BUFFERS_SIZE         16
 -#endif
 -
 -/*===========================================================================*/
 -/* SPI driver related settings.                                              */
 -/*===========================================================================*/
 -
 -/**
 - * @brief   Enables synchronous APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
 -#define SPI_USE_WAIT                TRUE
 -#endif
 -
 -/**
 - * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
 - * @note    Disabling this option saves both code and data space.
 - */
 -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
 -#define SPI_USE_MUTUAL_EXCLUSION    TRUE
 -#endif
 -
 -#endif /* _HALCONF_H_ */
 -
 -/** @} */
 diff --git a/testhal/STM32L1xx/UART/main.c b/testhal/STM32L1xx/UART/main.c deleted file mode 100644 index f8b19014c..000000000 --- a/testhal/STM32L1xx/UART/main.c +++ /dev/null @@ -1,142 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -#include "ch.h"
 -#include "hal.h"
 -
 -static virtual_timer_t vt1, vt2;
 -
 -static void restart(void *p) {
 -
 -  (void)p;
 -
 -  chSysLockFromISR();
 -  uartStartSendI(&UARTD1, 14, "Hello World!\r\n");
 -  chSysUnlockFromISR();
 -}
 -
 -static void ledoff(void *p) {
 -
 -  (void)p;
 -  palClearPad(GPIOB, GPIOB_LED4);
 -}
 -
 -/*
 - * This callback is invoked when a transmission buffer has been completely
 - * read by the driver.
 - */
 -static void txend1(UARTDriver *uartp) {
 -
 -  (void)uartp;
 -  palSetPad(GPIOB, GPIOB_LED4);
 -}
 -
 -/*
 - * This callback is invoked when a transmission has physically completed.
 - */
 -static void txend2(UARTDriver *uartp) {
 -
 -  (void)uartp;
 -  palClearPad(GPIOB, GPIOB_LED4);
 -  chSysLockFromISR();
 -  chVTResetI(&vt1);
 -  chVTDoSetI(&vt1, MS2ST(5000), restart, NULL);
 -  chSysUnlockFromISR();
 -}
 -
 -/*
 - * This callback is invoked on a receive error, the errors mask is passed
 - * as parameter.
 - */
 -static void rxerr(UARTDriver *uartp, uartflags_t e) {
 -
 -  (void)uartp;
 -  (void)e;
 -}
 -
 -/*
 - * This callback is invoked when a character is received but the application
 - * was not ready to receive it, the character is passed as parameter.
 - */
 -static void rxchar(UARTDriver *uartp, uint16_t c) {
 -
 -  (void)uartp;
 -  (void)c;
 -  /* Flashing the LED each time a character is received.*/
 -  palSetPad(GPIOB, GPIOB_LED4);
 -  chSysLockFromISR();
 -  chVTResetI(&vt2);
 -  chVTDoSetI(&vt2, MS2ST(200), ledoff, NULL);
 -  chSysUnlockFromISR();
 -}
 -
 -/*
 - * This callback is invoked when a receive buffer has been completely written.
 - */
 -static void rxend(UARTDriver *uartp) {
 -
 -  (void)uartp;
 -}
 -
 -/*
 - * UART driver configuration structure.
 - */
 -static UARTConfig uart_cfg_1 = {
 -  txend1,
 -  txend2,
 -  rxend,
 -  rxchar,
 -  rxerr,
 -  38400,
 -  0,
 -  USART_CR2_LINEN,
 -  0
 -};
 -
 -/*
 - * Application entry point.
 - */
 -int main(void) {
 -
 -  /*
 -   * System initializations.
 -   * - HAL initialization, this also initializes the configured device drivers
 -   *   and performs the board-specific initializations.
 -   * - Kernel initialization, the main() function becomes a thread and the
 -   *   RTOS is active.
 -   */
 -  halInit();
 -  chSysInit();
 -
 -  /*
 -   * Activates the serial driver 1, PA9 and PA10 are routed to USART1.
 -   */
 -  uartStart(&UARTD1, &uart_cfg_1);
 -  palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7));
 -  palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7));
 -
 -  /*
 -   * Starts the transmission, it will be handled entirely in background.
 -   */
 -  uartStartSend(&UARTD1, 13, "Starting...\r\n");
 -
 -  /*
 -   * Normal main() thread activity, in this demo it does nothing.
 -   */
 -  while (TRUE) {
 -    chThdSleepMilliseconds(500);
 -  }
 -}
 diff --git a/testhal/STM32L1xx/UART/mcuconf.h b/testhal/STM32L1xx/UART/mcuconf.h deleted file mode 100644 index 77c9df342..000000000 --- a/testhal/STM32L1xx/UART/mcuconf.h +++ /dev/null @@ -1,177 +0,0 @@ -/*
 -    ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
 -
 -    Licensed under the Apache License, Version 2.0 (the "License");
 -    you may not use this file except in compliance with the License.
 -    You may obtain a copy of the License at
 -
 -        http://www.apache.org/licenses/LICENSE-2.0
 -
 -    Unless required by applicable law or agreed to in writing, software
 -    distributed under the License is distributed on an "AS IS" BASIS,
 -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -    See the License for the specific language governing permissions and
 -    limitations under the License.
 -*/
 -
 -/*
 - * STM32L1xx drivers configuration.
 - * The following settings override the default settings present in
 - * the various device driver implementation headers.
 - * Note that the settings for each driver only have effect if the whole
 - * driver is enabled in halconf.h.
 - *
 - * IRQ priorities:
 - * 15...0       Lowest...Highest.
 - *
 - * DMA priorities:
 - * 0...3        Lowest...Highest.
 - */
 -
 -#define STM32L1xx_MCUCONF
 -
 -/*
 - * HAL driver system settings.
 - */
 -#define STM32_NO_INIT                       FALSE
 -#define STM32_HSI_ENABLED                   TRUE
 -#define STM32_LSI_ENABLED                   TRUE
 -#define STM32_HSE_ENABLED                   FALSE
 -#define STM32_LSE_ENABLED                   TRUE
 -#define STM32_ADC_CLOCK_ENABLED             TRUE
 -#define STM32_USB_CLOCK_ENABLED             TRUE
 -#define STM32_MSIRANGE                      STM32_MSIRANGE_2M
 -#define STM32_SW                            STM32_SW_PLL
 -#define STM32_PLLSRC                        STM32_PLLSRC_HSI
 -#define STM32_PLLMUL_VALUE                  6
 -#define STM32_PLLDIV_VALUE                  3
 -#define STM32_HPRE                          STM32_HPRE_DIV1
 -#define STM32_PPRE1                         STM32_PPRE1_DIV1
 -#define STM32_PPRE2                         STM32_PPRE2_DIV1
 -#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
 -#define STM32_MCOPRE                        STM32_MCOPRE_DIV1
 -#define STM32_RTCSEL                        STM32_RTCSEL_LSE
 -#define STM32_RTCPRE                        STM32_RTCPRE_DIV2
 -#define STM32_VOS                           STM32_VOS_1P8
 -#define STM32_PVD_ENABLE                    FALSE
 -#define STM32_PLS                           STM32_PLS_LEV0
 -
 -/*
 - * ADC driver system settings.
 - */
 -#define STM32_ADC_USE_ADC1                  FALSE
 -#define STM32_ADC_ADC1_DMA_PRIORITY         2
 -#define STM32_ADC_IRQ_PRIORITY              6
 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY     6
 -
 -/*
 - * EXT driver system settings.
 - */
 -#define STM32_EXT_EXTI0_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI1_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI2_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI3_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI4_IRQ_PRIORITY        6
 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY      6
 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY    6
 -#define STM32_EXT_EXTI16_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI17_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI18_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI19_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI20_IRQ_PRIORITY       6
 -#define STM32_EXT_EXTI21_22_IRQ_PRIORITY    6
 -
 -/*
 - * GPT driver system settings.
 - */
 -#define STM32_GPT_USE_TIM2                  FALSE
 -#define STM32_GPT_USE_TIM3                  FALSE
 -#define STM32_GPT_USE_TIM4                  FALSE
 -#define STM32_GPT_TIM2_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM3_IRQ_PRIORITY         7
 -#define STM32_GPT_TIM4_IRQ_PRIORITY         7
 -
 -/*
 - * I2C driver system settings.
 - */
 -#define STM32_I2C_USE_I2C1                  FALSE
 -#define STM32_I2C_USE_I2C2                  FALSE
 -#define STM32_I2C_BUSY_TIMEOUT              50
 -#define STM32_I2C_I2C1_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C2_IRQ_PRIORITY         5
 -#define STM32_I2C_I2C1_DMA_PRIORITY         3
 -#define STM32_I2C_I2C2_DMA_PRIORITY         3
 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
 -
 -/*
 - * ICU driver system settings.
 - */
 -#define STM32_ICU_USE_TIM2                  FALSE
 -#define STM32_ICU_USE_TIM3                  FALSE
 -#define STM32_ICU_USE_TIM4                  FALSE
 -#define STM32_ICU_USE_TIM9                  FALSE
 -#define STM32_ICU_TIM2_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM3_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM4_IRQ_PRIORITY         7
 -#define STM32_ICU_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * PWM driver system settings.
 - */
 -#define STM32_PWM_USE_TIM2                  FALSE
 -#define STM32_PWM_USE_TIM3                  FALSE
 -#define STM32_PWM_USE_TIM4                  FALSE
 -#define STM32_PWM_USE_TIM9                  FALSE
 -#define STM32_PWM_TIM2_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM3_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM4_IRQ_PRIORITY         7
 -#define STM32_PWM_TIM9_IRQ_PRIORITY         7
 -
 -/*
 - * SERIAL driver system settings.
 - */
 -#define STM32_SERIAL_USE_USART1             FALSE
 -#define STM32_SERIAL_USE_USART2             FALSE
 -#define STM32_SERIAL_USE_USART3             FALSE
 -#define STM32_SERIAL_USART1_PRIORITY        12
 -#define STM32_SERIAL_USART2_PRIORITY        12
 -#define STM32_SERIAL_USART3_PRIORITY        12
 -
 -/*
 - * SPI driver system settings.
 - */
 -#define STM32_SPI_USE_SPI1                  FALSE
 -#define STM32_SPI_USE_SPI2                  FALSE
 -#define STM32_SPI_SPI1_DMA_PRIORITY         1
 -#define STM32_SPI_SPI2_DMA_PRIORITY         1
 -#define STM32_SPI_SPI1_IRQ_PRIORITY         10
 -#define STM32_SPI_SPI2_IRQ_PRIORITY         10
 -#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
 -
 -/*
 - * ST driver system settings.
 - */
 -#define STM32_ST_IRQ_PRIORITY               8
 -#define STM32_ST_USE_TIMER                  2
 -
 -/*
 - * UART driver system settings.
 - */
 -#define STM32_UART_USE_USART1               TRUE
 -#define STM32_UART_USE_USART2               TRUE
 -#define STM32_UART_USE_USART3               TRUE
 -#define STM32_UART_USART1_IRQ_PRIORITY      12
 -#define STM32_UART_USART2_IRQ_PRIORITY      12
 -#define STM32_UART_USART3_IRQ_PRIORITY      12
 -#define STM32_UART_USART1_DMA_PRIORITY      0
 -#define STM32_UART_USART2_DMA_PRIORITY      0
 -#define STM32_UART_USART3_DMA_PRIORITY      0
 -#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
 -
 -/*
 - * USB driver system settings.
 - */
 -#define STM32_USB_USE_USB1                  FALSE
 -#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
 -#define STM32_USB_USB1_HP_IRQ_PRIORITY      13
 -#define STM32_USB_USB1_LP_IRQ_PRIORITY      14
 diff --git a/testhal/STM32L1xx/UART/readme.txt b/testhal/STM32L1xx/UART/readme.txt deleted file mode 100644 index 5f3edb851..000000000 --- a/testhal/STM32L1xx/UART/readme.txt +++ /dev/null @@ -1,32 +0,0 @@ -*****************************************************************************
 -** ChibiOS/RT HAL - UART driver demo for STM32L1xx.                        **
 -*****************************************************************************
 -
 -** TARGET **
 -
 -The demo runs on an STMicroelectronics STM32L-Discovery board.
 -
 -** The Demo **
 -
 -The application demonstrates the use of the STM32L1xx UART driver.
 -
 -** Board Setup **
 -
 -- Remove the LCD module.
 -- Connect an RS232 transceiver to pins PA9(TX) and PA10(RX).
 -- Connect a terminal emulator to the transceiver (38400-N-8-1).
 -
 -** Build Procedure **
 -
 -The demo has been tested using the free Codesourcery GCC-based toolchain
 -and YAGARTO.
 -Just modify the TRGT line in the makefile in order to use different GCC ports.
 -
 -** Notes **
 -
 -Some files used by the demo are not part of ChibiOS/RT but are copyright of
 -ST Microelectronics and are licensed under a different license.
 -Also note that not all the files present in the ST library are distributed
 -with ChibiOS/RT, you can find the whole library on the ST web site:
 -
 -                             http://www.st.com
  | 
