Formalized the Arduino builds' generation of linker maps
authorPatrick C Lankswert <patrick.lankswert@intel.com>
Fri, 13 Feb 2015 20:46:40 +0000 (15:46 -0500)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Tue, 17 Feb 2015 18:27:58 +0000 (18:27 +0000)
Change-Id: If832e3e94de96c0b14b2c49c302dd21d1736ccbf
Signed-off-by: Patrick Lankswert <patrick.lankswert@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/344
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sachin Agrawal <sachin.agrawal@intel.com>
build_common/arduino/SConscript
resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript

index d913e32..f24da8b 100644 (file)
@@ -374,9 +374,8 @@ else:
 
        if target_arch == 'arm':
                env.AppendUnique(LINKFLAGS = ['-Os', '-Wl,--gc-sections', cpu_flag,
 
        if target_arch == 'arm':
                env.AppendUnique(LINKFLAGS = ['-Os', '-Wl,--gc-sections', cpu_flag,
-                                       '-T' + variant_folder + '/' + __get_board_info(board, '.build.ldscript'),
-                                       '-Wl,-Map,' + env.get('BUILD_DIR') + 'arduino_prj.map'])
-               env.AppendUnique(LINKFLAGS = Split('-lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group'))
+                                       '-T' + variant_folder + '/' + __get_board_info(board, '.build.ldscript')])
+               env.AppendUnique(LINKFLAGS = Split('-lm -lgcc -mthumb -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group'))
 
                variant_system_lib = __get_board_info(board, '.build.variant_system_lib')
                if variant_system_lib:
 
                variant_system_lib = __get_board_info(board, '.build.variant_system_lib')
                if variant_system_lib:
index 398c0ed..0d37077 100644 (file)
@@ -13,6 +13,7 @@ arduino_simplecs_env.PrependUnique(CPPPATH = [
 
 arduino_simplecs_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
 arduino_simplecs_env.PrependUnique(LIBS = ['octbstack', 'coap'])
 
 arduino_simplecs_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
 arduino_simplecs_env.PrependUnique(LIBS = ['octbstack', 'coap'])
+arduino_simplecs_env.PrependUnique(LINKFLAGS = ['-Wl,-cref', '-Wl,-Map='+Dir('.').path+'/SimpleClientServer.map'])
 
 if not env.get('RELEASE'):
        arduino_simplecs_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
 
 if not env.get('RELEASE'):
        arduino_simplecs_env.AppendUnique(CPPDEFINES = ['TB_LOG'])