Chibi os 20 (#2212)

* Update ChibiOS

* Fix Makefiles includes paths

* halconf.h: remove flash hack

* mcuconf: fix EXTI ptiorityes

* Digital Input: ICU: use designated initializers, initialize 'arr'

* ChibiOS: lis302dl fix

* ADC: update to new API

* UARTConfig: timeout_cb field, formating

* ChibiOS: remove _exit, _kill, _getpid

* Fix lis302dl

* Bump config versions

* chconfig_common: cosmetic changes

* stm32f4ems: commulative config update

* Update Simulator

* ALLCSRC already contain all needed ChibiOS files.

Same for ALLINC and ALLCPPSRC

* ChibiOS fix for Simulator

* ChibiOS: port lock/unlock hook and MMC over SPI timeout

* STM32F7: update configs

* STM32F7: update linker file

* Cypress: port ADC lld to ChibiOS-20

* Cypress: port SPI lld to ChibiOS-20

* Cypress: port CAN lld to ChibiOS-20

* Cypress: fix include path for rules.ld

* Cypress: update chconf.h and halconf.h for ChibiOS-20

* Kinetis: update ADC lld to ChibiOS-20

* Kinetis: update SPI lld to ChibiOS-20

* Kinetis: update UART lld driver for ChibiOS-20

* Kinetis: update chconf.h and halconf.h for ChibiOS-20

* Kinetis: fix include path for rules.ld

* Nucleo F746: update ld script

* Nucleo F746: fix compile

* Bootloader: fix compilation with ChibiOS-20, cleanup

* Bootloader: add way to pass crosscompiler using CROSS_COMPILE

* Debug build arguments

* Simulator: fix windows compilation

Exclude syscalls_cpp.cpp from compilation
This commit is contained in:
Andrey G 2021-01-19 23:20:35 +03:00 committed by GitHub
parent 185699e678
commit 27905c6817
23 changed files with 486 additions and 262 deletions

@ -1 +1 @@
Subproject commit 1a2c5967dc813bdbf1cc7eabfea8377340c8a29e
Subproject commit 0b4897475aceea4ae791f104297d334911a5adf7

@ -1 +1 @@
Subproject commit 8f7c2d187bbb02915f44b926c7aa02185402aef7
Subproject commit 61baa6b036138c155f7cfc5646d833d9423f3243

View File

@ -4,7 +4,7 @@
#
CHIBIOS = ChibiOS
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
RULESFILE = $(RULESPATH)/rules.mk
include rusefi_rules.mk
@ -161,12 +161,12 @@ include $(CPU_STARTUP_DIR)
# HAL-OSAL files (optional).
include $(CHIBIOS_CONTRIB)/os/hal/hal.mk
include $(CPU_PLATFORM_DIR)
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# EX files (optional).
include $(CHIBIOS)/os/ex/ST/lis302dl.mk
include $(CHIBIOS)/os/ex/devices/ST/lis302dl.mk
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk
@ -205,6 +205,11 @@ ifeq ($(LDSCRIPT),)
LDSCRIPT= config/stm32f4ems/STM32F407xG.ld
endif
$(info PROJECT_BOARD: $(PROJECT_BOARD))
$(info PROJECT_CPU: $(PROJECT_CPU))
$(info CONFDIR: $(CONFDIR))
$(info LDSCRIPT: $(LDSCRIPT))
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(ALLCSRC) \

View File

@ -125,23 +125,28 @@ PROJECT_DIR = ..
CHIBIOS = $(PROJECT_DIR)/ChibiOS
CHIBIOS_CONTRIB = $(PROJECT_DIR)/ChibiOS-Contrib
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
RULESFILE = $(RULESPATH)/rules.mk
include $(PROJECT_DIR)/rusefi.mk
CONFIG = $(PROJECT_DIR)/config
# Include various ChibiOS mk files
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
# Startup files.
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/$(CPU_STARTUP)
# HAL-OSAL files (optional).
include $(CHIBIOS_CONTRIB)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/ports/STM32/$(CPU_PLATFORM)
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk
# EX files (optional).
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
include $(CONFIG)/boards/$(PROJECT_BOARD)/board.mk
include $(PROJECT_DIR)/init/init.mk
@ -158,16 +163,8 @@ endif
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(STARTUPSRC) \
$(KERNSRC) \
$(PORTSRC) \
$(OSALSRC) \
$(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
CSRC = $(ALLCSRC) \
$(CHIBIOS)/os/various/syscalls.c \
$(CHIBIOS)/os/hal/lib/streams/memstreams.c \
$(CHIBIOS)/os/hal/lib/streams/chprintf.c \
$(CONSOLESRC) \
$(DEV_SRC) \
$(HW_LAYER_EMS) \
@ -177,9 +174,8 @@ CSRC = $(STARTUPSRC) \
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CPPSRC = $(CHCPPSRC) \
CPPSRC = $(ALLCPPSRC) \
$(DEV_SRC_CPP) \
$(BOARDSRC_CPP) \
$(HW_LAYER_EMS_CPP) \
$(HW_SENSORS_SRC) \
$(TUNERSTUDIO_SRC_CPP) \
@ -224,17 +220,8 @@ ifeq ($(CONFIGPATH),)
endif
INCDIR = .. $(CHIBIOS)/os/license \
$(PORTINC) \
$(OSALINC) \
$(KERNINC) \
$(TESTINC) \
$(STARTUPINC) \
$(HALINC) \
$(PLATFORMINC) \
$(BOARDINC) \
$(CHCPPINC) \
$(CHIBIOS)/os/hal/lib/streams \
INCDIR = $(ALLINC) \
.. \
$(CHIBIOS)/os/various \
$(CHIBIOS)/os/ex/ST \
$(CHIBIOS)/os/hal/lib/peripherals/sensors \
@ -281,8 +268,12 @@ BUILDDIR=blbuild
MCU = cortex-m4
#TRGT = arm-elf-
TRGT = arm-none-eabi-
ifeq ($(CROSS_COMPILE),)
#TRGT = arm-elf-
TRGT = arm-none-eabi-
else
TRGT = $(CROSS_COMPILE)
endif
CC = $(CCPREFIX) $(TRGT)gcc
CPPC = $(CCPREFIX) $(TRGT)g++
# Enable loading with g++ only if you need C++ runtime support.

View File

@ -25,22 +25,22 @@
*/
MEMORY
{
flash0 : org = 0x08000000, len = 1M /* Flash as AXIM (writable) */
flash1 : org = 0x00200000, len = 1M /* Flash as ITCM */
flash2 : org = 0x00000000, len = 0
flash3 : org = 0x00000000, len = 0
flash4 : org = 0x00000000, len = 0
flash5 : org = 0x00000000, len = 0
flash6 : org = 0x00000000, len = 0
flash7 : org = 0x00000000, len = 0
ram0 : org = 0x20010000, len = 256k /* SRAM1 + SRAM2 */
flash0 (rx) : org = 0x08000000, len = 1M /* Flash as AXIM (writable) */
flash1 (rx) : org = 0x00200000, len = 1M /* Flash as ITCM */
flash2 (rx) : org = 0x00000000, len = 0
flash3 (rx) : org = 0x00000000, len = 0
flash4 (rx) : org = 0x00000000, len = 0
flash5 (rx) : org = 0x00000000, len = 0
flash6 (rx) : org = 0x00000000, len = 0
flash7 (rx) : org = 0x00000000, len = 0
ram0 (wx) : org = 0x20010000, len = 256k /* SRAM1 + SRAM2 */
/* let's hide since it overlaps with ram0 ram1 : org = 0x20010000, len = 240k*/ /* SRAM1 */
/* let's hide since it overlaps with ram0 ram2 : org = 0x2004C000, len = 16k*/ /* SRAM2 */
ram3 : org = 0x20000000, len = 64k /* DTCM-RAM */
ram4 : org = 0x00000000, len = 16k /* ITCM-RAM */
ram5 : org = 0x40024000, len = 4k /* BCKP SRAM */
ram6 : org = 0x00000000, len = 0
ram7 : org = 0x00000000, len = 0
ram3 (wx) : org = 0x20000000, len = 64k /* DTCM-RAM */
ram4 (wx) : org = 0x00000000, len = 16k /* ITCM-RAM */
ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
ram6 (wx) : org = 0x00000000, len = 0
ram7 (wx) : org = 0x00000000, len = 0
}
/* For each data/text section two region are defined, a virtual region
@ -130,3 +130,6 @@ INCLUDE rules_code.ld
/* Data rules inclusion.*/
INCLUDE rules_data.ld
/* Memory rules inclusion.*/
INCLUDE rules_memory.ld

View File

@ -26,23 +26,23 @@
*/
MEMORY
{
bl : org = 0x08000000, len = 16k /* bootloader section */
flash0 : org = DEFINED(BOOTLOADER) ? 0x08008000 : 0x08000000, len = DEFINED(BOOTLOADER) ? 1992k : 2048k
flash1 : org = 0x00200000, len = 2M /* Flash as ITCM */ /* TODO: do we need BOOTLOADER logic here? */
flash2 : org = 0x00000000, len = 0
flash3 : org = 0x00000000, len = 0
flash4 : org = 0x00000000, len = 0
flash5 : org = 0x00000000, len = 0
flash6 : org = 0x00000000, len = 0
flash7 : org = 0x00000000, len = 0
ram0 : org = 0x20020000, len = 384k /* SRAM1 + SRAM2 */
ram1 : org = 0x20020000, len = 368k /* SRAM1 */
ram2 : org = 0x2007C000, len = 16k /* SRAM2 */
ram3 : org = 0x20000000, len = 128k /* DTCM-RAM */
ram4 : org = 0x00000000, len = 16k /* ITCM-RAM */
ram5 : org = 0x40024000, len = 4k /* BCKP SRAM */
ram6 : org = 0x00000000, len = 0
ram7 : org = 0x00000000, len = 0
bl : org = 0x08000000, len = 16k /* bootloader section */
flash0 (rx) : org = DEFINED(BOOTLOADER) ? 0x08008000 : 0x08000000, len = DEFINED(BOOTLOADER) ? 1992k : 2048k
flash1 (rx) : org = 0x00200000, len = 2M /* Flash as ITCM */ /* TODO: do we need BOOTLOADER logic here? */
flash2 (rx) : org = 0x00000000, len = 0
flash3 (rx) : org = 0x00000000, len = 0
flash4 (rx) : org = 0x00000000, len = 0
flash5 (rx) : org = 0x00000000, len = 0
flash6 (rx) : org = 0x00000000, len = 0
flash7 (rx) : org = 0x00000000, len = 0
ram0 (wx) : org = 0x20020000, len = 384k /* SRAM1 + SRAM2 */
ram1 (wx) : org = 0x20020000, len = 368k /* SRAM1 */
ram2 (wx) : org = 0x2007C000, len = 16k /* SRAM2 */
ram3 (wx) : org = 0x20000000, len = 128k /* DTCM-RAM */
ram4 (wx) : org = 0x00000000, len = 16k /* ITCM-RAM */
ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
ram6 (wx) : org = 0x00000000, len = 0
ram7 (wx) : org = 0x00000000, len = 0
}
/* For each data/text section two region are defined, a virtual region
@ -132,3 +132,6 @@ INCLUDE rules_code.ld
/* Data rules inclusion.*/
INCLUDE rules_data.ld
/* Memory rules inclusion.*/
INCLUDE rules_memory.ld

View File

@ -47,30 +47,12 @@ extern "C" {
#endif
#endif /* _FROM_ASM_ */
/*===========================================================================*/
/**
* @brief Context switch hook.
* @details This hook is invoked just before switching between threads.
* @name Kernel hooks
* @{
*/
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
contextSwitchHook(); \
}
/**
* @brief ISR enter hook.
*/
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
/* IRQ prologue code here.*/ \
irqEnterHook(); \
}
/**
* @brief ISR exit hook.
*/
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
/* IRQ epilogue code here.*/ \
irqExitHook(); \
}
/*===========================================================================*/
/**
* @brief Threads descriptor structure extension.
@ -89,6 +71,32 @@ extern "C" {
* @note It is invoked from within @p chThdInit() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { threadInitHook(tp); }
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
threadInitHook(tp); \
}
/**
* @brief Context switch hook.
* @details This hook is invoked just before switching between threads.
*/
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
contextSwitchHook(); \
}
/**
* @brief ISR enter hook.
*/
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
/* IRQ prologue code here.*/ \
irqEnterHook(); \
}
/**
* @brief ISR exit hook.
*/
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
/* IRQ epilogue code here.*/ \
irqExitHook(); \
}
#endif /* CONFIG_CHCONF_COMMON_H_ */

