当前位置: 首页 > news >正文

贵阳市网站优化软文营销的技巧有哪些

贵阳市网站优化,软文营销的技巧有哪些,如何把网页做成app,汉中市疫情防控指挥部背景 之前wiki 14、【OS】【Nuttx】Nsh中运行第一个程序 都是用 make 构建,准备切换 cmake 进行构建,方便后续扩展开发 Nuttx cmake 适配 nuttx项目路径下输入 make distclean,清除之前工程配置 adminpcadminpc:~/nuttx_pdt/nuttx$ make …

背景

之前wiki
14、【OS】【Nuttx】Nsh中运行第一个程序
都是用 make 构建,准备切换 cmake 进行构建,方便后续扩展开发

Nuttx cmake 适配

nuttx项目路径下输入 make distclean,清除之前工程配置

adminpc@adminpc:~/nuttx_pdt/nuttx$ make distclean

接着输入 cmake 构建命令,发现没找到 python3-kconfiglib, 该库用于解析和操作 Linux 内核配置系统(Kconfig),可以让用户通过 python 实现和 Kconfig 文件的交互

adminpc@adminpc:~/nuttx_pdt/nuttx$ cmake -S . -B build -DBOARD_CONFIG=sim:myapp
CMake Error at CMakeLists.txt:88 (message):Kconfig environment depends on kconfiglib, Please install:$ sudo apt install python3-kconfiglib-- Configuring incomplete, errors occurred!

安装,发现已经安装过,但还是显示找不到该库

adminpc@adminpc:~/nuttx_pdt/nuttx$ sudo apt install python3-kconfiglib
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-kconfiglib is already the newest version (14.1.0-3).
0 upgraded, 0 newly installed, 0 to remove and 258 not upgraded.

查看报错原因,发现和 olddefconfig 脚本找不到有关

在这里插入图片描述
输入命令 dpkg -L python3-kconfiglib,查看 kconfiglib 库的位置,可以找到该脚本

adminpc@adminpc:~/nuttx_pdt/nuttx$ dpkg -L python3-kconfiglib

在这里插入图片描述
查看该文件权限,发现没有可执行权限,很明显这个 olddefconfig.py 就是个库文件,不是用来做可执行文件的,所以得在外面做一层封装
在这里插入图片描述
查看 nuttx_kconfig.cmake 脚本,可发现把 olddefconfig 和 setconfig 作为了可执行脚本进行使用
在这里插入图片描述

将这俩 py 文件封装成可执行的 shell 脚本,在 bash 中输入如下命令,将在 /usr/local/bin 目录下,生成两个可执行脚本,这俩可执行脚本指向 kconfiglib 库

sudo tee /usr/local/bin/olddefconfig >/dev/null <<EOL
#!/bin/sh
exec python3 /usr/lib/python3/dist-packages/olddefconfig.py "\$@"
EOL
sudo chmod +x /usr/local/bin/olddefconfig
sudo tee /usr/local/bin/setconfig >/dev/null <<EOL
#!/bin/sh
exec python3 /usr/lib/python3/dist-packages/setconfig.py "\$@"
EOL
sudo chmod +x /usr/local/bin/setconfig

另外,为了防止 find_program 找不到该可执行文件,可直接指定路径

find_program(KCONFIGLIB /usr/local/bin/olddefconfig)

Nuttx app cmake 适配

这里基于之前wiki已经配置好的工程,不熟悉的可参考
15、【OS】【Nuttx】OS裁剪,运行指定程序,周期打印当前任务

在 nuttx-app 路径下添加 myapp 路径
在这里插入图片描述
myapp路径下新建CMakeLists.txt文件,输入内容,并修改 Kconfig,添加 cmake 配置
在这里插入图片描述

// CMakeLists.txt
if(CONFIG_MYAPP)nuttx_add_application(NAME${CONFIG_MYAPP_PROGNAME}SRCSmyapp_main.cSTACKSIZE${CONFIG_MYAPP_STACKSIZE}PRIORITY${CONFIG_MYAPP_PRIORITY})
endif()
# Kconfig
config MYAPPbool "My Application"default nhelpThis is a description of your applicationif MYAPPconfig MYAPP_PROGNAMEstring "Program name"default "myapp"---help---This is the name of the program that will be used when the NSH ELFprogram is installed.config MYAPP_PRIORITYint "myapp task priority"default 100config MYAPP_STACKSIZEint "myapp stack size"default DEFAULT_TASK_STACKSIZEendif

执行 cmake 构建

配置 cmake 工程

adminpc@adminpc:~/nuttx_pdt/nuttx$ cmake -S . -B build -DBOARD_CONFIG=sim:myapp
-- Initializing NuttXSelect HOST_LINUX=ySelect HOST_X86_64=y
--   CMake:  3.28.3
--   Board:  sim
--   Config: myapp
--   Appdir: /home/adminpc/nuttx_pdt/nuttx-apps
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (2.2s)
-- Generating done (0.3s)
-- Build files have been written to: /home/adminpc/nuttx_pdt/nuttx/build

执行cmake构建

cmake --build build/

构建成功
在这里插入图片描述
build目录下出现熟悉的身影
在这里插入图片描述
可以正常执行
在这里插入图片描述

http://www.tj-hxxt.cn/news/56032.html

相关文章:

  • 重庆南岸营销型网站建设公司哪家好知乎关键词搜索
  • wordpress设置视频宽度seo外包方法
  • 网络架构分析网站seo关键词优化技巧
  • 专业做营销网站建设宁波seo怎么做引流推广
  • 在线做插画的网站seo诊断优化方案
  • 做喷绘的图在哪个网站找网站建设建站在线建站
  • 个人求职网站设计现场直播的视频
  • b2b网站做水处理哪个好百度seo优化技术
  • 南京网站设计与制作软文街怎么样
  • 深圳龙华做网站seo站长查询
  • wordpress培训类网站模板seo关键词排名优化要多少钱
  • 湖南做网站的公司有哪些天津seo外包团队
  • 关于做面包的网站济南网络推广网络营销
  • 手机软件编程seo网站优化
  • 什么叫营销型网站建设seo优化专员招聘
  • 什么网站做前端练手好竞价托管信息
  • 才艺多网站建设公司百搜科技
  • 松山湖网站建设公司目前病毒的最新情况
  • 顺德网站建设报价如何seo搜索引擎优化
  • 做网站好的公司有哪些知名网站排名
  • 广州建站软件百度公司官网招聘
  • 门户网站 布局seo经典案例分析
  • wordpress搭建网站在线服务器网站
  • 烟台网站设计公司推荐网址百度刷排名
  • win2003 网站服务器网络促销的方法有哪些
  • 做门窗五金的网站产品市场营销策划书
  • 备案价格网站域名注册查询软件
  • 网站建设云平台企业网站推广注意事项
  • 彩票网站做代理乐陵seo外包
  • 网站管理 设置开启seo推广一年要多少钱