代码拉取完成,页面将自动刷新
同步操作将从 bernard/rtthread-esp-idf 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import os
import sys
import rtconfig
if os.getenv('RTT_ROOT'):
RTT_ROOT = os.getenv('RTT_ROOT')
else:
RTT_ROOT = os.path.normpath(os.getcwd() + '/rt-thread')
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
from building import *
IDF_PATH = os.path.normpath(os.getcwd() + 'idf-esp32')
TARGET = 'rtthread.elf'
convert = 'python esp-idf-port/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 elf2image --flash_mode "dio" --flash_freq "40m" --flash_size "4MB" -o $TARGET $SOURCE'
cvt= Builder(action = convert)
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
env.Append(BUILDERS = {'ConvertELF': cvt})
env['ASCOM'] = env['ASPPCOM']
Export('RTT_ROOT')
Export('rtconfig')
# env['LINKCOM']=env['LINKCOM'].replace("$_LIBFLAGS","-Wl,--start-group $_LIBFLAGS -Wl,-end-group")
# print(env['LINKCOM'])
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=True)
# make a building
program = DoBuilding(TARGET, objs)
obj_files = []
for item in program:
for child in item.all_children():
if child.has_builder():
file_ln = str(child)
file_ln = file_ln.replace('\\', '/')
# print(file_ln)
obj_files.append(file_ln)
obj_files.sort()
link_file = open('link.txt', 'w')
for item in obj_files:
link_file.write(item + '\n')
link_file.close()
env['LINKCOM']= '$LINK -o $TARGET esp-idf-port/windowspill_asm.o esp-idf-port/save_extra_nw.o esp-idf-port/restore_extra_nw.o $LINKFLAGS $__RPATH $_LIBDIRFLAGS $_LIBFLAGS @link.txt'
binfile = env.ConvertELF('rtthread.bin', TARGET)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。