View File

@ -29,7 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_5_1_
#define _CHIBIOS_RT_CONF_VER_6_1_
/*
* __process_stack_size__ and __process_stack_size__ defaults are each hard-coded as 0x400 in ChibiOS rules.mk files
@ -65,16 +65,20 @@
/**
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
* @note Allowed values are 16, 32 or 64 bits.
*/
#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 1000
#endif
/**
* @brief Time intervals data size.
@ -134,21 +138,6 @@
#define CH_CFG_TIME_QUANTUM 0
#endif
/**
* @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.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/**
* @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit()
@ -337,6 +326,28 @@
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#endif
/**
* @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.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
#endif
/** @} */
/*===========================================================================*/
/**
* @name OSLIB options
* @{
*/
/*===========================================================================*/
/**
* @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
@ -345,7 +356,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES FALSE
#endif
/**
* @brief I/O Queues APIs.
@ -366,6 +379,21 @@
#define CH_CFG_USE_MEMCORE FALSE
#endif
/**
* @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.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/**
* @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
@ -392,20 +420,7 @@
#endif
/**
* @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.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
#endif
/**
* @brief Objects FIFOs APIs.
* @brief Objects FIFOs APIs.
* @details If enabled then the objects FIFOs APIs are included
* in the kernel.
*
@ -415,6 +430,50 @@
#define CH_CFG_USE_OBJ_FIFOS FALSE
#endif
/**
* @brief Pipes APIs.
* @details If enabled then the pipes APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_PIPES)
#define CH_CFG_USE_PIPES FALSE
#endif
/**
* @brief Objects Caches APIs.
* @details If enabled then the objects caches APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_OBJ_CACHES FALSE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES FALSE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS FALSE
#endif
/** @} */
/*===========================================================================*/
@ -479,6 +538,13 @@
#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
#endif
/**
* @brief Enables factory for Pipes.
*/
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
#define CH_CFG_FACTORY_PIPES FALSE
#endif
/** @} */
/*===========================================================================*/
@ -629,10 +695,6 @@
/**
* @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.*/ \
@ -645,6 +707,7 @@
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
/* Idle-enter code here.*/ \
}
/**
@ -654,6 +717,7 @@
* @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
/* Idle-leave code here.*/ \
}
/**
@ -692,7 +756,6 @@
/* Trace code here.*/ \
}
/** @} */
/*===========================================================================*/

