Remove unused macros.
This commit is contained in:
@@ -63,7 +63,6 @@
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1465555477" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.90182411" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STARTUP_CLEAR_BSS"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=7"/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc.984179844" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc" value="false" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other.384366078" name="Other assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other" value=" -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs " valueType="string"/>
|
||||
@@ -87,12 +86,9 @@
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.133793610" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.gnu99" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.336821673" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_DEBUG=0"/>
|
||||
<listOptionValue builtIn="false" value="CPU_MK22FN512VLH12"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=7"/>
|
||||
<listOptionValue builtIn="false" value="USB_STACK_BM"/>
|
||||
<listOptionValue builtIn="false" value="FRDM_K22F"/>
|
||||
<listOptionValue builtIn="false" value="FREEDOM"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=7"/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc.1588895503" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.277720010" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value=" -fno-common -ffreestanding -fno-builtin -mapcs " valueType="string"/>
|
||||
@@ -208,10 +204,7 @@
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1619685061" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.671721773" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="BL_CONFIG_USB_HID=1"/>
|
||||
<listOptionValue builtIn="false" value="__STARTUP_CLEAR_BSS"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=7"/>
|
||||
<listOptionValue builtIn="false" value="BOOTLOADER_HOST"/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc.2110956724" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc" value="false" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other.1101826118" name="Other assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other" value=" -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs " valueType="string"/>
|
||||
@@ -234,14 +227,10 @@
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.104109443" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.gnu99" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1312429299" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_DEBUG=1"/>
|
||||
<listOptionValue builtIn="false" value="BOOTLOADER_HOST"/>
|
||||
<listOptionValue builtIn="false" value="BL_CONFIG_USB_HID=1"/>
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="CPU_MK22FN512VLH12"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=7"/>
|
||||
<listOptionValue builtIn="false" value="USB_STACK_BM"/>
|
||||
<listOptionValue builtIn="false" value="FRDM_K22F"/>
|
||||
<listOptionValue builtIn="false" value="FREEDOM"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=7"/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc.1218246603" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.727833653" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value=" -fno-common -ffreestanding -fno-builtin -mapcs " valueType="string"/>
|
||||
@@ -357,7 +346,6 @@
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.274875284" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.311105770" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STARTUP_CLEAR_BSS"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=6"/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc.1333860286" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc" value="false" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other.1767422839" name="Other assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other" value=" -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs " valueType="string"/>
|
||||
@@ -381,12 +369,9 @@
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.1631326771" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.gnu99" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1192828665" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_DEBUG=0"/>
|
||||
<listOptionValue builtIn="false" value="CPU_MK22FN512VLH12"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=6"/>
|
||||
<listOptionValue builtIn="false" value="USB_STACK_BM"/>
|
||||
<listOptionValue builtIn="false" value="FRDM_K22F"/>
|
||||
<listOptionValue builtIn="false" value="FREEDOM"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=6"/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc.1080865745" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.1516274995" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value=" -fno-common -ffreestanding -fno-builtin -mapcs " valueType="string"/>
|
||||
@@ -503,7 +488,6 @@
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.1027133901" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="__STARTUP_CLEAR_BSS"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=6"/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc.1757179782" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc" value="false" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other.107245068" name="Other assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other" value=" -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs " valueType="string"/>
|
||||
@@ -513,6 +497,9 @@
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.1991595179" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../../src"/>
|
||||
<listOptionValue builtIn="false" value="../../../src/ksdk_usb"/>
|
||||
<listOptionValue builtIn="false" value="../../../src/buspal"/>
|
||||
<listOptionValue builtIn="false" value="../../../src/buspal/bootloader"/>
|
||||
<listOptionValue builtIn="false" value="../../../src/buspal/bm_usb"/>
|
||||
<listOptionValue builtIn="false" value="../../../../lib/KSDK_2.0_MK22FN512xxx12/middleware/usb_1.0.0"/>
|
||||
<listOptionValue builtIn="false" value="../../../../lib/KSDK_2.0_MK22FN512xxx12/middleware/usb_1.0.0/osa"/>
|
||||
<listOptionValue builtIn="false" value="../../../../lib/KSDK_2.0_MK22FN512xxx12/middleware/usb_1.0.0/include"/>
|
||||
@@ -524,12 +511,10 @@
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.1045887030" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.gnu99" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.2127041653" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_DEBUG=1"/>
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="CPU_MK22FN512VLH12"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=6"/>
|
||||
<listOptionValue builtIn="false" value="USB_STACK_BM"/>
|
||||
<listOptionValue builtIn="false" value="FRDM_K22F"/>
|
||||
<listOptionValue builtIn="false" value="FREEDOM"/>
|
||||
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=6"/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc.352041744" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.1377293028" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value=" -fno-common -ffreestanding -fno-builtin -mapcs " valueType="string"/>
|
||||
@@ -602,24 +587,24 @@
|
||||
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
||||
</configuration>
|
||||
<configuration configurationName="v7-release-srec"/>
|
||||
<configuration configurationName="v6-debug"/>
|
||||
<configuration configurationName="Multiple configurations">
|
||||
<resource resourceType="PROJECT" workspacePath="/FRDM-K64F_Demo"/>
|
||||
</configuration>
|
||||
<configuration configurationName="v6-debug"/>
|
||||
<configuration configurationName="v7-release"/>
|
||||
<configuration configurationName="v7-debug-srec">
|
||||
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
||||
</configuration>
|
||||
<configuration configurationName="release-v7"/>
|
||||
<configuration configurationName="debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
||||
</configuration>
|
||||
<configuration configurationName="release-v7"/>
|
||||
<configuration configurationName="v6-debug-srec"/>
|
||||
<configuration configurationName="v7-debug"/>
|
||||
<configuration configurationName="v6-release"/>
|
||||
<configuration configurationName="release">
|
||||
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
||||
</configuration>
|
||||
<configuration configurationName="v6-release"/>
|
||||
<configuration configurationName="v7-debug"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
|
||||
@@ -4,28 +4,14 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#if !defined(WIN32)
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
#include "bootloader_common.h"
|
||||
#include "fsl_common.h"
|
||||
|
||||
#if defined(BOOTLOADER_HOST)
|
||||
#elif defined(BUSPAL)
|
||||
#include "../src/buspal_config.h"
|
||||
#else
|
||||
#include "bootloader_config.h"
|
||||
#include "target_config.h"
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Definitions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
// The following macros are to be used when trying to save code size for specific peripheral configurations
|
||||
// that will only be using one peripheral instance. most of the peripheral driver code can use multiple instances but by
|
||||
// just using one
|
||||
@@ -34,17 +20,6 @@
|
||||
#define USE_ONLY_SPI(instance) (defined(BL_FEATURE_SPI_OPTIMIZE) && (BL_SPI_USED_INSTANCE == instance))
|
||||
#define USE_ONLY_I2C(instance) (defined(BL_FEATURE_I2C_OPTIMIZE) && (BL_I2C_USED_INSTANCE == instance))
|
||||
|
||||
//! @name Min/max macros
|
||||
//@{
|
||||
#if !defined(MIN)
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#if !defined(MAX)
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
//@}
|
||||
|
||||
//! @brief Computes the number of elements in an array.
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
@@ -72,7 +47,7 @@
|
||||
//! is treated as a 32-bit little endian value.
|
||||
#define FOUR_CHAR_CODE(a, b, c, d) (((d) << 24) | ((c) << 16) | ((b) << 8) | ((a)))
|
||||
|
||||
#if (defined(DEBUG) || defined(_DEBUG)) && !defined(DEBUG_PRINT_DISABLE)
|
||||
#if (defined(DEBUG))
|
||||
static inline void debug_printf(const char *format, ...);
|
||||
|
||||
//! @brief Debug print utility.
|
||||
@@ -83,14 +58,7 @@ static inline void debug_printf(const char *format, ...)
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
// Temporarily disable MISRA rule 14.2
|
||||
#if defined(__ICCARM__)
|
||||
#pragma diag_suppress = Pm049
|
||||
#endif
|
||||
va_end(args);
|
||||
#if defined(__ICCARM__)
|
||||
#pragma diag_default = Pm049
|
||||
#endif
|
||||
}
|
||||
#else // (DEBUG || _DEBUG) && !DEBUG_PRINT_DISABLE
|
||||
// Empty macro to cause debug_printf() calls to disappear.
|
||||
@@ -128,10 +96,6 @@ enum _bl_driver_status_groups
|
||||
kStatusGroup_OTFADDriver = 5, //!< OTFAD driver status group number.
|
||||
};
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#pragma anon_unions
|
||||
#endif
|
||||
|
||||
//! @brief Structure of version property.
|
||||
//!
|
||||
//! @ingroup bl_core
|
||||
@@ -145,17 +109,6 @@ typedef union StandardVersion
|
||||
char name; //!< name [31:24]
|
||||
};
|
||||
uint32_t version; //!< combined version numbers
|
||||
|
||||
#if defined(__cplusplus)
|
||||
StandardVersion()
|
||||
: version(0)
|
||||
{
|
||||
}
|
||||
StandardVersion(uint32_t version)
|
||||
: version(version)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
} standard_version_t;
|
||||
|
||||
// #define MAKE_VERSION(bugfix, minor, major, name) (((name) << 24) | ((major) << 16) | ((minor) << 8 ) | (bugfix))
|
||||
|
||||
Reference in New Issue
Block a user