我在eCos的stm32f4discovery Cortex-M4中编写了一个简单的程序,如下所示。
$ecosconfig新stm32f4discovery
$configtool
#include <stdio.h>
int main(){
printf("hello ecos!\r\n");
return 0;
}$arm-none-eabi-gcc -o hello.elf hello.c -Lecos_install/lib -I ecos_install/include -mcpu=none m4 -mthumb -g -O2 -fdata Lecos fdata-Lecos -Ttarget.ld -nostdlib
$arm-none-eabi-objcopy -O二进制-R .sram hello.elf hello.bin
事实上,这就是成功。但是,我不知道怎么看“你好!”
我想我需要设置波特率和蒂。所以,我用minicom来做这个。不幸的是我失败了。
发布于 2014-01-23 05:16:09
我使用这个stlink util来调试STM32F4应用程序。编译和调用此util之后,可以使用gdb连接到stm32目标:
(gdb) tar ext :4242
(gdb) load hello.elf那么你应该能够调试你的应用程序了。
https://stackoverflow.com/questions/20183872
复制相似问题