View File

@ -25,18 +25,14 @@
* @{
*/
#ifndef _HALCONF_H_
#define _HALCONF_H_
#ifndef HALCONF_H
#define HALCONF_H
#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
#include "mcuconf.h"
/* THIS IS HACK: to allow smooth transition to ChibiOS with ELF support we
* need to disable hal_flash.h until we move to ChibiOS EFL driver.
* hal_flash.h in ChibiOS has definitions that conflict with current RusEFI
* flash driver.
* but it is included unconditionaly from hal.h */
#define HAL_FLASH_H
/**
* @brief Enables the FLASH subsystem.
*/
@ -411,6 +407,6 @@
#include "halconf_community.h"
#endif /* _HALCONF_H_ */
#endif /* HALCONF_H */
/** @} */

View File

@ -59,6 +59,10 @@
*/
#define STM32F4xx_MCUCONF
#define STM32F405_MCUCONF
#define STM32F415_MCUCONF
#define STM32F407_MCUCONF
#define STM32F417_MCUCONF
/*
* HAL driver system settings.
@ -156,21 +160,21 @@
/*
* EXT driver system settings.
*/
#define STM32_EXT_EXT_IRQ_PRIORITY ICU_PRIORITY
#define STM32_EXT_EXTI0_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI1_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI2_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI3_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI4_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI16_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI17_IRQ_PRIORITY 15
#define STM32_EXT_EXTI18_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI19_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI20_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI21_IRQ_PRIORITY 15
#define STM32_EXT_EXTI22_IRQ_PRIORITY 15
#define STM32_IRQ_EXTI_PRIORITY ICU_PRIORITY
#define STM32_IRQ_EXTI0_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI1_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI2_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI3_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI4_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI5_9_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI10_15_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI16_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI17_PRIORITY 15 /* why? */
#define STM32_IRQ_EXTI18_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI19_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI20_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI21_PRIORITY 15 /* why? */
#define STM32_IRQ_EXTI22_PRIORITY 15 /* why? */
/*
* GPT driver system settings.

View File

@ -29,7 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_5_1_
#define _CHIBIOS_RT_CONF_VER_6_1_
/*
* __process_stack_size__ and __process_stack_size__ defaults are each hard-coded as 0x400 in ChibiOS rules.mk files
@ -65,16 +65,20 @@
/**
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
* @note Allowed values are 16, 32 or 64 bits.
*/
#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 1000
#endif
/**
* @brief Time intervals data size.
@ -134,21 +138,6 @@
#define CH_CFG_TIME_QUANTUM 0
#endif
/**
* @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.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/**
* @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit()
@ -337,6 +326,28 @@
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#endif
/**
* @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.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
#endif
/** @} */
/*===========================================================================*/
/**
* @name OSLIB options
* @{
*/
/*===========================================================================*/
/**
* @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
@ -345,7 +356,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES FALSE
#endif
/**
* @brief I/O Queues APIs.
@ -366,6 +379,21 @@
#define CH_CFG_USE_MEMCORE FALSE
#endif
/**
* @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.
*/
#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
#endif
/**
* @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
@ -392,20 +420,7 @@
#endif
/**
* @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.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
#endif
/**
* @brief Objects FIFOs APIs.
* @brief Objects FIFOs APIs.
* @details If enabled then the objects FIFOs APIs are included
* in the kernel.
*
@ -415,6 +430,50 @@
#define CH_CFG_USE_OBJ_FIFOS FALSE
#endif
/**
* @brief Pipes APIs.
* @details If enabled then the pipes APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_PIPES)
#define CH_CFG_USE_PIPES FALSE
#endif
/**
* @brief Objects Caches APIs.
* @details If enabled then the objects caches APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_OBJ_CACHES FALSE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES FALSE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS FALSE
#endif
/** @} */
/*===========================================================================*/
@ -479,6 +538,13 @@
#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
#endif
/**
* @brief Enables factory for Pipes.
*/
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
#define CH_CFG_FACTORY_PIPES FALSE
#endif
/** @} */
/*===========================================================================*/
@ -629,10 +695,6 @@
/**
* @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.*/ \
@ -645,6 +707,7 @@
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
/* Idle-enter code here.*/ \
}
/**
@ -654,6 +717,7 @@
* @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
/* Idle-leave code here.*/ \
}
/**
@ -692,7 +756,6 @@
/* Trace code here.*/ \
}
/** @} */
/*===========================================================================*/

