gnu

How do I escape a double quote with GNU grep for windows/dos?

谁说胖子不能爱 提交于 2019-12-07 01:02:59
问题 I'm trying to search for Assembly="Foobar in all files and direct the output to tmp.txt I've tried (cmd/error) grep -r "Assembly=\"Foobar" . >> tmp.txt error (invalid argument) grep -r "Assembly=""Foobar" . >> tmp.txt error (not enough space) grep -r 'Assembly="Foobar' . >> tmp.txt error (not enough space) very frustrating. Any suggestions? 回答1: You need to worry about escaping quotes for both grep and cmd.exe grep expects quotes to be escaped as \" cmd.exe escapes quotes as ^" . The quote is

STM32 WWDG interrupt firing when not configured

浪子不回头ぞ 提交于 2019-12-06 19:03:02
问题 I have an application that I am porting from the Keil IDE to build with the GNU toolchain due to license issues. I have successfully be able to set up, build, flash and run the application on the device. The application on the GNU side is for some reason is getting stuck in the weak linked IRQ handler for the WWDG which is an infinite loop. The application does not enable the WWDG, and it is disabled at reset by default. I have also verified that the configuration registers are at their

如何提高 Linux 上 socket 性能

孤人 提交于 2019-12-06 17:36:19
加速网络应用程序的 4 种方法 使用 Sockets API,我们可以开发客户机和服务器应用程序,它们可以在本地网络上进行通信,也可以通过 Internet 在全球范围内进行通信。与其他 API 一样,您可以通过一些方法使用 Sockets API,从而提高 Socket 的性能,或者限制 Socket 的性能。本文探索了 4 种使用 Sockets API 来获取应用程序的最大性能并对 GNU/Linux® 环境进行优化从而达到最好结果的方法。 在开发 socket 应用程序时,首要任务通常是确保可靠性并满足一些特定的需求。利用本文中给出的 4 个提示,您就可以从头开始为实现最佳性能来设计并开发 socket 程序。本文内容包括对于 Sockets API 的使用、两个可以提高性能的 socket 选项以及 GNU/Linux 优化。 为了能够开发性能卓越的应用程序,请遵循以下技巧: 最小化报文传输的延时。 最小化系统调用的负载。 为 Bandwidth Delay Product 调节 TCP 窗口。 动态优化 GNU/Linux TCP/IP 栈。 技巧 1. 最小化报文传输的延时 在通过 TCP socket 进行通信时,数据都拆分成了数据块,这样它们就可以封装到给定连接的 TCP payload(指 TCP 数据包中的有效负荷)中了。TCP payload

How to check that c99 is used, and not gnu99

