Update to latest DMBS revision.
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 26 Apr 2017 10:45:40 +0000 (20:45 +1000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 26 Apr 2017 10:45:40 +0000 (20:45 +1000)
LUFA/Build/DMBS/DMBS/WritingYourOwnModules.md
LUFA/Build/DMBS/DMBS/core.md
LUFA/Build/DMBS/DMBS/core.mk
LUFA/Build/DMBS/DMBS/gcc.md
LUFA/Build/DMBS/DMBS/gcc.mk
LUFA/StudioIntegration/ProjectGenerator/placeholder.txt [deleted file]
LUFA/StudioIntegration/makefile

index 3ecbb33..16df7a5 100644 (file)
@@ -63,6 +63,7 @@ user:
     $(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
 
 As well as complaining if they are set, but currently empty:
+
     $(call ERROR_IF_EMPTY, SOME_MANDATORY_VARIABLE)
     $(call ERROR_IF_EMPTY, SOME_OPTIONAL_BUT_NON_EMPTY_VARIABLE)
 
index c7c9767..406abfe 100644 (file)
@@ -95,7 +95,7 @@ syntax) if desired, as they are provided by this module.
  <tbody>
    <tr>
     <td>DMBS_VERSION</td>
-    <td>Current version of this DMBS release, as a ISO 8601 integer (such as `160403` for `2016-04-03`).</td>
+    <td>Current version of this DMBS release, as a ISO 8601 integer (such as `20160403` for `2016-04-03`).</td>
    </tr>
  </tbody>
 </table>
index 1c55569..1edbd17 100644 (file)
@@ -16,7 +16,7 @@ DMBS_BUILD_PROVIDED_MACROS += DMBS_CHECK_VERSION ERROR_IF_UNSET ERROR_IF_EMPTY E
 SHELL = /bin/sh
 
 # Current DMBS release version
-DMBS_VERSION       := 20160717
+DMBS_VERSION       := 20170426
 
 # Macro to check the DMBS version, aborts if the given DMBS version is below the current version
 DMBS_CHECK_VERSION ?= $(if $(filter-out 0, $(shell test $(DMBS_VERSION) -lt $(1); echo $$?)), , $(error DMBS version $(1) or newer required, current version is $(DMBS_VERSION)))
index f516da5..d28fd9a 100644 (file)
@@ -83,7 +83,7 @@ variable per line) in the user makefile to be able to use this module:
    <tr>
     <td>TARGET</td>
     <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
-   </tr>   
+   </tr>
    <tr>
     <td>ARCH</td>
     <td>Target device architecture (e.g. `AVR8`).</td>
@@ -104,6 +104,10 @@ be assumed.
 <table>
  <tbody>
    <tr>
+    <td>COMPILER_PATH</td>
+    <td>Path to the compiler to use, in case a specific compiler should be substituted for the one in the system's `PATH` variable. Default is blank (use `PATH` provided compiler).</td>
+   </tr>
+   <tr>
     <td>OPTIMIZATION</td>
     <td>Optimization level to use when compiling C and C++ source files. Default is `s` (optimize for smallest size).</td>
    </tr>
@@ -144,6 +148,10 @@ be assumed.
     <td>Boolean, if `Y` linker relaxations will be enabled to slightly reduce the resulting binary's size. Default is `Y`.</td>
    </tr>
    <tr>
+    <td>JUMP_TABLES</td>
+    <td>Boolean, if `Y` jump tables will be enabled to slightly reduce the resulting binary's size - note that this can cause incorrect jumps if the binary is relocated after compilation, such as for a bootloader. Default is `N`.</td>
+   </tr>
+   <tr>
     <td>OBJDIR</td>
     <td>Directory to store the intermediate object files, as they are generated from the source files. Default is `obj`.</td>
    </tr>
@@ -159,10 +167,6 @@ be assumed.
     <td>DEBUG_LEVEL</td>
     <td>Level of the debugging information to generate in the compiled object files. Debug is 2 (medium level debugging information).</td>
    </tr>
-   <tr>
-    <td>COMPILER_PATH</td>
-    <td>Path to the compiler to use, in case a specific compiler should be substituted for the one in the system's `PATH` variable. Default is blank (use `PATH` provided compiler).</td>
-   </tr>
  </tbody>
 </table>
 
@@ -200,5 +204,8 @@ this module.
 The changes to this module since its initial release are listed below, as of the
 DMBS version where the change was made.
 
+### 20170426
+Added `JUMP_TABLES` optional variable.
+
 ### 20160403
 Initial release.