View File

@ -28,14 +28,10 @@
#ifndef HALCONF_H
#define HALCONF_H
#include "mcuconf.h"
#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
/* THIS IS HACK: to allow smooth transition to ChibiOS with ELF support we
* need to disable hal_flash.h until we move to ChibiOS EFL driver.
* hal_flash.h in ChibiOS has definitions that conflict with current RusEFI
* flash driver.
* but it is included unconditionaly from hal.h */
#define HAL_FLASH_H
#include "mcuconf.h"
/**
* @brief Enables the FLASH subsystem.

View File

@ -17,6 +17,30 @@
#ifndef MCUCONF_H
#define MCUCONF_H
/*
* STM32F7xx 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 STM32F7xx_MCUCONF
#define STM32F765_MCUCONF
#define STM32F767_MCUCONF
#define STM32F777_MCUCONF
#define STM32F769_MCUCONF
#define STM32F779_MCUCONF
/* for stm32f746_nucleo */
#define STM32F746_MCUCONF
#include "efifeatures.h"
/**
@ -177,21 +201,22 @@
/*
* EXT driver system settings.
*/
#define STM32_EXT_EXT_IRQ_PRIORITY ICU_PRIORITY
#define STM32_EXT_EXTI0_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI1_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI2_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI3_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI4_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI16_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI17_IRQ_PRIORITY 15
#define STM32_EXT_EXTI18_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI19_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI20_IRQ_PRIORITY STM32_EXT_EXT_IRQ_PRIORITY
#define STM32_EXT_EXTI21_IRQ_PRIORITY 15
#define STM32_EXT_EXTI22_IRQ_PRIORITY 15
#define STM32_IRQ_EXTI_PRIORITY ICU_PRIORITY
#define STM32_IRQ_EXTI0_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI1_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI2_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI3_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI4_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI5_9_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI10_15_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI16_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI17_PRIORITY 15 /* why? */
#define STM32_IRQ_EXTI18_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI19_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI20_PRIORITY STM32_IRQ_EXTI_PRIORITY
#define STM32_IRQ_EXTI21_PRIORITY 15 /* why? */
#define STM32_IRQ_EXTI22_PRIORITY 15 /* why? */
#define STM32_IRQ_EXTI23_PRIORITY STM32_IRQ_EXTI_PRIORITY
/*
* GPT driver system settings.
@ -208,19 +233,21 @@
#define STM32_GPT_USE_TIM11 FALSE
#define STM32_GPT_USE_TIM12 FALSE
#define STM32_GPT_USE_TIM14 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
#define STM32_GPT_TIM9_IRQ_PRIORITY 7
#define STM32_GPT_TIM11_IRQ_PRIORITY 7
#define STM32_GPT_TIM12_IRQ_PRIORITY 7
#define STM32_GPT_TIM14_IRQ_PRIORITY 7
#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7
#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7
#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7
#define STM32_IRQ_TIM1_CC_PRIORITY 7
#define STM32_IRQ_TIM2_PRIORITY 7
#define STM32_IRQ_TIM3_PRIORITY 7
#define STM32_IRQ_TIM4_PRIORITY 7
#define STM32_IRQ_TIM5_PRIORITY 7
#define STM32_IRQ_TIM6_PRIORITY 7
#define STM32_IRQ_TIM7_PRIORITY 7
#define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7
#define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7
#define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7
#define STM32_IRQ_TIM8_CC_PRIORITY 7
/*
* I2C driver system settings.
*/
@ -318,14 +345,14 @@
#define STM32_SERIAL_USE_USART6 TRUE
#define STM32_SERIAL_USE_UART7 FALSE
#define STM32_SERIAL_USE_UART8 FALSE
#define STM32_SERIAL_USART1_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_SERIAL_USART2_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_SERIAL_USART3_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_SERIAL_UART4_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_SERIAL_UART5_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_SERIAL_USART6_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_SERIAL_UART7_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_SERIAL_UART8_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_IRQ_USART1_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_IRQ_USART2_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_IRQ_USART3_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_IRQ_UART4_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_IRQ_UART5_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_IRQ_USART6_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_IRQ_UART7_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
#define STM32_IRQ_UART8_PRIORITY (PRECISE_SCHEDULING_TIMER_PRIORITY + 2)
/*
* SPI driver system settings.

View File

@ -42,9 +42,17 @@ extern SERIAL_USB_DRIVER TS_USB_DEVICE;
#elif TS_UART_MODE
/* Note: This structure is modified from the default ChibiOS layout! */
static UARTConfig tsUartConfig = {
.txend1_cb = NULL, .txend2_cb = NULL, .rxend_cb = NULL, .rxchar_cb = NULL, .rxerr_cb = NULL,
.speed = 0, .cr1 = 0, .cr2 = 0/*USART_CR2_STOP1_BITS*/ | USART_CR2_LINEN, .cr3 = 0,
.timeout_cb = NULL, .rxhalf_cb = NULL
.txend1_cb = NULL,
.txend2_cb = NULL,
.rxend_cb = NULL,
.rxchar_cb = NULL,
.rxerr_cb = NULL,
.timeout_cb = NULL,
.speed = 0,
.cr1 = 0,
.cr2 = 0/*USART_CR2_STOP1_BITS*/ | USART_CR2_LINEN,
.cr3 = 0,
.rxhalf_cb = NULL
};
#elif defined(TS_SERIAL_DEVICE)
static SerialConfig tsSerialConfig = { .speed = 0, .cr1 = 0, .cr2 = USART_CR2_STOP1_BITS | USART_CR2_LINEN, .cr3 = 0 };

