iar

FreeRTOS configTICK_RATE_HZ

孤人 提交于 2019-12-02 03:22:37
问题 I am using an MSP430f5438 with version 5.4 of FreeRTOS. I am having a funny problem that I can't figure out. Basically, when I set configTICK_RATE_HZ to different values, the LED blinks faster or slower; it should stay the same rate. It blinks slower the higher i set configTICK_RATE_HZ, and faster when I set TICK_RATE lower. vTaskDelayUntil( &xLastFlashTime, xFlashRate ); is such that the LED should only blink once a second no matter what the configTICK_RATE_HZ is. I stepped through and

FreeRTOS configTICK_RATE_HZ

跟風遠走 提交于 2019-12-02 00:38:54
I am using an MSP430f5438 with version 5.4 of FreeRTOS. I am having a funny problem that I can't figure out. Basically, when I set configTICK_RATE_HZ to different values, the LED blinks faster or slower; it should stay the same rate. It blinks slower the higher i set configTICK_RATE_HZ, and faster when I set TICK_RATE lower. vTaskDelayUntil( &xLastFlashTime, xFlashRate ); is such that the LED should only blink once a second no matter what the configTICK_RATE_HZ is. I stepped through and checked the xFlashRate to make sure. Its always = to the configTICK_RATE_HZ. Code: xFlashRate = ledFLASH

source insight 集成IAR编译构建功能及代码错误警告定位

独自空忆成欢 提交于 2019-12-01 14:39:40
IAR提供了命令行构建项目的方法,所以我们可以用source insight 内部的custom command来实现构建项目 在run中输入 IarBuild.exe “ test.ewp” -make Debug -log all ,temp.ewp注意使用完整路径 Dir 中输入iarbuild.exe的所在 目录的 路径 要想获取并解析错误及警告的位置,则需勾选Parse Links in Output 然后在Pattern输入 ^\(.*\)(\([0-9][0-9]*\))\w+:\w+ 就能单击跳转到出错的行了 来源: CSDN 作者: fanyusen 链接: https://blog.csdn.net/fanyusen/article/details/63052090

MISRA C:2004, error with bit shifting

情到浓时终转凉″ 提交于 2019-11-30 21:54:37
I'm using IAR Workbench compiler with MISRA C:2004 checking on. The fragment is: #define UNS_32 unsigned int UNS_32 arg = 3U; UNS_32 converted_arg = (UNS_32) arg; /* Error line --> */ UNS_32 irq_source = (UNS_32)(1U << converted_arg); The MISRA error is: Error[Pm136]: illegal explicit conversion from underlying MISRA type "unsigned char" to "unsigned int" (MISRA C 2004 rule 10.3) I don't see any unsigned char in any of the code above. The discussion at Why did Misra throw an error here? discusses multiplication which may have different promoting rules than left shifting. My understanding is

How to specify a compiler in CMake?

南笙酒味 提交于 2019-11-30 15:22:21
问题 I would like to use the IAR compiler. I noticed CMake has already have a bunch of files about this compiler: https://github.com/jevinskie/cmake/blob/master/Modules/Compiler/IAR.cmake From what I read the common solution is to specify manually ALL the toolchain in my CMakeLists.txt : set(CMAKE_C_COMPILER iccarm) set(CMAKE_CPP_COMPILER iccarm) How CMake can link these definitions with `Modules/Compiler/IAR.cmake"? I thought I would just have to do include("Modules/Compiler/IAR.cmake") What is

ARM编辑、编译工具

早过忘川 提交于 2019-11-29 23:48:28
手动编译 编译器问题,肯定是GNU的大名鼎鼎的GCC了,与此相关的什么连接器,汇编器也都包含在内了。 针对arm的GCC,当然就是 arm-linux-gcc 了,我所用的版本就是友善之臂光盘自带arm-linux-gcc 4.4.3。也有资料说也可以用arm-elf-gcc,这个与arm-linux-gcc带的c库不同,是uclibc,更精简更适合嵌入式。 手动编译需要我们自己写 Makefile 文件 ,涉及到编译过程的依赖等细节问题。在我们实际开发中,可以不通过这种方式,但是需要了解这个过程。 自动编译 1 、 ADS1.2 ADS 是 ARM 公司的集成开发环境软件, ADS 包括了四个模块分别是: SIMULATOR ; C 编译器;实时调试器;应用函数库 。 特点: √ C 编译器效率极高;支持 C 以及 C++ ,使工程师可以很方便的使用 C 语言进行开发; √ 提供软件模拟仿真功能 ,使没有 Emulators 的学习者也能够熟悉 ARM 的指令系统; (直接就可以在IDE环境下,通过运行自己编写的汇编或C语言,查看ARM系统中寄存器的情况) √ 配合 FFT-ICE 使用, ADS1.2 提供强大的实时调试跟踪功能 , 片内运行情况尽在掌握; √ ADS1.2 需要硬件支持才能发挥强大功能,目前支持的硬件调试器有 Multi-ICE 以及兼容 Multi-ICE