index 3affa63..6126cf9 100644 (file)
@@ -9,7 +9,7 @@
 DMBS_BUILD_MODULES         += GCC
 DMBS_BUILD_TARGETS         += size symbol-sizes all lib elf bin hex lss clean mostlyclean
 DMBS_BUILD_MANDATORY_VARS  += TARGET ARCH MCU SRC
-DMBS_BUILD_OPTIONAL_VARS   += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS OBJDIR OBJECT_FILES DEBUG_TYPE DEBUG_LEVEL LINKER_RELAXATIONS COMPILER_PATH
+DMBS_BUILD_OPTIONAL_VARS   += COMPILER_PATH OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS OBJDIR OBJECT_FILES DEBUG_TYPE DEBUG_LEVEL LINKER_RELAXATIONS JUMP_TABLES
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
@@ -34,6 +34,7 @@ OBJECT_FILES       ?=
 DEBUG_FORMAT       ?= dwarf-2
 DEBUG_LEVEL        ?= 2
 LINKER_RELAXATIONS ?= Y
+JUMP_TABLES        ?= N
 
 # Sanity check user supplied values
 $(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
@@ -47,6 +48,7 @@ $(call ERROR_IF_EMPTY, OBJDIR)
 $(call ERROR_IF_EMPTY, DEBUG_FORMAT)
 $(call ERROR_IF_EMPTY, DEBUG_LEVEL)
 $(call ERROR_IF_NONBOOL, LINKER_RELAXATIONS)
+$(call ERROR_IF_NONBOOL, JUMP_TABLES)
 
 # Determine the utility prefix to use for the selected architecture
 ifeq ($(ARCH), AVR8)
@@ -117,7 +119,14 @@ ifneq ($(F_CPU),)
    BASE_CC_FLAGS += -DF_CPU=$(F_CPU)UL
 endif
 ifeq ($(LINKER_RELAXATIONS), Y)
-BASE_CC_FLAGS += -mrelax
+   BASE_CC_FLAGS += -mrelax
+endif
+ifeq ($(JUMP_TABLES), N)
+   # This flag is required for bootloaders as GCC will emit invalid jump table
+   # assembly code for devices with large amounts of flash; the jump table target
+   # is extracted from FLASH without using the correct ELPM instruction, resulting
+   # in a pseudo-random jump target.
+   BASE_CC_FLAGS += -fno-jump-tables
 endif
 
 # Additional language specific compiler flags
@@ -125,12 +134,6 @@ BASE_C_FLAGS   := -x c -O$(OPTIMIZATION) -std=$(C_STANDARD) -Wstrict-prototypes
 BASE_CPP_FLAGS := -x c++ -O$(OPTIMIZATION) -std=$(CPP_STANDARD)
 BASE_ASM_FLAGS := -x assembler-with-cpp
 
-# This flag is required for bootloaders as GCC will emit invalid jump table
-# assembly code for devices with large amounts of flash; the jump table target
-# is extracted from FLASH without using the correct ELPM instruction, resulting
-# in a pseudo-random jump target.
-BASE_CC_FLAGS += -fno-jump-tables
-
 # Create a list of flags to pass to the linker
 BASE_LD_FLAGS := -lm -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections
 ifeq ($(LINKER_RELAXATIONS), Y)
diff --git a/LUFA/StudioIntegration/ProjectGenerator/placeholder.txt b/LUFA/StudioIntegration/ProjectGenerator/placeholder.txt
deleted file mode 100644 (file)
index e89b040..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Copy the ASF Project Generator into this directory (i.e. with the Python scripts in the current folder). The project generator can be extracted from the release versions of Atmel Studio's ASF extension.
\ No newline at end of file
index 53fb470..30483e9 100644 (file)
@@ -58,7 +58,7 @@ clean:
        @cd $(LUFA_ROOT)/.. && rm -f contents.zip exampleProjects.xml content.xml.cache extension.vsixmanifest asf-manifest.xml extension.xml helpcontentsetup.msha $(notdir $(VSIX_ASSETS)) *.vsix *.mshc
 
 $(DOXYGEN_TAG_FILE_XML):
-       @$(MAKE) -C ../ doxygen DOXYGEN_OVERRIDE_PARAMS="GENERATE_TAGFILE=Documentation/lufa_doc_tags.xml GENERATE_HTML=no GENERATE_XML=yes"
+       @make -C ../ doxygen DOXYGEN_OVERRIDE_PARAMS="GENERATE_TAGFILE=Documentation/lufa_doc_tags.xml GENERATE_HTML=no GENERATE_XML=yes"
 
 $(DOXYGEN_COMBINED_XML): $(DOXYGEN_TAG_FILE_XML)
        @xsltproc $(dir $@)/combine.xslt $(dir $@)/index.xml > $(DOXYGEN_COMBINED_XML)