View File

@ -54,9 +54,17 @@ static void tsRxIRQIdleHandler(UARTDriver *uartp) {
/* Note: This structure is modified from the default ChibiOS layout! */
static UARTConfig tsDmaUartConfig = {
.txend1_cb = NULL, .txend2_cb = NULL, .rxend_cb = NULL, .rxchar_cb = NULL, .rxerr_cb = NULL,
.speed = 0, .cr1 = 0, .cr2 = 0/*USART_CR2_STOP1_BITS*/ | USART_CR2_LINEN, .cr3 = 0,
.timeout_cb = tsRxIRQIdleHandler, .rxhalf_cb = tsRxIRQHalfHandler
.txend1_cb = NULL,
.txend2_cb = NULL,
.rxend_cb = NULL,
.rxchar_cb = NULL,
.rxerr_cb = NULL,
.timeout_cb = tsRxIRQIdleHandler,
.speed = 0,
.cr1 = 0,
.cr2 = 0/*USART_CR2_STOP1_BITS*/ | USART_CR2_LINEN,
.cr3 = 0,
.rxhalf_cb = tsRxIRQHalfHandler
};
void startUartDmaConnector(UARTDriver *uartp DECLARE_CONFIG_PARAMETER_SUFFIX) {

View File

@ -172,11 +172,11 @@ UARTConfig uartConfig = {
.rxend_cb = NULL,
.rxchar_cb = NULL,
.rxerr_cb = NULL,
.timeout_cb = NULL,
.speed = 0,
.cr1 = 0,
.cr2 = 0/*USART_CR2_STOP1_BITS*/ | USART_CR2_LINEN,
.cr3 = 0,
.timeout_cb = NULL,
.rxhalf_cb = NULL
};

View File

@ -22,7 +22,7 @@ static volatile size_t sampleCount = 0;
binary_semaphore_t knockSem;
static void completionCallback(ADCDriver* adcp, adcsample_t*, size_t) {
static void completionCallback(ADCDriver* adcp) {
palClearPad(GPIOD, 2);
if (adcp->state == ADC_COMPLETE) {

View File

@ -173,7 +173,7 @@ static ADCConversionGroup adcgrpcfgSlow = {
AdcDevice slowAdc(&adcgrpcfgSlow, slowAdcSampleBuf, ARRAY_SIZE(slowAdcSampleBuf));
void adc_callback_fast(ADCDriver *adcp, adcsample_t *buffer, size_t n);
void adc_callback_fast(ADCDriver *adcp);
static ADCConversionGroup adcgrpcfgFast = {
.circular = FALSE,

View File

@ -50,6 +50,7 @@ static ICUConfig wave_icucfg = {
.overflow_cb = NULL,
.channel = ICU_CHANNEL_1,
.dier = 0,
.arr = 0xFFFFFFFFU
};
static ArrayList<digital_input_s, 8> registeredIcus;

View File

@ -161,9 +161,12 @@ static int adcCallbackCounter = 0;
static volatile int averagedSamples[ADC_MAX_CHANNELS_COUNT];
static adcsample_t avgBuf[ADC_MAX_CHANNELS_COUNT];
void adc_callback_fast_internal(ADCDriver *adcp, adcsample_t *buffer, size_t n);
void adc_callback_fast_internal(ADCDriver *adcp);
void adc_callback_fast(ADCDriver *adcp) {
adcsample_t *buffer = adcp->samples;
//size_t n = adcp->depth;
void adc_callback_fast(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
if (adcp->state == ADC_COMPLETE) {
fastAdc.invalidateSamplesCache();
@ -186,7 +189,7 @@ void adc_callback_fast(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
}
// call the real callback (see below)
adc_callback_fast_internal(adcp, avgBuf, fastAdc.size());
adc_callback_fast_internal(adcp);
// reset the avg buffer & counter
for (int i = fastAdc.size() - 1; i >= 0; i--) {
@ -197,14 +200,18 @@ void adc_callback_fast(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
}
}
#define adc_callback_fast adc_callback_fast_internal
#endif /* EFI_FASTER_UNIFORM_ADC */
/**
* This method is not in the adc* lower-level file because it is more business logic then hardware.
*/
void adc_callback_fast(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
#if EFI_FASTER_UNIFORM_ADC
void adc_callback_fast_internal(ADCDriver *adcp) {
#else
void adc_callback_fast(ADCDriver *adcp) {
#endif
adcsample_t *buffer = adcp->samples;
size_t n = adcp->depth;
(void) buffer;
(void) n;

View File

@ -112,16 +112,19 @@ PROJECT_DIR = ../firmware
# Imported source files and paths
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
# Startup files.
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/boards/simulator/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/SIMIA32/compilers/GCC/port.mk
# Other files (optional).
include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
#include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk
ifeq ($(OS),Windows_NT)
include ${CHIBIOS}/os/hal/ports/simulator/win32/platform.mk
@ -142,25 +145,21 @@ include $(PROJECT_DIR)/util/util.mk
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = ${PORTSRC} \
${KERNSRC} \
${HALSRC} \
${PLATFORMSRC} \
CSRC = $(ALLCSRC) \
$(SYSTEMSRC) \
$(CONSOLESRC) \
$(CONTROLLERS_ALGO_SRC) \
$(CONTROLLERS_CORE_SRC) \
$(CONTROLLERS_SENSORS_SRC) \
$(ENGINES_SRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/hal/lib/streams/memstreams.c \
$(CHIBIOS)/os/hal/lib/streams/chprintf.c \
$(UTILSRC) \
main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CPPSRC = $(UTILSRC_CPP) \
CPPSRC = $(ALLCPPSRC) \
$(CHIBIOS)/os/various/cpp_wrappers/ch.cpp \
$(UTILSRC_CPP) \
$(CONTROLLERS_ALGO_SRC_CPP) \
$(CONTROLLERS_SRC_CPP) \
$(PROJECT_DIR)/development/sensor_chart.cpp \
@ -187,26 +186,21 @@ CPPSRC = $(UTILSRC_CPP) \
ASMSRC = $(PORTASM)
INCDIR = . \
$(CHIBIOS)/os/license \
$(PORTINC) \
$(KERNINC) \
$(OSALINC) \
$(HALINC) \
$(CHCPPINC) \
$(PLATFORMINC) \
$(BOARDINC) \
$(ALLINC) \
$(CHIBIOS)/os/various/cpp_wrappers \
$(UTIL_INC) \
$(PROJECT_DIR)/init \
$(CONSOLE_INC) \
$(PROJECT_DIR)/config/engines \
$(PROJECT_DIR)/ext_algo \
$(HW_LAYER_DRIVERS_INC) \
$(HW_LAYER_INC) $(HW_SENSORS_INC) \
$(HW_LAYER_DRIVERS_INC) \
$(HW_LAYER_INC) \
$(HW_SENSORS_INC) \
$(PROJECT_DIR)/hw_layer/algo \
$(PROJECT_DIR)/hw_layer/drivers/can \
$(HW_SENSORS_INC) \
$(DEVELOPMENT_DIR) \
$(CONTROLLERS_INC) \
$(DEVELOPMENT_DIR) \
$(CONTROLLERS_INC) \
${CHIBIOS}/os/various \
$(CHIBIOS)/os/hal/lib/streams \
simulator

View File

@ -29,7 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_5_1_
#define _CHIBIOS_RT_CONF_VER_6_1_
#define CHPRINTF_USE_FLOAT TRUE
@ -372,6 +372,50 @@
#define CH_CFG_USE_OBJ_FIFOS FALSE
#endif
/**
* @brief Pipes APIs.
* @details If enabled then the pipes APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_PIPES)
#define CH_CFG_USE_PIPES FALSE
#endif
/**
* @brief Objects Caches APIs.
* @details If enabled then the objects caches APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_OBJ_CACHES FALSE
#endif
/**
* @brief Delegate threads APIs.
* @details If enabled then the delegate threads APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_DELEGATES)
#define CH_CFG_USE_DELEGATES FALSE
#endif
/**
* @brief Jobs Queues APIs.
* @details If enabled then the jobs queues APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_JOBS)
#define CH_CFG_USE_JOBS FALSE
#endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included

View File

@ -28,6 +28,9 @@
#ifndef _HALCONF_H_
#define _HALCONF_H_
#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
/*#include "mcuconf.h"*/
/**