mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-02-07 12:18:28 +08:00
When adding a test node to a makefile section, with required compilation flags, include and other options, all the files (not arch dependent files) can be compiled with a TAP compatible program, included in the standard tests of the CI servers. Not all module's XML files are converted, but a large part of the most important parts are already covered. More will be added later. The number of tested airframes (full compilation of all targets) have been reduced to speed the CI compile time but still covers the relevant architecture and boards. The main benefit is that the overall coverage is already better than before as previous test aircraft were compiling more or less the same part of the airborne code, while this new mechanism is more efficient to test modules not included in any config.
30 lines
1.3 KiB
XML
30 lines
1.3 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="dfu_command" task="datalink"><!-- task="datalink" to run before telemetry_transparent_usb -->
|
|
<doc>
|
|
<description>
|
|
THIS MODULE MUST BE PLACED ABOVE ANY USB SERIAL CONSUMERS IN THE AIRFRAME!
|
|
|
|
Read USB serial for dfu command. Send '#\n', 'bl\n' to reset to DFU mode.
|
|
The same command works with betaflight (tested with 4.1.1), allowing
|
|
paparazzi to be uploaded directly to these boards.
|
|
|
|
The dfu command is automatically sent when uploading with DFU or DFU-UTIL
|
|
(see configure below).
|
|
</description>
|
|
</doc>
|
|
<header>
|
|
<file name="dfu_command.h"/>
|
|
</header>
|
|
<event fun="dfu_command_event()"/>
|
|
<makefile target="!fbw|sim|nps|hitl">
|
|
<configure name="SERIAL_TTY" default="/dev/ttyACM0"/>
|
|
<configure name="DFU_PRE_UPLOAD_CMD" default="@(printf '\043\012' $(REDIRECT) $(SERIAL_TTY) $(AND) sleep 1 $(AND) printf 'bl\012' $(REDIRECT) $(SERIAL_TTY) $(AND) sleep 1) $(OR) echo 'Warning: DFU command failed!'"/>
|
|
<configure name="DFU_UTIL_PRE_UPLOAD_CMD" default="@(printf '\043\012' $(REDIRECT) $(SERIAL_TTY) $(AND) sleep 1 $(AND) printf 'bl\012' $(REDIRECT) $(SERIAL_TTY) $(AND) sleep 1) $(OR) echo 'Warning: DFU command failed!'"/>
|
|
<define name="USE_USB_SERIAL"/>
|
|
<file name="dfu_command.c"/>
|
|
<file_arch name="usb_ser_hw.c" dir="."/>
|
|
</makefile>
|
|
</module>
|
|
|