diff --git a/bsp/apollo2/rtconfig.py b/bsp/apollo2/rtconfig.py index 579c93b17b..354e5f6389 100644 --- a/bsp/apollo2/rtconfig.py +++ b/bsp/apollo2/rtconfig.py @@ -18,9 +18,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil_v5' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/avr32uc3b0/rtconfig.py b/bsp/avr32uc3b0/rtconfig.py index b6004940d9..a9400c6051 100644 --- a/bsp/avr32uc3b0/rtconfig.py +++ b/bsp/avr32uc3b0/rtconfig.py @@ -15,14 +15,14 @@ if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'C:/Program Files/Atmel/AVR Tools/AVR Toolchain/bin' elif CROSS_TOOL == 'keil': - print '================ERROR============================' - print 'Not support keil yet!' - print '=================================================' + print('================ERROR============================') + print('Not support keil yet!') + print('=================================================') exit(0) elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/beaglebone/rtconfig.py b/bsp/beaglebone/rtconfig.py index a5561f54d3..6cd0b71505 100644 --- a/bsp/beaglebone/rtconfig.py +++ b/bsp/beaglebone/rtconfig.py @@ -15,9 +15,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support IAR yet!' - print '=================================================' + print('================ERROR============================') + print('Not support IAR yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/efm32/rtconfig.py b/bsp/efm32/rtconfig.py index b412851de4..b1bd8330bb 100644 --- a/bsp/efm32/rtconfig.py +++ b/bsp/efm32/rtconfig.py @@ -13,14 +13,14 @@ if CROSS_TOOL == 'gcc': EXEC_PATH = 'C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin' #EXEC_PATH = 'C:\Program Files (x86)\yagarto\bin' elif CROSS_TOOL == 'keil': - print '================ERROR============================' - print 'Not support keil yet!' - print '=================================================' + print('================ERROR============================') + print('Not support keil yet!') + print('=================================================') exit(0) elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/frdm-k64f/rtconfig.py b/bsp/frdm-k64f/rtconfig.py index baaf4905fa..009b4b71fb 100644 --- a/bsp/frdm-k64f/rtconfig.py +++ b/bsp/frdm-k64f/rtconfig.py @@ -17,9 +17,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/gd32450z-eval/SConstruct b/bsp/gd32450z-eval/SConstruct index 42ae8c9646..27ac9b0241 100644 --- a/bsp/gd32450z-eval/SConstruct +++ b/bsp/gd32450z-eval/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-gd32f4xx.' + rtconfig.TARGET_EXT diff --git a/bsp/gd32450z-eval/rtconfig.py b/bsp/gd32450z-eval/rtconfig.py index 70ffabba2f..af754e3c75 100644 --- a/bsp/gd32450z-eval/rtconfig.py +++ b/bsp/gd32450z-eval/rtconfig.py @@ -13,9 +13,9 @@ if os.getenv('RTT_ROOT'): # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR if CROSS_TOOL == 'gcc': - print '================ERROR============================' - print 'Not support gcc yet!' - print '=================================================' + print('================ERROR============================') + print('Not support gcc yet!') + print('=================================================') PLATFORM = 'gcc' elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' diff --git a/bsp/lm3s8962/rtconfig.py b/bsp/lm3s8962/rtconfig.py index 0a0c98a71d..829120bd3a 100644 --- a/bsp/lm3s8962/rtconfig.py +++ b/bsp/lm3s8962/rtconfig.py @@ -18,9 +18,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/lm3s9b9x/rtconfig.py b/bsp/lm3s9b9x/rtconfig.py index f806ec1e19..d9c51ac722 100644 --- a/bsp/lm3s9b9x/rtconfig.py +++ b/bsp/lm3s9b9x/rtconfig.py @@ -18,9 +18,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/lm4f232/rtconfig.py b/bsp/lm4f232/rtconfig.py index cfe518891b..5e6075ead5 100644 --- a/bsp/lm4f232/rtconfig.py +++ b/bsp/lm4f232/rtconfig.py @@ -20,9 +20,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/lpc178x/rtconfig.py b/bsp/lpc178x/rtconfig.py index a0b4243081..a5302bb36f 100644 --- a/bsp/lpc178x/rtconfig.py +++ b/bsp/lpc178x/rtconfig.py @@ -15,9 +15,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/lpc2148/rtconfig.py b/bsp/lpc2148/rtconfig.py index 2c44325803..57f7ee46da 100644 --- a/bsp/lpc2148/rtconfig.py +++ b/bsp/lpc2148/rtconfig.py @@ -15,9 +15,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:\Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/lpc2478/rtconfig.py b/bsp/lpc2478/rtconfig.py index 5e99582469..7464fa0dc4 100644 --- a/bsp/lpc2478/rtconfig.py +++ b/bsp/lpc2478/rtconfig.py @@ -15,9 +15,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/lpc408x/rtconfig.py b/bsp/lpc408x/rtconfig.py index a2a6fac53f..ba797aab63 100644 --- a/bsp/lpc408x/rtconfig.py +++ b/bsp/lpc408x/rtconfig.py @@ -16,9 +16,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'D:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/lpc43xx/M0/SConstruct b/bsp/lpc43xx/M0/SConstruct index c7967d02f6..c0d1d2fdc0 100644 --- a/bsp/lpc43xx/M0/SConstruct +++ b/bsp/lpc43xx/M0/SConstruct @@ -29,7 +29,7 @@ if rtconfig.CROSS_TOOL == 'gcc': import glob # Remove the .o for M0 left on the drivers dir. for i in glob.glob(GetCurrentDir() + '/../drivers/*.o'): - print 'RM %s' % i + print('RM %s' % i) os.unlink(i) if sys.platform.startswith('linux'): @@ -40,7 +40,7 @@ if rtconfig.CROSS_TOOL == 'gcc': else: # Assume Windows. ocwd = os.getcwdu() - print 'TODO: remove the object files in ../Libraries' + print('TODO: remove the object files in ../Libraries') os.chdir(ocwd) # do building diff --git a/bsp/lpc43xx/M4/SConstruct b/bsp/lpc43xx/M4/SConstruct index 7b02b732d4..a6390025a3 100644 --- a/bsp/lpc43xx/M4/SConstruct +++ b/bsp/lpc43xx/M4/SConstruct @@ -26,14 +26,14 @@ Export('rtconfig') objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) if rtconfig.CROSS_TOOL == 'gcc': - print 'build M0 code first' + print('build M0 code first') if sys.platform.startswith('linux'): import glob ocwd = os.getcwdu() os.chdir('../M0') res = os.system('scons') if res: - print 'build M0 exit with code %d\n' % res + print('build M0 exit with code %d\n' % res) sys.exit(res) os.chdir(ocwd) res = os.system('cd ../Libraries/; find -name \*.o -exec rm {} \;') @@ -47,7 +47,7 @@ if rtconfig.CROSS_TOOL == 'gcc': # Remove the .o for M0 left on the drivers dir. for i in glob.glob(GetCurrentDir() + '/../drivers/*.o'): - print 'RM %s' % i + print('RM %s' % i) os.unlink(i) # do building diff --git a/bsp/lpc5410x/rtconfig.py b/bsp/lpc5410x/rtconfig.py index 555a1b4962..3c0e37fe07 100644 --- a/bsp/lpc5410x/rtconfig.py +++ b/bsp/lpc5410x/rtconfig.py @@ -16,9 +16,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'D:/Keil_v5' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/lpc824/rtconfig.py b/bsp/lpc824/rtconfig.py index 7fb0a2e110..906729dfb9 100644 --- a/bsp/lpc824/rtconfig.py +++ b/bsp/lpc824/rtconfig.py @@ -11,9 +11,9 @@ if os.getenv('RTT_CC'): # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR if CROSS_TOOL == 'gcc': - print '================ERROR============================' - print 'Not support gcc yet!' - print '=================================================' + print('================ERROR============================') + print('Not support gcc yet!') + print('=================================================') elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/keil_v5' diff --git a/bsp/ls1bdev/rtconfig.py b/bsp/ls1bdev/rtconfig.py index 70077e64ce..4dcbf0bd75 100644 --- a/bsp/ls1bdev/rtconfig.py +++ b/bsp/ls1bdev/rtconfig.py @@ -14,9 +14,9 @@ if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = r'C:\Program Files\CodeSourcery\Sourcery G++ Lite For MIPS ELF\bin' else: - print '================ERROR============================' - print 'Not support %s yet!' % CROSS_TOOL - print '=================================================' + print('================ERROR============================') + print('Not support %s yet!' % CROSS_TOOL) + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/ls1cdev/rtconfig.py b/bsp/ls1cdev/rtconfig.py index c08dfc6852..4bf85c0993 100644 --- a/bsp/ls1cdev/rtconfig.py +++ b/bsp/ls1cdev/rtconfig.py @@ -15,9 +15,9 @@ if CROSS_TOOL == 'gcc': # EXEC_PATH = "/opt/mips-2015.05/bin" EXEC_PATH = r'D:\mgc\embedded\codebench\bin' else: - print '================ERROR===========================' - print 'Not support %s yet!' % CROSS_TOOL - print '=================================================' + print('================ERROR===========================') + print('Not support %s yet!' % CROSS_TOOL) + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/m16c62p/rtconfig.py b/bsp/m16c62p/rtconfig.py index 494f52ff76..5fb198af6c 100644 --- a/bsp/m16c62p/rtconfig.py +++ b/bsp/m16c62p/rtconfig.py @@ -17,9 +17,9 @@ elif CROSS_TOOL == 'iar': IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench Evaluation 6.0' # EXEC_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench Evaluation 6.0' elif CROSS_TOOL == 'keil': - print '================ERROR============================' - print 'Not support keil yet!' - print '=================================================' + print('================ERROR============================') + print('Not support keil yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/mb9bf568r/rtconfig.py b/bsp/mb9bf568r/rtconfig.py index 82cf6acf38..abee5014b2 100644 --- a/bsp/mb9bf568r/rtconfig.py +++ b/bsp/mb9bf568r/rtconfig.py @@ -16,9 +16,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil_MDK_471' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/mini2440/rtconfig.py b/bsp/mini2440/rtconfig.py index bdd11aafef..969cd7fa82 100644 --- a/bsp/mini2440/rtconfig.py +++ b/bsp/mini2440/rtconfig.py @@ -21,9 +21,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/mini4020/rtconfig.py b/bsp/mini4020/rtconfig.py index 9d7b859db8..be8e4535c7 100644 --- a/bsp/mini4020/rtconfig.py +++ b/bsp/mini4020/rtconfig.py @@ -10,18 +10,18 @@ CROSS_TOOL = 'keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') -if CROSS_TOOL == 'gcc': - print '================ERROR============================' - print 'Not support gcc yet!' - print '=================================================' +if CROSS_TOOL == 'gcc': + print('================ERROR============================') + print('Not support gcc yet!') + print('=================================================') exit(0) elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'c:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/nrf51822/rtconfig.py b/bsp/nrf51822/rtconfig.py index 3e9c68fed8..654730708e 100644 --- a/bsp/nrf51822/rtconfig.py +++ b/bsp/nrf51822/rtconfig.py @@ -17,9 +17,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil_v5' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/nrf52832/rtconfig.py b/bsp/nrf52832/rtconfig.py index 5e40e7201e..1775b4ab4b 100644 --- a/bsp/nrf52832/rtconfig.py +++ b/bsp/nrf52832/rtconfig.py @@ -18,9 +18,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil_v5' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/nv32f100x/rtconfig.py b/bsp/nv32f100x/rtconfig.py index 6927eee3ab..bf568e19b7 100644 --- a/bsp/nv32f100x/rtconfig.py +++ b/bsp/nv32f100x/rtconfig.py @@ -14,14 +14,14 @@ if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'G:/iot/camera_studio-win32-20160903/camera_studio/tools/arm-2014.05/bin' elif CROSS_TOOL == 'keil': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/realview-a8/SConstruct b/bsp/realview-a8/SConstruct index 6d57bc4025..67ae413023 100644 --- a/bsp/realview-a8/SConstruct +++ b/bsp/realview-a8/SConstruct @@ -29,7 +29,7 @@ if GetDepend('RT_USING_VMM'): if os.system('{cppcmd} -P -C -E -I. -D__ASSEMBLY__ {ldfile}.S -o {ldfile}'.format( cppcmd = os.path.join(rtconfig.EXEC_PATH, 'arm-none-eabi-gcc'), ldfile = rtconfig.LINK_SCRIPT)) != 0: - print 'failed to generate linker script %s' % rtconfig.LINK_SCRIPT + print('failed to generate linker script %s' % rtconfig.LINK_SCRIPT) sys.exit(255) # if the linker script changed, relink the target Depends(TARGET, rtconfig.LINK_SCRIPT) diff --git a/bsp/rm48x50/rtconfig.py b/bsp/rm48x50/rtconfig.py index b5e3664dbd..e0899cf38e 100644 --- a/bsp/rm48x50/rtconfig.py +++ b/bsp/rm48x50/rtconfig.py @@ -15,9 +15,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support IAR yet!' - print '=================================================' + print('================ERROR============================') + print('Not support IAR yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/sam7x/rtconfig.py b/bsp/sam7x/rtconfig.py index 565120bfed..761c1b9b6f 100644 --- a/bsp/sam7x/rtconfig.py +++ b/bsp/sam7x/rtconfig.py @@ -16,9 +16,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/samd21/rtconfig.py b/bsp/samd21/rtconfig.py index edd1d7358d..9b4743a20c 100644 --- a/bsp/samd21/rtconfig.py +++ b/bsp/samd21/rtconfig.py @@ -22,9 +22,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/sep6200/rtconfig.py b/bsp/sep6200/rtconfig.py index 58b05417ad..53384875c9 100644 --- a/bsp/sep6200/rtconfig.py +++ b/bsp/sep6200/rtconfig.py @@ -14,9 +14,9 @@ if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = '/usr/unicore/gnu-toolchain-unicore/uc4-1.0-beta-hard-RHELAS5/bin/' else : - print '================ERROR============================' - print 'Not support yet!' - print '=================================================' + print('================ERROR============================') + print('Not support yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/simulator/SConstruct b/bsp/simulator/SConstruct index 4283082d04..d433039bba 100755 --- a/bsp/simulator/SConstruct +++ b/bsp/simulator/SConstruct @@ -80,7 +80,7 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) def ObjRemove(objs, remove): for item in objs: - # print type(item), os.path.basename(str(item)) + # print(type(item), os.path.basename(str(item)) ) if os.path.basename(str(item)) in remove: objs.remove(item) return diff --git a/bsp/simulator/rtconfig.py b/bsp/simulator/rtconfig.py index c62b24ea93..915cc3f686 100755 --- a/bsp/simulator/rtconfig.py +++ b/bsp/simulator/rtconfig.py @@ -27,7 +27,7 @@ elif CROSS_TOOL == 'msvc': PLATFORM = 'cl' EXEC_PATH = '' else: - print "bad CROSS TOOL!" + print("bad CROSS TOOL!") exit(1) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/stm32f0x/rtconfig.py b/bsp/stm32f0x/rtconfig.py index 790e6215ed..659b664723 100644 --- a/bsp/stm32f0x/rtconfig.py +++ b/bsp/stm32f0x/rtconfig.py @@ -17,9 +17,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/stm32f40x/SConstruct b/bsp/stm32f40x/SConstruct index 99c2876aab..ea1e8bf447 100644 --- a/bsp/stm32f40x/SConstruct +++ b/bsp/stm32f40x/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32f4xx.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32f40x/rtconfig.py b/bsp/stm32f40x/rtconfig.py index 3438597ee6..1df6020628 100644 --- a/bsp/stm32f40x/rtconfig.py +++ b/bsp/stm32f40x/rtconfig.py @@ -17,9 +17,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/stm32f411-nucleo/SConstruct b/bsp/stm32f411-nucleo/SConstruct index b4d12cc06b..4921ba69bc 100644 --- a/bsp/stm32f411-nucleo/SConstruct +++ b/bsp/stm32f411-nucleo/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32f411.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32f429-apollo/SConstruct b/bsp/stm32f429-apollo/SConstruct index ac3196e370..ea6c96c0a8 100644 --- a/bsp/stm32f429-apollo/SConstruct +++ b/bsp/stm32f429-apollo/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32f42x.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32f429-armfly/SConstruct b/bsp/stm32f429-armfly/SConstruct index ac3196e370..ea6c96c0a8 100644 --- a/bsp/stm32f429-armfly/SConstruct +++ b/bsp/stm32f429-armfly/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32f42x.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32f429-armfly/rtconfig.py b/bsp/stm32f429-armfly/rtconfig.py index 50b58434d9..ece5a363fb 100644 --- a/bsp/stm32f429-armfly/rtconfig.py +++ b/bsp/stm32f429-armfly/rtconfig.py @@ -19,9 +19,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/stm32f429-disco/SConstruct b/bsp/stm32f429-disco/SConstruct index ac3196e370..ea6c96c0a8 100644 --- a/bsp/stm32f429-disco/SConstruct +++ b/bsp/stm32f429-disco/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32f42x.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32f429-disco/rtconfig.py b/bsp/stm32f429-disco/rtconfig.py index 312b46052c..40d5f3c805 100644 --- a/bsp/stm32f429-disco/rtconfig.py +++ b/bsp/stm32f429-disco/rtconfig.py @@ -17,9 +17,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/stm32f4xx-HAL/SConstruct b/bsp/stm32f4xx-HAL/SConstruct index 99c2876aab..ea1e8bf447 100644 --- a/bsp/stm32f4xx-HAL/SConstruct +++ b/bsp/stm32f4xx-HAL/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32f4xx.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32f7-disco/SConstruct b/bsp/stm32f7-disco/SConstruct index af8f4a90b2..edbf0c62b8 100644 --- a/bsp/stm32f7-disco/SConstruct +++ b/bsp/stm32f7-disco/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32f7xx.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32h743-nucleo/SConstruct b/bsp/stm32h743-nucleo/SConstruct index 1e2018c543..dae244260a 100644 --- a/bsp/stm32h743-nucleo/SConstruct +++ b/bsp/stm32h743-nucleo/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32h7xx.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32l072/rtconfig.py b/bsp/stm32l072/rtconfig.py index a8f00d12da..8796a79b60 100644 --- a/bsp/stm32l072/rtconfig.py +++ b/bsp/stm32l072/rtconfig.py @@ -14,14 +14,14 @@ if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'G:/iot/camera_studio-win32-20160903/camera_studio/tools/arm-2014.05/bin' elif CROSS_TOOL == 'keil': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/stm32l475-iot-disco/SConstruct b/bsp/stm32l475-iot-disco/SConstruct index ac3196e370..ea6c96c0a8 100644 --- a/bsp/stm32l475-iot-disco/SConstruct +++ b/bsp/stm32l475-iot-disco/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32f42x.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32l475-iot-disco/rtconfig.py b/bsp/stm32l475-iot-disco/rtconfig.py index 50b58434d9..ece5a363fb 100644 --- a/bsp/stm32l475-iot-disco/rtconfig.py +++ b/bsp/stm32l475-iot-disco/rtconfig.py @@ -19,9 +19,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/stm32l476-nucleo/SConstruct b/bsp/stm32l476-nucleo/SConstruct index 1a32356531..063261ea93 100644 --- a/bsp/stm32l476-nucleo/SConstruct +++ b/bsp/stm32l476-nucleo/SConstruct @@ -11,8 +11,8 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] try: from building import * except: - print 'Cannot found RT-Thread root directory, please check RTT_ROOT' - print RTT_ROOT + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) exit(-1) TARGET = 'rtthread-stm32l476.' + rtconfig.TARGET_EXT diff --git a/bsp/stm32l476-nucleo/rtconfig.py b/bsp/stm32l476-nucleo/rtconfig.py index 3b863008b2..43fad6104b 100644 --- a/bsp/stm32l476-nucleo/rtconfig.py +++ b/bsp/stm32l476-nucleo/rtconfig.py @@ -19,9 +19,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/tm4c129x/rtconfig.py b/bsp/tm4c129x/rtconfig.py index d92c9f1101..9b8b95a402 100644 --- a/bsp/tm4c129x/rtconfig.py +++ b/bsp/tm4c129x/rtconfig.py @@ -21,9 +21,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'D:\Keil_v5' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/upd70f3454/rtconfig.py b/bsp/upd70f3454/rtconfig.py index ad1565251d..e25c81cfc7 100644 --- a/bsp/upd70f3454/rtconfig.py +++ b/bsp/upd70f3454/rtconfig.py @@ -10,17 +10,17 @@ if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if CROSS_TOOL == 'gcc': - print '================ERROR============================' - print 'Not support gcc yet!' - print '=================================================' + print('================ERROR============================') + print('Not support gcc yet!') + print('=================================================') exit(0) elif CROSS_TOOL == 'iar': PLATFORM = 'iar' IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 6.0 Evaluation_0' elif CROSS_TOOL == 'keil': - print '================ERROR============================' - print 'Not support keil yet!' - print '=================================================' + print('================ERROR============================') + print('Not support keil yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/x1000/rtconfig.py b/bsp/x1000/rtconfig.py index 331639b2e7..b935d7bc4e 100644 --- a/bsp/x1000/rtconfig.py +++ b/bsp/x1000/rtconfig.py @@ -12,7 +12,7 @@ if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = r'E:\work\env\tools\gnu_gcc\mips_gcc\mips-2016.05\bin' else: - print 'Please make sure your toolchains is GNU GCC!' + print('Please make sure your toolchains is GNU GCC!') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/x86/rtconfig.py b/bsp/x86/rtconfig.py index c602315d06..b833f4de49 100644 --- a/bsp/x86/rtconfig.py +++ b/bsp/x86/rtconfig.py @@ -15,14 +15,14 @@ if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_IA32_ELF/bin' elif CROSS_TOOL == 'keil': - print '================ERROR============================' - print 'Not support keil yet!' - print '=================================================' + print('================ERROR============================') + print('Not support keil yet!') + print('=================================================') exit(0) elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support iar yet!' - print '=================================================' + print('================ERROR============================') + print('Not support iar yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/zynq7000/rtconfig.py b/bsp/zynq7000/rtconfig.py index 45889fb7a5..33e6442073 100644 --- a/bsp/zynq7000/rtconfig.py +++ b/bsp/zynq7000/rtconfig.py @@ -15,9 +15,9 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': - print '================ERROR============================' - print 'Not support IAR yet!' - print '=================================================' + print('================ERROR============================') + print('Not support IAR yet!') + print('=================================================') exit(0) if os.getenv('RTT_EXEC_PATH'): diff --git a/components/dfs/filesystems/romfs/mkromfs.py b/components/dfs/filesystems/romfs/mkromfs.py index 9917cf85b9..f3c12876d2 100644 --- a/components/dfs/filesystems/romfs/mkromfs.py +++ b/components/dfs/filesystems/romfs/mkromfs.py @@ -50,7 +50,7 @@ class File(object): return bytes(self._data) def dump(self, indent=0): - print '%s%s' % (' ' * indent, self._name) + print('%s%s' % (' ' * indent, self._name)) class Folder(object): bin_fmt = struct.Struct('IIII') @@ -108,7 +108,7 @@ class Folder(object): c.sort() def dump(self, indent=0): - print '%s%s' % (' ' * indent, self._name) + print('%s%s' % (' ' * indent, self._name)) for c in self._children: c.dump(indent + 1)