From c28296e6f2f3ce296905d9d9f1f1c56e08dfeb62 Mon Sep 17 00:00:00 2001 From: Alexander Malishev Date: Tue, 19 Jun 2018 01:13:10 +0400 Subject: [PATCH] AP_Bootloader: added simple std c function to reduce flash space --- Tools/AP_Bootloader/support.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Tools/AP_Bootloader/support.cpp b/Tools/AP_Bootloader/support.cpp index 38c37da054..a33f1d5fca 100644 --- a/Tools/AP_Bootloader/support.cpp +++ b/Tools/AP_Bootloader/support.cpp @@ -167,3 +167,24 @@ void led_pulses(uint8_t npulses) chThdSleepMilliseconds(2000); } } + +//simple variant of std c function to reduce used flash space +void *memcpy(void *dest, const void *src, size_t n) +{ + uint8_t *tdest = (uint8_t *)dest; + uint8_t *tsrc = (uint8_t *)src; + for(int i=0; i