keil

【C51】点亮LED灯

大兔子大兔子 提交于 2019-11-29 15:13:17
一:硬件   硬件上,需要准备一个单片机系统,可以是开发板,也可以是自己焊接的最小系统。   开发板一般集成了烧录模块,可以使用烧录软件直接烧录使用,自己焊接的最小系统,可以把单片机在开发板上完成烧录后,再安装到单板上上电运行。 二:软件   软件上,需要一个烧录软件(比如:STC-ISP V6.85,可以在www.stcmcu.com下载),一个开发软件(比如Keil C51,可以在https://www.keil.com/download/product/选择C51下载)。 三:开发程序   使用Keil C51编写C程序,编译为hex文件,再通过烧录软件烧录hex程序到单片机上,上电执行,即可完成第一个点亮LED灯的程序: #include<reg52.h> sbit led1 = P1^0; void main() { while(1) { led1 = 0; } } 来源: https://www.cnblogs.com/happylich/p/11520928.html

新塘 N76E003 单片机在 Keil 中下载程序以及下载引脚复用

℡╲_俬逩灬. 提交于 2019-11-29 14:46:17
1.安装好下载器相关的其他驱动,就是用下载工具可以下载。 2.打开 Keil ,插上下载器,这时会提示升级固件,一路同意就好,最后还需要拔下再插上,然后在 Keil中选择: 3.点击“Settings”,如下图设置: 4.设置好之后就可以直接在 Keil 中下载程序了。 最后是关于两个下载引脚复用的问题: 在下载设置中这样选择,下载完成后,断电重新上电就可以当作正常IO使用了,程序中不用书写代码设置。 来源: 51CTO 作者: YPB39155 链接: https://blog.51cto.com/ypb39155/2327355

最新版KEIL MDK5.29 uVision5开发工具来了,你用了吗?

不羁岁月 提交于 2019-11-29 14:40:01
最新版 KEIL MDK5.29 uVision5 开发工具来了,你用了吗? 可以下载地址: http://www.myir-tech.com/soft.asp?id=1169请添加链接描述 KEIL MDK5.29 uVision5包含哪些功能呢?下面看看 Arm Development Studio IDE Development Studio helps you build, code, debug and optimize Arm-based projects quickly. From device bring-up to application debug to creating highly efficient micro-controller applications, Development Studio enables you to bring better products to market ahead of the competition. Arm Compiler Arm Compiler 5 and Arm Compiler 6 toolchains enable you to build highly optimized embedded applications for the entire range of Arm processors. Arm

最新版KEIL MDK5.29 uVision5开发工具来了,你用了吗?

和自甴很熟 提交于 2019-11-29 14:39:57
最新版 KEIL MDK5.29 uVision5 开发工具来了,你用了吗? 可以下载地址: http://www.myir-tech.com/soft.asp?id=1169请添加链接描述 KEIL MDK5.29 uVision5包含哪些功能呢?下面看看 Arm Development Studio IDE Development Studio helps you build, code, debug and optimize Arm-based projects quickly. From device bring-up to application debug to creating highly efficient micro-controller applications, Development Studio enables you to bring better products to market ahead of the competition. Arm Compiler Arm Compiler 5 and Arm Compiler 6 toolchains enable you to build highly optimized embedded applications for the entire range of Arm processors. Arm

Why didn't the compiler warn me about an empty if-statement?

三世轮回 提交于 2019-11-29 05:28:09
I'm using Keil uVision v4.74 and have enabled the option "All Warnings". I wrote the following intentional code: if(condition matched) { //do something } When I rebuilt my project, I got 0 errors, 0 warnings. However, when I accidentally wrote: if(condition matched); { //do something } I also got 0 errors, 0 warnings. It was next to impossible for me to find out that a small ; following the if condition was the root of the problem. Why didn't the compiler treat it as a warning and inform me? It's not an error because an empty statement is a valid statement; however, since it's certainly

What is non-aligned access? (ARM/Keil)

非 Y 不嫁゛ 提交于 2019-11-29 04:53:57
I'm using Keil to write Assembly for ARM 7. I have the following runtime error: Non-aligned Access: ARM Instruction at 000000F8H, Memory Access at 7F7F7F7FH Data Abort: ARM Instruction at 000000F8H, Memory Access at 7F7F7F7FH This doesn't really help me, because I don't know what 'non-aligned access' is, (other than the obvious, but I don't really understand what it means) and I am trying to access (store) to 0x7F7F7F7F , what's the issue? Searching I only found a couple of similar issues, both using C, and resolved by some means very specific to their code and which didn't relate to this

