wince7下的串口信息打印函数

【GNSS测试技术(一)】GNSS基础原理介绍 GNSS(全球卫星导航系统)是一种基于卫星信号的定位技术,通过使用分布在地球轨道上的卫星,为用户提供全球范围内的定位、导航和授时服务。 阅读详情

        菜鸟一枚,刚刚开始学wince。最近将串口打印与串口驱动(uart 驱动)给弄混了。现在才弄明白串口打印功能和串口驱动虽然都用了arm芯片上的uart 控制器,但是它们是各自独立的,在不同的地方实现对寄存器的操作。

        串口打印功能:串口信息打印一般使用DEBUGMSG、RETAILMSG、NKDbgPrintfW这三个函数,DEBUGMSG和RETAILMSG是通过调用NKDbgPrintfW来实现的。DEBUGMSG只在DEBUG版本中有效,RELEASE版本中它不起作用。RETAILMSG和NKDbgPrintfW在DEBUG和RELEASE中都有效,但前提是在VS2008的Build Options中关闭ship build,原因将在下面给出。

        platform\common\src\common\boot\blcommon\blcommon.c文件中的BootloaderMain()函数调用OEMDebugInit()实现串口的初始化。

        NKDbgPrintfW调用NKvDbgPrintfW函数,而NKvDbgPrintW函数调用里面调用了OutputNumHex等几个函数,但这些函数最终都是调用了Debugserial.c(不同BSP,文件名可能也不一样)文件中的OEMWriteDebugByte函数,该文件的内容如下所示:

这个文件中的函数都是直接对uart寄存器进行操作的,如在OEMInitDebugSerial函数中就通过寄存器操作实现了对uart的初始化,如下所示:

在第一幅图片中可看到#ifndef SHIP_BUILD这一条代码,而在#else分支下的那几个函数都是一些没有实现具体功能的空函数。这就是为什么如果使能了ship build,则不能使用RETAILMSG和NKDbgPrintfW打印信息的原因。

不同的BSP可能代码位置会有一些差别,但是大体的实现结构应该是差不多的。

【C2000系列DSP的Bootloader详解】如何打包源文件为库文件且加密仅授权使用,一步步教你如何实现 如果想要在 TI 的 CCS 开发环境中为 C2000 系列 MCU 生成 lib 库文件,并对这些库文件进行加密保护,确保只有授权方(持有密钥)才能调用和使用,以此保护源代码的知识产权。 阅读详情

相关推荐

Gazebo仿真UUV水下机器人:从环境搭建到避障算法实战

本文详细介绍了使用Gazebo仿真平台进行UUV水下机器人开发的全流程,涵盖从环境搭建、uuv_simulator配置、传感器集成到核心避障算法实战。通过搭建水下仿真实验室并实现基于激光雷达数据的反应式避障算法,为水下机器人算法验证与开发提供了高效、低成本的解决方案。

weixin_28840591的博客 263

WinCE 中调试串口打印信息的实现介绍

WinCE 中调试串口打印信息的实现介绍

androidfan的专栏 1852

可变形卷积(Deformable Conv)原理解析与torch代码实现

图6为可变形卷积示意图。图1所示为普通卷积在输入特征图上进行卷积计算的过程,卷积核大小为3*3,在输入特征图尺寸为7*7上进行卷积,将卷积核权重与输入特征图对应位置元素相乘并求和得到输出特征图元素,按一定方式滑动窗口就能计算得到整张输出特征图。图6所示,在input feature map上普通卷积操作对应卷积采样区域是一个卷积核大小的正方形(绿框),而可变形卷积对应的卷积采样区域为一些蓝框表示的点,这就是可变形卷积与普通卷积的区别。先来一张图感受一下,图3为标准卷积与可变形卷积的卷积示例。

panghuzhenbang的博客 5万+

wince 串口调试信息输出

不管在WinCE5.0还是在WinCE6.0中,我们在调试驱动或者应用的时候都会用到打印函数。在驱动里面,我们可能会用DEBUGMSG(..),RETAILMSG(..),还有NKDbgPrintfW(..)。在我们使用这些打印函数调试我们的程序之前,我们需要实现串口打印功能。 在WinCE的BSP中,如果想调用DEBUGMSG(..)或者RETAILMSG(..)来从串口打印信息,必须在我们的BSP中的OAL层找到debug.c,在这个文件里面实现下面的4个函数:

menuconfig的专栏 1410

【水文】calico-node 启动失败 Init:CrashLoopBackOff

Defaulted container "calico-node" out of: calico-node, upgrade-ipam (init), install-cni (init), mount-bpffs (init) Error from server (BadRequest): container "calico-node" in pod "calico-node-4j7td" is waiting to start: PodInitializing

大健的日常的博客 1万+