基于TCP异步的聊天室程序

独自空忆成欢 提交于 2019-11-29 01:20:13
话说这个学期我们有一门课叫“中间件”,老师叫我们做一个基于TCP的聊天程序,主要结构如图 1.所有Client端需要与Server端连接(感觉这句话好白痴,TCP肯定要连接了才能工作) 2.Client端的功能是可以群发和私聊(用过QQ都应该知道什么是群发和私聊吧),但都必须经过Server端中转,也就是实现了类似通讯中间件的功能。 PS:开始写之前我是对网络编程这块完全没有认识的,上网找了几个TCP的程序,都是只能实现群发功能,或者只能实现client与server之间相互发的功能, 还没有哪个是可以实现上面所说的功能的程序的(如果有的请留言给我,我去下一个下来学习一下,O(∩_∩)O谢谢)。 实现方法有好多,用Socket类可以实现,用 TcpClient类和TcpListener类也可以实现,我就选择了后者,因为比较简单。 下面就列一下我用到的技术: 多线程,异步回调,委托,设计模式的观察者模式………… 先让大家看一下客户端和服务器端的界面先吧(本人不会做界面,而且界面上有很多Label是用来检查接收的情况,请大家选择性过滤掉) server端的 client端的 1.Server端先启动服务,新建一个线程,绑定一个套接字,之后监听 2.Client端点击连接之后,就会与Server端建立连接。 3.每当有一个Client加入Server时

KEIL & IAR SWO管脚使用

我怕爱的太早我们不能终老 提交于 2019-11-28 01:40:49
调试中打印管脚可以用SWO管脚代替PB3脚 keil配置如下 1.在新建工程里面加入 #include <stdio.h> #define ITM_Port8(n) (*((volatile unsigned char *)(0xE0000000+4*n))) #define ITM_Port16(n) (*((volatile unsigned short*)(0xE0000000+4*n))) #define ITM_Port32(n) (*((volatile unsigned long *)(0xE0000000+4*n))) #define DEMCR (*((volatile unsigned long *)(0xE000EDFC))) #define TRCENA 0x01000000 struct __FILE { int handle; /* Add whatever you need here */ }; FILE __stdout; FILE __stdin; int fputc(int ch, FILE *f) { if (DEMCR & TRCENA) { while (ITM_Port32(0) == 0); ITM_Port8(0) = ch; } return(ch); } 2.配置软件 其中core频率是根据单片机频率来设置,必须一样 如上设置完后

关于iar intrinsics.h is already included previously!报错的问题及解决办法

限于喜欢 提交于 2019-11-27 12:49:40
用最新的cubemx生成f103的代码(带freertos系统),如果用iar编译,可能会出现intrinsics.h is already included previously!的错误,如果没有待freertos中间件的情况下, 不会出现。 网上找了原因,也看到类似情况,低版本iar会出现,比如7.8,8.1,最后安装了iar8.32的版本,编译通过。因此最新的工具都要相互匹配,不然,编译就出错。 来源: https://blog.csdn.net/liming0931/article/details/99676654

Command Prompt Error 'C:\\Program' is not recognized as an internal or external command, operable program or batch file

半城伤御伤魂 提交于 2019-11-27 08:13:07
I am trying to run the following batch command. The command has been extracted from the IDE so is confirmed working. Getting the error mentioned below. I have tried a few variations with double quotes but they haven't worked. Even on powershell it has the same message. C:\Program Files\IAR Systems\Embedded Workbench 7.0\430\bin\icc430.exe F:\CP001\source\Meter\Main.c -D Hardware_P20E -D Calibration_code -D _Optical -D _Configuration_TS0382 -o F:\CP001\Temp\C20EO\Obj\ --no_cse --no_unroll --no_inline --no_code_motion --no_tbaa --debug -D__MSP430F425 -e --double=32 --dlib_config C:\Program Files