东芝半导体最新ARM开发板——TT_M3HQ开箱评测

荒凉一梦 提交于 2019-11-29 00:48:20
前言 最近从面包板社区申请到一块东芝最新ARM Cortex-M3内核的开发板——TT_M3HQ,其实开发板收到好几天了,这几天一直在构思怎么来写这第一篇评测文章,看大家在社区也都发了第一篇评测,我也趁着周末有时间来写一下开箱报告。了解过东芝的光耦和存储设备,但不知道东芝还有MCU产品,更没有用过相关的开发板,这次有幸能申请到一块最新的M3开发板,非常感谢 面包板社区 、 东芝半导体 、 中科创达 的支持,让我们一起来学习一下东芝MCU的开发和使用。 关于TT_M3HQ 这款TT_M3HQ开发板是 东芝半导体 和国内的 中科创达 强强联手开发的产品,基于东芝ARM Cortex-M3内核的TMPM3HQFDFG微控制器,同时上线的还有基于M4内核TMPM4G9F15FG微控制器的 TT_M4G9 开发板,这两款开发板官方售价均是150元人民币。从板载资源来看,售价150元,价格还是很良心的,就一个主控芯片TMPM3HQFDFG,我在淘宝搜索了一下,价格在 70RMB 左右,而且还板载调试器和USB-TTL芯片,对于开发者来说,只需要一根MicroUSB线即可满足供电、下载、调试的需求,还是非常方便的。 关于东芝的MCU产品 TT_M3HQ开发板采用的TMPM3HQFDFG芯片是属于东芝TXZ3系列MCU,TXZ3系列MCU发布于2016年,采用65nm逻辑工艺

Keil 5使用JLink直接调试正在运行的CPU

℡╲_俬逩灬. 提交于 2019-11-28 23:15:18
环境: 目标CPU:STM32F429 连接工具:JLink V9 连接方式:SWO 调试工具:Keil MDK 5.20 使用场景: 目标板正在运行,但是出BUG了,需要调试,而当前又没有在线debug, 于是就需要用调试器在不复位CPU的前提下附着到正在运行的板子上. 使用步骤: 1.首先确认你有与当前CPU运行的程序一样的源码,编译时生成了调试信息(Debug Information). 2.修改debug设置,去掉"Load Appcalition at Startup"的勾选. 3.检查JLink的设置,"Connect:Normal"表示正常连接,不复位,"Reset:Normal" 表示连接后不复位,不勾选"Reset after Conn",不勾选"Download to Flash" 4.将JLink连接至目标板的调试接口. 5.点击Keil中的调试按钮,启动调试.前面的设置正确的话CPU会停止运行,但不会复位,此时只能看汇编指令,没有C源码. 6.在Command窗口输入命令:LOAD %L INCREMENTAL(这条命令是加载当前项目的输出文件,读取调试信息,这样就可以看到C源码了). 7.现在就和正常调试一样了. 备注: 第6步还有另一种方式自动加载,在"Debug"设置对话框里填入一个"Initialization File:", 在该文件里面写上

keil中的程序跳转IAP

我只是一个虾纸丫 提交于 2019-11-28 14:40:42
//appxaddr:用户代码起始地址. void Session_Change_load_app(u32 appxaddr) { __set_PRIMASK(1); //关闭总中断 if(((*(__IO uint32_t *) appxaddr) & 0x2FFE0000) == 0x20000000) { __ASM("CPSID I"); jump2app = (Session_Changefun)*(__IO uint32_t *) (appxaddr + 4);//复位函数 __set_MSP(*(__IO uint32_t *) appxaddr);//设置栈顶 jump2app(); } } //用户代码主函数 int main(void) { //step1:启动系统时钟(选择) //step2:初始化所有的外设 //step3:开放总中断 __set_PRIMASK(0); //开放总中断,跳转会无条件触发正在运行中断,若本段代码中无该中断,则会死锁 __enable_irq (); while(1) { //do something } } 来源: https://www.cnblogs.com/zhangtongxin/p/11410285.html