Mac安装Typescript报错

根本原因是系统级目录的权限限制。推荐通过修改目录权限或使用nvm彻底解决问题。

江拥羡橙的博客 210

DEBUGMSG,RETAILMSG,NKDbgPrintfW的实现

从http://blog.youkuaiyun.com/bbw2008/archive/2010/12/20/6087738.aspx里看到:NKDbgPrintfW(..)函数一般只在OAL中使用,可以直接从串口中打印出信息,不受编译选项的影响。DEBUGMSG(..)函数只有在工程在Debug模式下编译以后,才会打印出信息来。如果是在Release模式下编译的,就不会打印信息出 来。RETAILMSG(..)函数在Debug模式下和Release模式下编译都会打印出调试信息,但是如果你在工程的属性中的"Build

iceiilin的专栏 2955

Quartus II编译时出现Error (119013): Current license file does not support the EP4CE6E22C6 device

Quartus II编译时出现Error (119013): Current license file does not support the EP4CE6E22C6 device, Quartus的安装过程不同于ISE/vivado的安装。“Current license file does not support”这种情况多出现在高版本的quartus中综合很久以前的代码,使用很早型号的FPGA或是CPLD。对于这种情况,就得在官网或是其他网站上下载包含所需Device的库文件。

夜半少年的博客 1万+

WinCE中串口通讯的调试方法

      串口是嵌入式系统中应用很广的一种通讯接口。在WinCE中,通常会有一个串口供调试使用,另外的串口可与外围设备连接,如GSM和GPS等模块,以获取相应的信息并进行处理。       在WinCE中,为了使用串口,必须有相应的串口驱动程序,一般在BSP中都有实现。串口驱动是典型的流驱动。应用程序中可通过CreateFile()、ReadFile()和WriteFile()等文件系统的操作...

weixin_33725722的博客 273

YOLOv10改进策略【模型轻量化】| 替换骨干网络为MoblieNetV2,含模型详解和完整配置步骤

本文记录的是。采用深度可分离卷积将标准卷积分解为深度卷积和1×1卷积。同时,引入来,避免非线性层导致的性能下降问题。本文将应用到YOLOv10中,借助其高效的结构和特性,在保持一定精度的前提下,显著降低YOLOv10的计算复杂度和内存占用。

Limiiiing的博客 532

荣耀Magic 6 dToF LiDAR Android阵营全球第一首发

40X30分辨率的BSI SPAD小面阵,帧率达到60帧,搭配多传感器融合算法, 可产生足够的稠密点云,为应用设备提供可靠的距离传感。在手机消费电子方案中,dToF LiDAR技术不仅提升了手机的功能和用户体验,还为手机厂商提供了差异化的竞争优势。随着技术的不断进步和市场的快速发展,我们可以期待未来dToF LiDAR技术将在手机领域发挥更大的作用,为用户带来更多创新和便捷的功能。增强现实(AR)体验:通过dToF LiDAR提供的高精度深度信息,手机可以更准确地放置虚拟物体在现实世界的表面上。

致力于lidar应用开发 19万+

wince串口打印信息的屏蔽与打开

如果想某个驱动打印debug的信息,那么请这么做:第一种: 将下面这句代码加入到驱动所在目录中的sources文件中即可: CDEFINES=$(CDEFINES) -DDEBUG 第二种 #undef DEBUGMSG #define DEBUGMSG(x,s) NKDbgPrintfW s 这样这个驱动文件里的所有调试信息都会打印出来,并且不理会DebugZone的设置。       如果想屏蔽某个驱动的所有打印信息怎么办?在驱动前面加入如下宏定义即可#define SHIP_BUILD  1#ifde

JXES智能生态系统 3022

Q3D提取PCB走线RLCG参数

介绍一种提取PCB走线寄生电容和寄生电感的方法

sinat_15150363的博客 2917

OutputDebugString, NKDbgPrintfW

如何调试Win32程序 方法一:使用OutputDebugString函数 函数的原型如下: void OutputDebugString(     LPCTSTR lpOutputString ); 该函数会输出信息到系统的DEBUGER,输出结果可以使用工具DebugView观察。因为OutputDebugString的参数是字符串,而我们在实际使用过程中通常希望能像printf一

点滴成长路 1212

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

RETAILMSG 的定义与实现

RETAILMSG 的定义与实现   --作者:赖玉平(auly)aulyp@163.com       在PUBLIC下面,很多地方是用不了RETAILMSG来打印信息,因为它取而代之的是DEBUGMSG,但是,如果我们不编译debug版本的话,这个打印函数又是不起作用的。如果想用使用RETAILMSG,就得自已定义了。例如在GPE里面,就没有对RETAILMSG的支持。我们可以自

4767

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

