keil

How do I execute a function from RAM on a Cortex-M3 (STM32)?

非 Y 不嫁゛ 提交于 2019-11-30 15:15:20
问题 I'm trying to execute a function from RAM on a Cortex-M3 processor (STM32). The function erases the and rewrites the internal flash, so i definitely needs to be in RAM but how do I do that? What I have tried is this: Copy the function to a byte array in RAM using memcpy (checking that it gets aligned correctly), setting a function pointer to point to the byte array an then calling the the function(pointer). This works fine for maybe 10 instructions (I can follow the execution with the

How do I execute a function from RAM on a Cortex-M3 (STM32)?

浪尽此生 提交于 2019-11-30 13:53:20
I'm trying to execute a function from RAM on a Cortex-M3 processor (STM32). The function erases the and rewrites the internal flash, so i definitely needs to be in RAM but how do I do that? What I have tried is this: Copy the function to a byte array in RAM using memcpy (checking that it gets aligned correctly), setting a function pointer to point to the byte array an then calling the the function(pointer). This works fine for maybe 10 instructions (I can follow the execution with the debugger) but then I get a buss error and the processor resets. The buss error occurs on the second pass

How to determine maximum stack usage in embedded system?

≯℡__Kan透↙ 提交于 2019-11-30 12:52:28
When I give the Keil compiler the "--callgraph" option, it statically calculates the exact "Maximum Stack Usage" for me. Alas, today it is giving me a "Maximum Stack Usage = 284 bytes + Unknown(Functions without stacksize...)" message, along with a list of "Functions with no stack information". Nigel Jones says that recursion is a really bad idea in embedded systems ( "Computing your stack size" 2009), so I've been careful not to make any mutually recursive functions in this code. Also, I make sure that none of my interrupt handlers ever re-enable interrupts until their final return-from

ARM Cortex-M compiler differences

人走茶凉 提交于 2019-11-30 02:37:17
问题 I'm about to develop some firmwares for Cortex-M cores on STM32 processors using C for my projects, and searching on the web I've found a lot of different compilers: Keil, IAR, Linaro, Yagarto and GNU Tools for ARM Embedded Processors. I was wondering, what functional differences are there between these compilers that might influence my choice? For example as an enthusiast I don't need support or assistance from the vendor, and a limitation on the code size is OK for the moment. Also the ease

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

How to determine maximum stack usage in embedded system?

守給你的承諾、 提交于 2019-11-29 18:25:57
问题 When I give the Keil compiler the "--callgraph" option, it statically calculates the exact "Maximum Stack Usage" for me. Alas, today it is giving me a "Maximum Stack Usage = 284 bytes + Unknown(Functions without stacksize...)" message, along with a list of "Functions with no stack information". Nigel Jones says that recursion is a really bad idea in embedded systems ("Computing your stack size" 2009), so I've been careful not to make any mutually recursive functions in this code. Also, I make

安装与破解Keil uVision4和Proteus Pro教程---我太难了丶

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 17:30:38
工具 1.电脑win7或win10系统 2.Keil uVision4 3.Proteus Pro 文件下载链接: https://pan.baidu.com/s/1fkCcx9u-4-QW32N8NdsO5Q 提取码:pjy0 一、安装Keil uVision4   1.1 先找好这两个文件,如图;     1.2 双击文件中的<C51V900.exe>进行程序安装,然后点击“Next”进行下一步操作;   1.3 选中“I agree to all the terms of the preceding License Agreement”前面的 “√”,然后再点击 “Next”;   1.4 继续点击“Next”;   1.5 输入个人信息“First Name”和“E-mail”,然后继续点击“Next”;   1.6 接下来安装中,等待进度条加载完,出现下图,第一个可以不勾选,再点击Finish完成安装; 二、注册使用    1.1面出现keil图标,双击打开,如下图   1.2再点击左上角的“File”,再点击License Management,出现如下图,复制右上角的“CID”码,这个“CID”不是唯一的;   1.3再打开文件另一个文件“Keil C51 V8.16a KeyGen.exe”,出现下图;   1.4把之前复制好的CID码粘贴到这个软件的CID后面框里

安装与破解Keil uVision4和Proteus Pro

僤鯓⒐⒋嵵緔 提交于 2019-11-29 17:17:50
今天我们来学习一下怎么样安装和破解keil uVision4与Proteus Pro这两个软件! 一。安装激活keil Vision4 1.首先我们要到网站上下载一个keil uVision4打开安装包点击安装 2.接下来会弹出安装窗口 3.根据提示进行下一步安装 4.选择我同意(对下面 i agree 前面的窗口进行勾选)然后继续 5.选择安装的磁盘和文件夹 6.随意输入一些字母数字进行下一步 7.安装完成 8.打开Keil C51 V8.16a KeyGen.exe文件 9.在电脑中找到存放keil文件的文件夹 10.打开keil Vision4 再点击file中的 license 11.复制图中CID 12.打开8中破解软件将CID黏贴点击下方Generate生成激活码 13.复制激活码再返回keil Vision4 中打开license 将激活码黏贴到最下方空白会话框中,再点击激活就可以了!(自己可以去下载几个源代码试试是否激活成功,如不成功按上述步骤重新激活) 二。安装proteus pro软件 1.上网下载proteus pro安装包再解压出来 2.点击右下角browse更改安装目录到自己常用的文件夹,方便查找 来源: https://www.cnblogs.com/xqh6/p/11524141.html