Comments (8)
1:AWorks的最新版本我们没有对外发布,而且工程结构会比较复杂,
建议看AWTK在rt1052裸系统移植会比较简单
https://github.com/zlgopen/awtk-easyarm-rt1052-raw/tree/master/middleware/awtk-rt1052-raw
2:应该是交叉编译器的路径没有设置好
执行build_lib.py之前要先执行 copy_file.py,然后修改 build_lib.py 的文件路径配置
- GCC_PATH对应gcc交叉编译器路径
- ARMCC_PATH对应keil交叉编译器路径
GCC_PATH = r"D:\eclipse_neon_2016q3_x86\GNU Tools ARM Embedded\2016q3\bin;"
ARMCC_PATH = r"C:\Keil_v5\ARM\ARMCC\bin;"
AWTK_ROOT = './output/awtk'
目前build_lib.py不支持其他编译器,但可以自己修改SConstruct支持其他编译器(主要是配置编译参数)
3:同问题2
4:scons.bat是安装好 scons-3.0.1 后就会有,用于构建源码(scons是类似makefile的工具)
如果不想用build_lib.py和scons,也可以用传统的方法:
- 执行copy_file.py后,把output里面的文件加入到工程里编译
- 注意要在工程里加入HAS_AWTK_CONFIG宏以及include路径
from awtk-aworks-rt1052.
@soyzhc
多谢回复。
这个build_lib.py用了GCC和ARMGCC,编译库的话都需要两个吗?还是其他原因?
目前代码适配工作快结束了,在学习AWTK的编译。ESP32使用的是xtensa的xtensa-esp32-elf-gcc编译器,我想通过库的形式来处理,用源码的话需要写一个复杂的编译文件(ESP32开发的编译系统)。对于ESP32这样的gcc 需要修改哪些SConstruct配置?
from awtk-aworks-rt1052.
不是,同时编译两种库主要是这两种开发环境比较常见,有些用户喜欢用keil,有些会用eclipse,他们可以选择用其中一种
你可以参照上面gcc的脚本去写你自己的编译器,主要是这两个文件:build_lib.py、SConstruct
修改这个函数里面的一些参数,比如 CPU_FLAGS
def mk_gcc_environment():
具体要改的脚本你要自己看一下,需要知道python语法以及scons
from awtk-aworks-rt1052.
@soyzhc
d:\awtk>cd awtk-aworks-rt1052
d:\awtk\awtk-aworks-rt1052>python build_lib.py
scons: Reading SConscript files ...
running with -j 4
scons: done reading SConscript files.
scons: warning: you do not seem to have the pywin32 extensions installed;
parallel (-j) builds may not work reliably with open Python files.
File "C:\Python27\Scripts\scons.py", line 204, in <module>
scons: Building targets ...
CXX output\awtk\3rd\agge\agge\math.cpp
CXX output\awtk\3rd\agge\agge\stroke.cpp
CXX output\awtk\3rd\agge\agge\stroke_features.cpp
CXX output\awtk\3rd\agge\agge\vector_rasterizer.cpp
'armcc' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
scons: *** [output\awtk\3rd\agge\agge\math.o] Error 1
'armcc' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
s'armcc' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
cons: *** [output\awtk\3rd\agge\agge\stroke.o] Error 1
scons: *** [output\awtk\3rd\agge\agge\stroke_features.o] Error 1
'armcc' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
scons: *** [output\awtk\3rd\agge\agge\vector_rasterizer.o] Error 1
scons: building terminated because of errors.
编译1050的库的时候,这个错误有遇到过吗?
我有看到一个李工写的说明,https://github.com/zlgopen/awtk-scons-armcc/blob/master/docs/build_awtk_with_scons_and_armcc.md, 但是不知道是不是同一个问题。
from awtk-aworks-rt1052.
应该是找不到armcc的编译器
如果你没有使用keil的需求,可以不编译ARMCC的版本的,在 build_lib.py 把下面代码删除就可以
#ARMCC
os.environ['Path'] = ARMCC_PATH + os.environ['Path']
scons_armcc_cmd = []
scons_armcc_cmd.append('scons.bat')
scons_armcc_cmd.append('COMPILER_TOOLS=armcc')
scons_armcc_cmd.append('AWTK_LIB_NAME=' + AWTK_ARMCC_LIB_NAME)
p_armcc = subprocess.Popen(scons_armcc_cmd)
p_armcc.wait()
if p_armcc.returncode == 0:
shutil.move(AWTK_ARMCC_LIB_NAME,OUTPUT)
scons_armcc_cmd.append('-c')
p_clean = subprocess.Popen(scons_armcc_cmd)
p_clean.wait()
else:
sys.exit(1)
这里编译lib的方法并没有参考awtk-scons-armcc
from awtk-aworks-rt1052.
MAC 和ubuntu runpython build_lib.py
出现错误
Traceback (most recent call last):
File "build_lib.py", line 65, in <module>
main();
File "build_lib.py", line 33, in main
p_gcc = subprocess.Popen(scons_gcc_cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error
from awtk-aworks-rt1052.
@soyzhc
我先用源码编译成功了,编库的问题你们改好了我再试。
现在跑起来遇见一个问题,en_US 的assets没被load,未定义WITH_FS_RES ,locale_info_change
提示ATWK: !!!Asset [name=en_US type=strings] not exist!!!
, 代码中不定义WITH_FS_RES
assets_manager_load
走的下面分支,一直拿不到assets呀,是哪里理解不对么?
#else
asset_info_t* assets_manager_load(assets_manager_t* am, asset_type_t type, const char* name) {
(void)type;
(void)name;
return NULL;
}
#endif /*WITH_FS_RES*/
from awtk-aworks-rt1052.
build_lib.py 已经改好兼容linux, 具体使用方法见本仓库的 BUILDLIB.md
from awtk-aworks-rt1052.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awtk-aworks-rt1052.