浪子不回头ぞ 提交于 2019-12-06 16:39:45
I want to add a warning message during the compilation to warn the user it should use gnu99 instead of c99 (I am using anonymous struct, and it seems it doesn't exist at all in c99). I found that: #if __STDC_VERSION__ >= 199901L but this test is true for c99 and gnu99. Which predefined macro could I use? You can check for yourself: $ gcc -std=c99 -dM -E - < /dev/null > c99.txt $ gcc -std=gnu99 -dM -E - < /dev/null > gnu99.txt $ sdiff -s c99.txt gnu99.txt #define __STRICT_ANSI__ 1 < 来源: https://stackoverflow.com/questions/8656175/how-to-check-that-c99-is-used-and-not-gnu99

How to correct *** glibc detected *** error in the program [duplicate]

痴心易碎 提交于 2019-12-06 16:13:32
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: glibc detected error Hi, I was executing my project in GNU C++ when i received this error when i pressed an option in the switch case. As rest of the program is executing fine i am left with this error. I don't know what it is and why it occurs. Please explain and guide me as to where i may start to look in my program. Error Details: *** glibc detected *** ./test.out: free(): invalid pointer: 0xbfb1c874 *** ====

vxworks 用户开发手册 概述

元气小坏坏 提交于 2019-12-06 12:35:19
Wind River VxWorks Platforms 是一个完善的开发环境,包含了完整的开发工具。当然具体每个工具都有相应的用户操作手册,里面包含了详细的使用介绍。我把相关手册的介绍看了一遍,并总结出每个手册大概讲了什么,方便以后遇到问题的时候知道看什么。 总的来说,手册大概分为以下几类: 1. 综述 。从整体角度出发,讲 vxworks 的开发流程。 2. workbench 3.3 。 workbench 及相关图形化的工具的使用。 3. vxworks 6.9 。 vxworks 操作系统的相关介绍与使用。 4. BSP 与驱动 。设备驱动模型和如何编写 BSP 。 5. 相关网络、安全、管理等组件 。提供了一些通用协议的 API 组件,不需要用户编写,需要时可以直接调用。 6. 编译器 。介绍了 gnu 和 diab 编译器的使用。 综述 Wind River VxWorks Platforms Release Notes 6.9 - 包含主机和目标机最新的支持列表、与老版本的兼容信息、新版本特性的说明、对新版本的附加说明 Wind River VxWorks Platforms User's Guide, 6.9 - 提供对平台全面完整的介绍,包括开发环境、代码编译步骤、通用网络和安全功能、平台架构 Wind River VxWorks Platforms

数据结构环境设置

北战南征 提交于 2019-12-06 12:06:11
本地环境设置 如果您仍然愿意为C编程语言设置环境,则需要在计算机上使用以下两个工具:(a)文本编辑器和(b)C编译器。 文本编辑器 这将用于键入您的程序。少数编辑器的示例包括Windows Notepad,OS Edit命令,Brief,Epsilon,EMACS和vim或vi。 文本编辑器的名称和版本可能因不同的操作系统而异。例如,Notepad将在Windows上使用,vim或vi可以在Windows以及Linux或UNIX上使用。 使用编辑器创建的文件称为源文件,包含程序源代码。C程序的源文件通常以扩展名“ .c ” 命名。 在开始编程之前,请确保您有一个文本编辑器,并且您有足够的经验来编写计算机程序,将其保存在文件中,编译并最终执行。 C编译器 源文件中编写的源代码是程序的可读源代码。它需要被“编译”,变成机器语言,这样你的CPU才能按照给定的指令实际执行程序。 这个C编程语言编译器将用于将源代码编译成最终的可执行程序。我们假设您具有编程语言编译器的基本知识。 最常用和免费的编译器是GNU C / C ++编译器。否则,如果您有相应的操作系统(OS),则可以使用HP或Solaris编译器。 以下部分将指导您如何在各种OS上安装GNU C / C ++编译器。我们一起提到C / C ++,因为GNU GCC编译器适用于C和C ++编程语言。 在UNIX / Linux上安装

In linux, how to do system calls through GNU ARM assembly

匆匆过客 提交于 2019-12-06 11:01:08
问题 Till now, I only know how to exit a program by gnu arm assembly. #exit(0) mov r0, #0 # return code mov r7, #1 # supervisor service number svc # call supervisor service But there are still many other syscalls like read, write, fork... I suppose that each of them will require different service number, different numbers of registers as arguments and different rules on how to use registers. My question is where I can get information on writing assembly for each of them. I searched google but the

GNU screen command not showing status bar

Deadly 提交于 2019-12-06 10:52:22
I am new to GNU screen command. I created .screenrc file in my home directory and added below two lines( source ) to display the status bar. caption always caption string "%{= bW}%3n %{y}%t %{-}%= %{m}%H%?%{-} -- %{c}%l%?%{-} -- %D %M %d %{y}%c" but I am not seeing the status bar(after entering into screen mode). When I run source .screenrc , I am getting error "-bash: caption: command not found" . What am I missing here? Amaresh Narayanan Problem was that, I already started screen and then added the file .screenrc in my home directory, but active screens are not recognizing the .screenrc file