stm32跑不到main函数
来源:互联网 发布:淘宝账号申请 编辑:程序博客网 时间:2024/06/05 19:02
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT __main
IMPORT SystemInit
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP
运行到“BX R0”这里就不执行了。
原因找到了,特发此转过来~
因printf()之类的函数,使用了半主机模式。使用微库的话,不会使用半主机模式,所以就没有问题。
添加下面代码,就可以使用标准库了:
#pragma import(__use_no_semihosting)
_sys_exit(int x)
{
x = x;
}
struct __FILE
{
int handle;
/* Whatever you require here. If the only file you are using is */
/* standard output using printf() for debugging, no file handling */
/* is required. */
};
/* FILE is typedef’ d in stdio.h. */
FILE __stdout;
这个问题可以在"RealView? 编译工具库和浮点支持指南"书中找到。。
EXPORT Reset_Handler [WEAK]
IMPORT __main
IMPORT SystemInit
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP
运行到“BX R0”这里就不执行了。
原因找到了,特发此转过来~
因printf()之类的函数,使用了半主机模式。使用微库的话,不会使用半主机模式,所以就没有问题。
添加下面代码,就可以使用标准库了:
#pragma import(__use_no_semihosting)
_sys_exit(int x)
{
x = x;
}
struct __FILE
{
int handle;
/* Whatever you require here. If the only file you are using is */
/* standard output using printf() for debugging, no file handling */
/* is required. */
};
/* FILE is typedef’ d in stdio.h. */
FILE __stdout;
这个问题可以在"RealView? 编译工具库和浮点支持指南"书中找到。。
阅读全文
0 0
- stm32跑不到main函数
- STM32中的main函数入口
- 工作总结,main函数取不到命令行参数,_tmain和main
- STM32 Keil仿真进不了Main()函数
- STM32 启动代码 startup.c main函数之前解析
- STM32 启动代码 startup.c main函数之前解析
- STM32 启动代码 startup.c main函数之前解析
- 解决STM32调试,无法进入main函数的问题
- stm32 官方例子main函数最后一段代码#ifdef USE_FULLASSERT
- STM32调试,无法进入main函数 LDR r0,[pc,#0]
- 解决STM32调试,无法进入main函数的问题
- stm32启动过程(汇编代码)及汇编到main函数的转换过程的实现
- stm32从上电到执行main函数中间过程详细分析(1)
- stm32串口-main实现发送
- main()函数
- main函数
- main函数
- main函数
- Jquery.DataTable使用
- SDUT 1209 求实数绝对值
- 洛谷P3375 【模板】KMP字符串匹配
- grep
- 浏览器Web开发者工具 ------ 控制台内管理cookie,indexedDB,localStorage,sessionStorage
- stm32跑不到main函数
- long和long类型的区别
- Java线程的5种状态及状态之间转换
- java分页跟取模,分批次插入db
- 产品经理如何做好行业研究及竞争对手分析工作
- 如何使用SeaJS
- 阴历相关工具类
- 0-Linux 网络编程学习笔记导航
- 排序算法实现(上)