Core system components meta module
Includes: sys_time, commands, LED interfaces
Example for airframe file
Add to your firmware section:
<module name="system_core"/>
Module functions
Init Functions
These initialization functions are called once on startup.
Periodic Functions
These functions are called periodically at the specified frequency from the module periodic loop.
- LED_PERIODIC()
- Frequency in Hz: 50
- Autorun: LOCK
Periodic function automatically starts after init and can't be stopped.
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw system_core.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="system_core" dir="core" task="core">
<doc>
<description>
Core system components meta module
Includes: sys_time, commands, LED interfaces
</description>
</doc>
<dep>
<depends>mcu,math,state_interface,@actuators|@intermcu,settings|@no_settings,@datalink,@telemetry</depends>
<provides>core</provides>
</dep>
<header>
<file name="commands.h"/>
<file name="led.h" dir="."/>
</header>
<init fun="commands_init()"/>
<periodic fun="LED_PERIODIC()" freq="50"/>
<makefile>
<configure name="SRC_BOARD" value="boards/$(BOARD)"/>
<configure name="SRC_MODULES" value="modules"/>
<configure name="SRC_ARCH" value="arch/$(ARCH)"/>
<define name="BOARD_CONFIG" value="$(BOARD_CFG)"/>
<define name="SYS_TIME_LED" value="$(SYS_TIME_LED)" cond="ifneq ($(SYS_TIME_LED),none)"/>
<include name="$(SRC_BOARD)"/>
<include name="$(SRC_MODULES)"/>
<file name="sys_time.c" dir="mcu_periph"/>
<file name="commands.c"/>
<define name="USE_COMMANDS"/>
<file_arch name="sys_time_arch.c" dir="mcu_periph"/>
<file_arch name="led_hw.c" dir="." cond="ifeq ($(ARCH), stm32)"/>
<flag name="LDFLAGS" value="lrt" cond="ifeq ($(ARCH), linux)"/>
<raw>
VPATH += $(PAPARAZZI_HOME)/var/share
VPATH += $(PAPARAZZI_HOME)/sw/ext
$(TARGET).ARCHDIR = $(ARCH)
</raw>
<test/>
</makefile>
<makefile target="!nps|sim">
<define name="USE_LED"/>
</makefile>
</module>