明天开始就要赶一个项目了,可能要过段时间再搞,先把目前的阶段总结一下。
1. 参考文献
这里推荐两个博主,我基本是参考他们的博客:
- https://blog.csdn.net/xiao2yizhizai/article/details/54375366
- https://blog.csdn.net/yt454287063
2. 目前做的工作
- 下载nuttx,包括下载nuttx,app,tools
- 查看芯片的型号,和readme文件
- 了解如何配置.config文件,以及如何查找并修改某个参数
- 构建基础环境
3.遇到的问题
- 关于install kconfig 时出现的问题
此时我已经执行到博主Godenfreemans的第二章的内容. 出现一样没有配置kconfig的问题,这时候报错是
/bin/mkdir -p ‘/usr/local/lib’
/bin/bash ./libtool --mode=install /usr/bin/install -c libs/parser/libkconfig-parser.la ‘/usr/local/lib’
libtool: install: /usr/bin/install -c libs/parser/.libs/libkconfig-parser-4.11.0.so /usr/local/lib/libkconfig-parser-4.11.0.so
/usr/bin/install: cannot create regular file ‘/usr/local/lib/libkconfig-parser-4.11.0.so’: Permission denied
Makefile:990: recipe for target ‘install-libLTLIBRARIES’ failed
make[2]: *** [install-libLTLIBRARIES] Error 1
Makefile:1924: recipe for target ‘install-am’ failed
make[1]: *** [install-am] Error 2
Makefile:1918: recipe for target ‘install’ failed
make: *** [install] Error 2
查阅资料得知要用管理员权限。执行
sudo make install
- 出现关于kconfig-mconf的问题
然后虽然安装好啦,但是提醒我如果想在一个特定的文件夹执行,我需要怎么做,参考如下:
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the ‘-LLIBDIR’
flag during linking and do at least one of the following:
- add LIBDIR to the ‘LD_LIBRARY_PATH’ environment variable
during execution- add LIBDIR to the ‘LD_RUN_PATH’ environment variable
during linking- use the ‘-Wl,-rpath -Wl,LIBDIR’ linker flag
- have your system administrator add LIBDIR to ‘/etc/ld.so.conf’
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
然后会出现这个问题:
kconfig-mconf: error while loading shared libraries: libkconfig-parser-3.12.0.so: cannot open shared object file: No such file or directory
按照另一博客,是由于路径没有包含的原因。
3. 接下来的工作
虽然后面要过一段时间再弄,还是想计划一下:
- 先完成stm31f103zet6的系统适配,熟悉底层硬件驱动如何执行。
- 熟悉cmake环境,研究pixhawk代码如何让执行
- 将之前的工作移植到f4单片机或者飞思卡尔的单片机
预计完成时间:10月底