def run_avr_elf(elf_file, mcu = 'atmega2560', f_cpu = 16000000): print "Running simulation with ... " + elf_file simulation = ArduinoSim(external_elf=elf_file, mcu = mcu, f_cpu=f_cpu, timespan=7, fps=20, ) output = simulation.get_serial() print output
for source in sources: print ' '+source print '-------------------------------------------------------------------' print cc.command_list(sources) error = False try: cc.build(sources = sources) except: error = True print cc.error_text # run the project for 5 seconds if not error: print 'Temporary output file \n' + ' ' + cc.output size = cc.size() print '-------------------------------------------------------------------' print 'Program size \n program =' , str(size.program_bytes).rjust(8), \ '\n data =', str(size.data_bytes).rjust(7) print '-------------------------------------------------------------------' simulation = ArduinoSim(external_elf=cc.output, mcu = mcu, f_cpu=f_cpu, timespan=5, fps=20, ) output = simulation.get_serial() print output print "Aus Maus"