From 2adae86acb1b6465260a074145798b3e26ba6d4e Mon Sep 17 00:00:00 2001 From: "sandipan.p" Date: Mon, 14 Sep 2015 18:21:55 +0530 Subject: [PATCH] Upload command update for Arduino DUE With the previous implementation, CA and RI binaries were trying to get uploaded on DUE board during SConscript parsing. Change-Id: I12955a09e5695192b6cb756f2252b12bc62c0726 Signed-off-by: sandipan.p Reviewed-on: https://gerrit.iotivity.org/gerrit/2515 Reviewed-by: Abhishek Sharma Tested-by: jenkins-iotivity Reviewed-by: Ashok Babu Channa Reviewed-by: Naga Ashok Jampani Reviewed-by: Abhishek Pandey Reviewed-by: Patrick Lankswert --- build_common/arduino/SConscript | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build_common/arduino/SConscript b/build_common/arduino/SConscript index 5df7fb3..73e753e 100644 --- a/build_common/arduino/SConscript +++ b/build_common/arduino/SConscript @@ -194,12 +194,11 @@ def __upload(env, binary): install_cmd = env.Command('install_cmd', None, upload_cmd) env.Default('install_cmd') elif target_arch == 'arm': - protocol = __get_board_info(board, '.upload.protocol') - speed = __get_board_info(board, '.upload.speed') port = 'ttyACM0' - uu = __get_board_info(board, '.upload.native_usb') - os.system('stty -F /dev/' + port + ' speed 1200 cs8 -cstopb -parenb') - os.system(arduino_home + '/hardware/tools/bossac -i --port=' + port + ' -U false -e -w -b ' + binary + ' -R') + upload_cmd = 'stty -F /dev/' + port + ' speed 1200 cs8 -cstopb -parenb \n' + arduino_home + '/hardware/tools/bossac -i --port=' + port + ' -U false -e -w -b ' + binary + ' -R' + print "Upload command: %s" %upload_cmd + install_cmd = env.Command('install_cmd', None, upload_cmd) + env.Default('install_cmd') # Print the command line that to upload binary to the board def __upload_help(env): -- 2.7.4