Pregunta

I wrote a simple program for eCos in stm32f4discovery Cortex-M4, which following steps below.

$ecosconfig new 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=cortex-m4 -mthumb -g -O2 -ffunction-sections -fdata-sections -Ttarget.ld -nostdlib

$arm-none-eabi-objcopy -O binary -R .sram hello.elf hello.bin

Actually, it is success. But, I don't know how to see the "hello ecos!".

I guess I need to setup baud rate and tty. So, I use minicom to do this. Unfortunately, I failed.

¿Fue útil?

Solución

I use this stlink util to debug STM32F4 apps. After you compile and invoke this util, you can connect to stm32 target with gdb:

(gdb) tar ext :4242
(gdb) load hello.elf

Then you should be able to debug your app.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top