开发驱动时用到的内核打印函数KdPrint 的使用方法

转载自: http://blog.youkuaiyun.com/wjcsharp/article/details/6161712   DbgPrint会发送一个消息给内核调试器。 DbgPrint and DbgPrintEx can be called at IRQL. However, Unicode format codes (%wc and %ws) can be used only a

chenyujing1234的专栏 1万+

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

WinCE串口编程API函数

1.打开串口 HANDLE CreateFile(      LPCTSTR lpFileName,      DWORD dwDesiredAccess,      DWORD dwShareMode,      LPSECURITY_ATTRIBUTES lpSecurityAttributes,      DWORD dwCreationDisposition,  

tanzhongqiao的专栏 1091

加了几个RETAILMSG调试信息打印函数,导致异常。

作者:wogoyixikexie@gliet 2008-11-24Data Abort: Thread=98ca1000 Proc=81d26340 device.exeAKY=00000005 PC=02dd1250(nleddrvr.dll+0x00001250) RA=02dd13cc(nleddrvr.dll+0x000013cc) BVA=06000064 FSR=0000000

gooogleman#foxmail.com 1960

DebugView for Vista Windows 7 打印显示问题

使用DebugView打印内核调试信息是开发驱动的非常重要的手段,但DebugView在VISTA/WINDOWS 7下却无法获取内核的调试日志,修改方法是:     HKLM/SYSTEM/CurrentControlSet/Control/Session Manager,打开或者创建子项Debug Print Filter,然后新建一个DWORD值DEFAULT,将其设置成0xF,重启即可。

chenyujing1234的专栏 1751

串口驱动打印机程序_如何安装爱普生打印机驱动程序

本文主要帮助大家安装此驱动程序并成功进行打印纸张的操作步骤,步骤不是特别繁琐,本方法特点在于不需要大家网上进行下载驱动程序进行安装,完全取决于win7系统自带功能进行安装即可,非常方便,而其他系统可进行参照使用,希望能帮到大家。1、以windows系统为例。在桌面左下角位置选择开始菜单,其中选择设备和打印机并点击,如下图所示。2、打开设备和打印机后,其中选择添加打印机并点击,如下图所示。...

weixin_30315507的博客 4084

Windows 驱动:像 DbgPrintf 一样将调试信息输出到文件

运用的技术跟应用层大体一致,倒是互斥的问题干扰我很久。已开始使用的是 FastMutex,但是它会提升 IRQL 到 APC_LEVEL,显然写文件的服务函数都只能跑在PASSIVE_LEVEL 下,最后只好使用了 Event 。示例代码说明:GetCurrentTimeString() 详见前文:Windows 驱动中获取系统当前时间,生成格式字符串GetCurrentProces

IamRainLiang的专栏 5654

Windows Embedded CE 7串口通信应用程序实例(上)

本章将介绍WindowsEmbeddedCE7.0的串口通信。一些基于WindowsCE的设备可以与其他计算机、打印机、调制解调器,或全球定位系统(GPS)卫星通信由串行连接方式。 串行I/O是WindowsCE支持的最简单的通信方式。两个设备之间建立一个直接的、一对一的连接。串行I/O可以通过多种方式的硬件连接,但是,大多数基于WindowsCE的设备...

weixin_33973609的博客 170

建立VS2008到运行wince7系统的远程调试

电脑环境:win7系统 + VS2008 + WindowsEmbeddedCompact7 + zc702的SDK 开发板:运行wince7的zc702开发板   步骤: 1、开发板接上网线,使用DHCP自动获取IP地址(IP地址要跟电脑的IP地址在同一网段) 2、打开VS2008,建立一个基于zc702的SDK的应用程序(要先安装zc702的SDK,基于此SDK生成的应用程序才能

EmSoftEn的专栏 2926

wince7下如何添加一个新的驱动程序

在wince7中添加一个新驱动程序的步骤:(以一个简单的led驱动为例) 1、在Solution Explorer窗口中右击platform\ZYNQ7000\src\DRIVERS目录,然后选择Add->New Sources Subproject,在弹出的Subproject Wizard对话框中选择WCE Dynamic-Link Library,并将Subproject name设置为L

EmSoftEn的专栏 2505

wince7中实现对中文的支持

目的:使wince7系统能支持显示中文 步骤: 1、在Catalog Items View窗口中勾选如下组件    在Core OS->Windows Embedded Compact->Fonts->Scripts->Chinese(Simplified)中选择SimSun & NSimSun。    在Core OS->Windows Embedded Compact->Interna

EmSoftEn的专栏 2453
上一篇: 编译ZedBoard的devicetree.dtb
下一篇: wince7BSP开发中的编译命令选择
EmSoftEn
博客等级 码龄12年 40粉丝 63原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值