- 博客(47)
- 资源 (1)
- 收藏
- 关注

原创 QNX系统将C/C++代码编译为lib***.so文件
编译步骤:先将文件编译为 ***.o 文件: 将代码文件放入某个能够编译的文件夹内,make后即可生成 ***.o文件;将 ***.o 文件编译为 so: textService\arm\o-le-v7#C:/qnx660/host/win32/x86/usr/bin/arm-unknown-nto-qnx6.6.0eabi-ld -shared ***.o -...
2019-12-17 20:25:03
1346
原创 lvgl把素材制作为bin文件并更新到emmc
点击确定后,会在GUI GUIDER工程目录下生成mergeBinFile.bin,然后把这个bin文件重新名为图片的名字,比如上述图片名字为:led_Daytime_green.png,则bin文件命名为:led_Daytime_green.bin(命名无强制要,只是为了便以追溯素材)boevxa_dat.img路径:e3340\prebuilts\fat。
2024-03-19 15:42:21
548
原创 开阳630hv100的代码编译以及软件制作步骤
编译完成后,软件路径:amt630hv100-freertos\proj\AWTK\Exe。把rommaker.exe拷贝到res目录下,双击就能生成rom.bin。选中awtk工程,先编译一次awtk sdk(如下图的3和4步骤);使用升级包制作工具制作update.bin。编译项目代码(如下图步骤5和6);删除inc后缀文件;
2024-02-01 13:52:36
1119
2
原创 芯驰E3340软件编译以及更新步骤
编译出来的软件包:e3340\boards\e3_324_ref_display\proj\jetour-t1n-fl3\ ospi_e3_324_ref_display.pac。东南项目:e3340\boards\e3_324_ref_display\proj\jetour-t1n-fl3\bootloader\SES。东南项目:e3340\boards\e3_324_ref_display\proj\jetour-t1n-fl3\sf\SES。
2024-01-22 18:31:46
871
原创 (qnx系统)HAM在实际场景中的实例
QNX-HAM实现实例chdl = ham_condition(ehdl,CONDDEATH, "death", HREARMAFTERRESTART);ahdl = ham_action_restart(chdl, "restart", path, HREARMAFTERRESTART);
2022-09-09 10:21:24
929
原创 将开发板的usb配置为ncm网口(qnx系统)
io-usb-otg -d dcd-usbncm-sdx9-dwc3 ioport=0x48080000,irq=100
2022-05-19 13:49:20
1657
转载 SecureCRT工具关键字高亮
转载自:https://jingyan.baidu.com/article/948f5924ceffbdd80ff5f9b9.html 进入SecureCRT->选项->全局选项 找到配置文件路径,如下图,我的配置文件在C:\Users\Administrator\AppData\Roaming\VanDyke\Config目录下 如以上路径被隐藏,可在组织->文件夹和搜索选项->查看->高级设置中,勾选“显示隐藏的文件、文件夹和驱动”
2021-03-18 13:39:30
8171
原创 函数参数设置默认值的用法
如果未传递参数的值,则会使用默认值,如果指定了值,则会忽略默认值#include <iostream>using namespace std; int sum(int a, int b=20){ int result; result = a + b; return (result);} int main (){ // 局部变量声明 int a = 100; int b = 200; int result; // 调用函
2020-12-24 13:25:23
1089
原创 C++常见问题
error: 'HandleModuleClass' does not name a type两个头文件相互应用会导致一个头文件你的类型无定义问题。
2020-08-31 20:07:54
482
原创 通过ping 命令源码获取网络状态
通过裁剪ping命令的源码,实现获取网络状态;ping通,则表示网络状态OK,ping不通,则表示网络状态ERROR:/* 使用ping 命令源码判断网络状态是否OK*/#include <sys/time.h>#include <netinet/ip_icmp.h>#include <arpa/inet.h>#include <netd...
2020-02-17 17:28:28
415
原创 recv函数的返回值梳理
默认 socket 是阻塞的 解阻塞与非阻塞recv返回值没有区分,都是<0 出错; =0 连接关闭; >0 接收到数据大小;特别:只是阻塞模式下recv会阻塞着接收数据,非阻塞模式下如果没有数据会返回,不会阻塞着读,因此需要循环读取。返回说明:成功执行时,返回接收到的字节数; 另一端已关闭则返回0; 失败返回-1; 返回值<0时并且(errno == ...
2019-12-20 22:10:34
766
原创 QNX系统获取PPS属性值
/***************************************************************** /pps/huizhou/Info/Speed* speed:json:{"status":0,"unint":0,"value":0}* 以下代码是为了获取 value 的值*************************************...
2019-12-19 15:46:06
2198
5
原创 goto实例
#include<stdio.h>int test_test(){ printf("call test_test()\n"); return 0;}int main(){ int Ret = 0; int value = 1; if(0 == value) { printf("value is 1\n"); goto EXIT; } Ret = ...
2019-12-18 13:51:54
513
原创 函数内部定义的局部变量与全局变量重名
/**********************************************************************************************************函数内部定义的局部变量与全局变量重名时,函数在使用该变量的时候会以局部变量覆盖全局变量,也就是只有局部变量会起效果。********************************...
2019-04-20 14:26:04
10403
原创 Linux下计算程序的运行时间间隔
/*clock计算的是程序的时间间隔,gettimeofday计算的是当前程序运行到此函数的时刻*/#include <stdio.h>#include <stdlib.h>#include <time.h>#include <sys/time.h>#include <unistd.h>void hello_world(v...
2019-04-18 10:25:55
743
原创 QNX获取PPS数组里某个值(ascii码转换为字符串)
int main(){ int i = 0; int fd = -1; int index = 0; int version = 0; char buffer[1024]; pps_decoder_t decoder; uint8_t str_sw[9]; uint8_t str_hw[9]; uint8_t iData[24]; memset(str_sw, 0x0, s...
2019-04-10 10:47:09
1028
原创 监测pin脚gpio7_26的电平status
#include <stdlib.h>#include <stdio.h>#include <hw/inout.h>#include <sys/mman.h>#define GPIO_DATAIN 0x138#define SPI_MEM_SIZE 0x1000#define DRA72X_GPIO7_B...
2019-03-28 12:06:35
400
原创 static修饰局部变量,该变量初始化只在程序初次运行时执行一次,且只执行一次
/*静态局部变量在函数内定义 它的生存期为整个源程序,但是其作用域仍与自动变量相同,只能在定义该变量的函数内使用该变量。退出该函数后, 尽管该变量还继续存在,但不能使用它*/int test_function_static(){#define FILE_IDLE 0#define FILE_BUSY 1 static int a = 0; static int fopen_flag...
2019-03-17 20:05:53
4229
原创 ASCII 十进制输出字符
#include <stdlib.h>int main(){ int a = 46; int b = 58; int c1 = 65; int c2 = 66; printf("%c, %c\n", a, b); printf("%c, %c\n", c1, c2); return 0;}/**************...
2019-03-08 15:40:48
866
原创 数据帧接收解析及拼帧
#include <stdio.h>#define DATA_BUFF_SIZE (1024*60)#define MAX_MESSAGE_LEN 4static unsigned char RXBUFF[MAX_RXBUFF_SIZE] = { 0 };typedef struct { unsigned char Frame_header[MAX_ME...
2018-10-27 18:11:29
3598
原创 PPS的发送端实现(实例)
void Pps_Send_voicestatus_info(int data_type, int status){ int fd = 0; struct stat stat_buf; pps_encoder_t encoder; unsigned char ucIsPPSRunning = FALSE; unsigned char ucIsFileOpenSuccess = FA...
2018-10-12 08:12:57
1103
原创 启动模块耗时时长打印
修改bootargs chosen { bootargs = "console=ttyS2,115200n8 printk.time=1 initcall_debug elevator=noop root=/dev/mmcblk0p1 ro rootwait earlyprintk fixrtc omapdrm.num_crtc=2 c...
2018-09-21 18:04:57
766
原创 驱动初始化分解
module_i2c_driver(tlc59108_i2c_driver);可分解为下列形式:static int __init tlc59108_i2c_driver_init(void){ return i2c_register_driver(THIS_MODULE, &tlc59108_i2c_driver);}late_initcall(tlc59108_i2c...
2018-06-12 19:01:09
286
原创 进程1:由进程ID获取进程名字
#define SVP_RCHMI_PROCESS_NAME "rc_hmi"static pid_t process_pid = 1000;int main(){ FILE *fp_handle; SVPChar buf[128] = {'\0'}; SVPChar cmd[128] = {'\0'}; SVPChar dest_path[1
2017-09-07 16:40:57
873
原创 由进程名字获取进程 ID
pid_t getProcessPidbyName(char *name){ FILE *fptr; char *buf = new char[255]; char cmd[255] = {'\0'}; pid_t pid = -1; sprintf(cmd,"pidof %s",name); if((fptr = popen(cmd,"r")) !
2017-09-01 17:52:03
1340
原创 关联容器map实例
/*编译: g++ -o map map.cpp */#include<map>#include<cstring>#include<iostream>typedef std::map<int, std::string> UDT_MAP_INT_CSTRING;UDT_MAP_INT_CSTRING enumMap;int main(){ /*数组方式插值:如果元素是类对象,则开销
2017-07-08 16:31:32
271
原创 关联容器map用法实例
三种插入方式: 2.1.1用insert方法插入 pair 对象: enumMap.insert(pair<int, Cstring>(1, “One”)); 2.1.2 用insert方法插入 value_type 对象: enumMap.insert(map<int, Cstring>::value_type (1, “One”)); 2.1.3 用数组方式插入值: enumMap[
2017-07-08 15:27:29
300
原创 等待超时实现简单方法
#include <stdio.h>#include <sys/types.h> #include <sys/stat.h>#include <fcntl.h>#define MAX_PATH 2048#define TMP_RUN_PATH "/tmp/run"#define WAIT_TIMEOUT_MAX
2017-06-16 20:42:13
1981
原创 CentOS7下内核源码下载及编译步骤
验证网络情况:yum install安装需要的软件:yum install setools-consoleyum install httpdyum install policycoreutils-python setools-consoleyum -y install vsftpd ftpyum install m4yum -y install gcc安装内核编译的软件:yum
2017-05-11 14:45:15
6882
原创 工作笔记
do{ printf("%s.%d you come here , input g \n", __FUNCTION__, __LINE__); if (getchar() == 'g') { break; }}while(1);svn copy svn路径 tag路径 -m "[BUGID]无[问题描述] 提交stbid.bin文件制作方法说明步骤
2017-03-20 18:56:44
836
原创 折中查找(二分查找)
#include <stdio.h>#define n 10int main(){ int left = 0; int right = n-1; int a[n]; int i, mid, key; printf("input the key number\n"); scanf("%d",&key); printf("input ten
2017-03-16 14:45:25
1226
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人