def install_board_with_programmer( mcu, programmer, f_cpu=16000000, core='arduino', replace_existing=False, ): """install board with programmer.""" bunch = AutoBunch() board_id = '{mcu}_{f_cpu}_{programmer}'.format( f_cpu=f_cpu, mcu=mcu, programmer=programmer, ) bunch.name = '{mcu}@{f} Prog:{programmer}'.format( f=strfreq(f_cpu), mcu=mcu, programmer=programmer, ) bunch.upload.using = programmer bunch.build.mcu = mcu bunch.build.f_cpu = str(f_cpu) + 'L' bunch.build.core = core install_board(board_id, bunch, replace_existing=replace_existing)
def install(replace_existing=False): """install stk200 programmer.""" bunch = AutoBunch() bunch.name = 'STK200' bunch.protocol = 'stk200' # bunch.force = 'true' # bunch.delay=200 install_programmer('stk200', bunch, replace_existing=replace_existing)
def install(replace_existing=False): """install dapa programmer.""" bunch = AutoBunch() bunch.name = 'DAPA' bunch.protocol = 'dapa' bunch.force = 'true' # bunch.delay=200 install_programmer('dapa', bunch, replace_existing=replace_existing)
def install(mcu, f_cpu, kbyte): board = AutoBunch() board.name = TEMPL_NAME.format(mcu=mcu, f_cpu=format_freq(f_cpu), upload=upload) board_id = TEMPL_ID.format(mcu=mcu, f_cpu=(f_cpu), upload=upload) board.upload.using = upload board.upload.maximum_size = kbyte * 1024 board.build.mcu = mcu board.build.f_cpu = str(f_cpu) + 'L' board.build.core = core # for 1.0 board.build.variant = 'standard' install_board(board_id, board, replace_existing=replace_existing)
def install_metaboard(replace_existing=False, ): """install metaboard. http://metalab.at/wiki/Metaboard """ metaboard = AutoBunch() metaboard.name = 'Metaboard' metaboard.upload.protocol = 'usbasp' metaboard.upload.maximum_size = '14336' metaboard.upload.speed = '19200' metaboard.build.mcu = 'atmega168' metaboard.build.f_cpu = '16000000L' metaboard.build.core = 'arduino' metaboard.upload.disable_flushing = 'true' board_id = 'metaboard' install_board(board_id, metaboard, replace_existing=replace_existing)
def install_board_with_programmer(mcu, programmer, f_cpu=16000000, core='arduino', replace_existing=False, ): """install board with programmer.""" bunch = AutoBunch() board_id = '{mcu}_{f_cpu}_{programmer}'.format(f_cpu=f_cpu, mcu=mcu, programmer=programmer, ) bunch.name = '{mcu}@{f} Prog:{programmer}'.format(f=strfreq(f_cpu), mcu=mcu, programmer=programmer, ) bunch.upload.using = programmer bunch.build.mcu = mcu bunch.build.f_cpu = str(f_cpu) + 'L' bunch.build.core = core install_board(board_id, bunch, replace_existing=replace_existing)
def install( board_id='atmega88', mcu='atmega88', f_cpu=20000000, upload='usbasp', core='arduino', replace_existing=True, ): """install atmega88 board.""" board = AutoBunch() board.name = TEMPL.format(mcu=mcu, f_cpu=f_cpu, upload=upload) board.upload.using = upload board.upload.maximum_size = 8 * 1024 board.build.mcu = mcu board.build.f_cpu = str(f_cpu) + 'L' board.build.core = core # for 1.0 board.build.variant = 'standard' install_board(board_id, board, replace_existing=replace_existing)