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

怎么网站推广线上推广计划

怎么网站推广,线上推广计划,wordpress doaction,网站权限怎么设置背景 之前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.15wanjia.com/news/177974.html

相关文章:

  • 昆山推广用什么网站比较好国内大的做网站的公司
  • 营销型集团网站建设做美食推广的网站
  • 360建站工具试述网站建设的流程
  • 智能建站系统的建站步骤手机评分网站
  • 东莞网站建设 旅游ui设计主要是做什么的
  • .net网站开发面试个人介绍网页设计作品
  • 南宁企业网站建设制作超链接html代码
  • 电子商务网站建设方案书外贸网站哪家好
  • 有没有学做ppt发网站或论坛南京专业网站优化公司
  • 学做课件的网站做家务的男人们在哪个网站播出
  • 建设网站可以先买域名吗wordpress page style
  • 广东网站建设哪里有今天的新闻主要内容
  • 给城市建设提议献策的网站建设一个网站大概费用
  • 公司网站建设论文结束语公司装修费用会计分录
  • 做网站后期续费是怎么算的汕头网站建设小程序
  • 手机网站后台源码网站做投票
  • Python能开发WordPress女生做seo网站推广
  • 网站关键词优化原理电商网站开发背景怎么写
  • 个人网站做seo写一个网页需要什么技术
  • 哪个网站有上门做指甲制作招聘网页
  • 网站建设dns解析设置云南建设项目招标公告发布网站
  • 爱站数据金蝶在线登录入口
  • 如何绑定网站域名wordpress 仿站
  • 无锡网站制作优化推广公司中卫网站设计公司排名
  • 海洋网站建设网络公司老榕树建站软件
  • 没有备案的网站怎么访问营销型网站建设定制网站建设
  • 彩票网站怎么做代理网站模板的缺点
  • 企业网站建设步骤网站运营推广公司
  • 网站备案密码重置申请表wordpress数据清除缓存
  • 域名已有服务器也有怎么做网站开发网站如何选需要注意什么