搜索
bottom↓
回复: 52

开贴移植ecos到百为STM32开发板

[复制链接]

出0入0汤圆

发表于 2013-7-1 15:19:18 | 显示全部楼层 |阅读模式
硬件:百为STM3210E-EVAL开发板
软件:vmware + ubuntu8.04(配置好bridged用路由器可以直接上网)

开发板图片:


移植ecos到百为STM32开发板1——ecos开发环境搭建

1、安装TCL

apt-get install tcl

2、下载ecos-install.tcl脚本到当前目录
wget --passive-ftp ftp://ecos.sourceware.org/pub/ecos/ecos-install.tcl

3、执行ecos-install.tcl脚本安装ecos

root@xiliang-desktop:/home/ecos# sh ecos-install.tcl
eCos installer v2.0.1 starting...
Written and maintained by Jonathan Larmour <jifl@eCosCentric.com>
Retrieving installer metadata information...
Connected...
Downloading ecos-install.db...
File size 6,807 bytes
[**************************************************]
---------------------------------------------------------
Available distribution sites:
[1] ftp://mirrors.kernel.org/sources.redhat.com/ecos
[2] http://mirrors.kernel.org/sources.redhat.com/ecos
[3] ftp://mirror.aarnet.edu.au/pub/sourceware/ecos
[4] http://mirror.aarnet.edu.au/pub/sourceware/ecos
[5] ftp://ftp.mirrorservice.org/sites/sources.redhat.com/pub/ecos
[6] http://www.mirrorservice.org/sites/sources.redhat.com/pub/ecos
[7] ftp://gd.tuwien.ac.at/opsys/ecos
[8] http://gd.tuwien.ac.at/opsys/ecos
[9] ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/ecos
[10] ftp://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos
[11] http://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos
[12] ftp://ftp-stud.fht-esslingen.de/ ... ces.redhat.com/ecos
[13] http://ftp-stud.fht-esslingen.de ... ces.redhat.com/ecos
[14] ftp://bo.mirror.garr.it/mirrors/sourceware.org/ecos
[15] http://bo.mirror.garr.it/mirrors/sourceware.org/ecos
[16] ftp://ftp.u-aizu.ac.jp/pub/gnu/cygnus/ecos
[17] ftp://ftp.chg.ru/pub/sourceware/ecos
[18] ftp://ftp.sun.ac.za/pub/mirrorsites/sourceware.org/pub/ecos
[19] http://ftp.sun.ac.za/ftp/pub/mirrorsites/sourceware.org/pub/ecos
[20] ftp://ftp.twaren.net/Unix/Sourceware/ecos
[21] http://ftp.twaren.net/Unix/Sourceware/ecos
[22] ftp://mirror.facebook.com/sourceware/ecos
[23] http://mirror.facebook.com/sourceware/ecos
[24] http://sources-redhat.mirrors.airband.net/ecos
[25] ftp://ecos.sourceware.org/pub/ecos
Please select a distribution site: 1
---------------------------------------------------------
Please select a directory for installation
[Default /opt/ecos]:
---------------------------------------------------------
Available prebuilt GNU tools:
[1] arm-eabi
[2] arm-elf (old)
[3] i386-elf
[4] m68k-elf
[5] mipsisa32-elf
[6] powerpc-eabi
[7] sh-elf
[q] Finish selecting GNU tools
("*" indicates tools already selected)
Please select GNU tools to download and install: 1
•arm-eabi
[2] arm-elf (old)
[3] i386-elf
[4] m68k-elf
[5] mipsisa32-elf
[6] powerpc-eabi
[7] sh-elf
[q] Finish selecting GNU tools
("*" indicates tools already selected)
Please select GNU tools to download and install: q
Directory /opt/ecos does not exist... creating.
Entering /opt/ecos
Retrieving GNU tools for arm-eabi
Connected...
Downloading ecoscentric-gnutools-arm-eabi-20081213-sw.i386linux.tar.bz2...
File size 17,469,555 bytes
[**************************************************]
Retrieving eCos version 3.0
Connected...
Downloading ecos-3.0.i386linux.tar.bz2...
File size 17,854,418 bytes
[**************************************************]
Downloads complete.
If you wish to disconnect from the internet you may do so now.
Unpacking ecoscentric-gnutools-arm-eabi-20081213-sw.i386linux.tar.bz2...
Unpacking ecos-3.0.i386linux.tar.bz2...
Generating /opt/ecos/ecosenv.sh
Generating /opt/ecos/ecosenv.csh
---------------------------------------------------------
In future, to establish the correct environment for eCos,
run one of the following commands:
   . /opt/ecos/ecosenv.sh   (for sh/bash users); or
   source /opt/ecos/ecosenv.csh  (for csh/tcsh users)
It is recommended you append these commands to the end of your
shell startup files such as $HOME/.profile or $HOME/.login
---------------------------------------------------------
Installation complete!
root@xiliang-desktop:/home/ecos#

4、执行. /opt/ecos/ecosenv.sh设置环境变量
. /opt/ecos/ecosenv.sh

5、运行ecos configure tool
root@xiliang-desktop:/home/ecos# cd /opt/ecos/ecos-3.0/tools/bin
root@xiliang-desktop:/opt/ecos/ecos-3.0/tools/bin# ./configtool
./configtool: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
root@xiliang-desktop:/opt/ecos/ecos-3.0/tools/bin#

发现少了libstdc++.so.5动态连接库,通过下面的命令安装
apt-get install libstdc++5

安装完后再执行 ./configtool,就可以看到ecos configure tool图形配置界面了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

阿莫论坛20周年了!感谢大家的支持与爱护!!

曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……

出0入0汤圆

 楼主| 发表于 2013-7-1 15:21:42 | 显示全部楼层
ecos开发环境搭建参考了老同事的博客介绍:

ubuntu9.10中安装eCos并建立eCos开发环境
http://velep.com/archives/506.html

出0入0汤圆

发表于 2013-7-1 15:29:18 | 显示全部楼层
打算移植GUI吗?GUI打算用那个?

出0入0汤圆

发表于 2013-7-1 15:33:36 | 显示全部楼层
本帖最后由 fisherman2004 于 2013-7-1 15:34 编辑

LZ我之前移植过STM32F207到ECOS上,后来用了LPC1788,现在在LPC1788上跑ECOS,网络用的FREEBSD,界面用的EMWIN。 多多交流

出0入0汤圆

 楼主| 发表于 2013-7-1 16:00:06 | 显示全部楼层
Excellence 发表于 2013-7-1 15:29
打算移植GUI吗?GUI打算用那个?

之前以为ecos在M3上没什么GUI支持,看4楼回复原来也可以支持ucgui,emWIN。
那就有得玩了,ecos本身也支持yaffs,goahead WEB服务器,我主要是看中这两点。

出0入0汤圆

发表于 2013-7-1 16:02:03 | 显示全部楼层
本帖最后由 Excellence 于 2013-7-1 16:04 编辑
xi_liang 发表于 2013-7-1 16:00
之前以为ecos在M3上没什么GUI支持,看4楼回复原来也可以支持ucgui,emWIN。
那就有得玩了,ecos本身也支持 ...


emwin中文支持不太好,控件中的字体选择没法改吧?
在国内,要求中文。。
要是纯英文 ,就没这么蛋疼了。

UCGUI按键等等控件,可以自己修改为中文。

出0入0汤圆

 楼主| 发表于 2013-7-1 16:43:32 | 显示全部楼层
移植ecos到百为STM32开发板2——编译reboot

在命令行运行configtool
./configtool

打开Build->Templates




在Hardware处选择ST STM3210E EVAL board,
在Packages处选择redboot


点击OK,然后会出现一些冲突提示




忽略提示,点击continue继续。

导入redboot配置,打开File->Import,选择reboot配置文件:
/opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM.ecm




点击OK确认,会提示冲突




忽略冲突,点continue,出现如下界面




点File->Save,保存配置文件为redboot_ROM.ecc

然后点build->Library编译,编译完后下面的窗口会出现build finished提示编译完成。
make[1]: Entering directory `/opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_build/hal/cortexm/stm32/stm3210e_eval/v3_0'
arm-eabi-objcopy --strip-debug /opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_install/bin/redboot.elf /opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_install/bin/redboot.img
arm-eabi-objcopy -O srec /opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_install/bin/redboot.elf /opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_install/bin/redboot.srec
arm-eabi-objcopy -O binary /opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_install/bin/redboot.elf /opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_install/bin/redboot.bin
make[1]: Leaving directory `/opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_build/hal/cortexm/stm32/stm3210e_eval/v3_0'
build finished
make: Leaving directory `/opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_build'

这样,可执行文件reboot.bin就出现在以下目录了:
/opt/ecos/ecos-3.0/packages/hal/cortexm/stm32/stm3210e_eval/v3_0/misc/redboot_ROM_install/bin/reboot.bin

把redboot.bin用JLINK烧写到开发板上,串口设置波特率为38400,上电运行,串口打印如下信息:
+**Warning** FLASH configuration checksum error or invalid key
Use 'fconfig -i' to [re]initialize database
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v3_0 - built 01:16:53, Jul  1 2013
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
RedBoot is free software, covered by the eCos license, derived from the
GNU General Public License. You are welcome to change it and/or distribute
copies of it under certain conditions. Under the license terms, RedBoot's
source code and full license terms must have been made available to you.
Redboot comes with ABSOLUTELY NO WARRANTY.
Platform: ST STM3210E EVAL (Cortex-M3)
RAM: 0x68000000-0x68100000 [0x68003648-0x680dd000 available]
     0x20000000-0x2000f000 [0x20000000-0x2000f000 available]
FLASH: 0x08000000-0x0807ffff, 256 x 0x800 blocks
FLASH: 0x64000000-0x64ffffff, 128 x 0x20000 blocks
RedBoot>

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入46汤圆

发表于 2013-7-1 16:50:40 | 显示全部楼层
果断顶起,超值的开发板,就是太忙,没时间玩

出0入0汤圆

发表于 2013-7-1 18:43:43 | 显示全部楼层
lz板子外扩了1M的SRAM吗?之前再207上跑的时候无奈RAM太小,内核加进去,加个TCP/IP协议栈就没多少RAM可用了,外扩SRAM又太贵,就放弃了

出0入0汤圆

 楼主| 发表于 2013-7-1 18:58:19 | 显示全部楼层
fisherman2004 发表于 2013-7-1 18:43
lz板子外扩了1M的SRAM吗?之前再207上跑的时候无奈RAM太小,内核加进去,加个TCP/IP协议栈就没多少RAM可用 ...

对,我们的板子是有1M SRAM的,不知道跑goahead够不够。
fisherman2004你的ecos应用程序是自己写的吗?我发现ecos好象没有提供像ucgui那样的demo

出0入0汤圆

发表于 2013-7-1 19:08:12 | 显示全部楼层
本帖最后由 fisherman2004 于 2013-7-1 19:16 编辑

我只是把所有驱动都移植到LPC1788上面了,ucgui很容易移到ecos上,能显示中文,能显示窗口,应用还没开始写。需求还没做好。  ecos用的人太少了,但做中小型方案非常不错的,实时性,稳定性,外围组件都很齐全,又是开源的,裁剪性很强。不知道为什么很少人用

出0入0汤圆

 楼主| 发表于 2013-7-1 19:26:30 | 显示全部楼层
fisherman2004 发表于 2013-7-1 19:08
我只是把所有驱动都移植到LPC1788上面了,ucgui很容易移到ecos上,能显示中文,能显示窗口,应用还没开始写 ...

可能是推广问题,ecos软件支持很丰富,lwip,yaffs,jfffs2,goahead这些都支持,
不过我还没看到一个应用集成所有这些驱动的,不过有redhat在背后做支持,相信有一定商业前景的

出0入0汤圆

发表于 2013-7-1 19:32:10 | 显示全部楼层
xi_liang 发表于 2013-7-1 19:26
可能是推广问题,ecos软件支持很丰富,lwip,yaffs,jfffs2,goahead这些都支持,
不过我还没看到一个应 ...

lz好好研究用REDBOOT+GDB STUB调试的问题,一直没找到称手的好用的调试调试方法,都是printf调试ecos的

出0入0汤圆

发表于 2013-7-1 20:22:15 | 显示全部楼层
xi liang最近开始发力了

出0入0汤圆

 楼主| 发表于 2013-7-1 20:37:00 | 显示全部楼层
移植ecos到百为STM32开发板3——编译ecos

同编译redboot一样,打开ecos configure tool

打开Build->Templates
在Hardware处选择ST STM3210E EVAL board,
在Packages处选择default




点OK,出现冲突提示页面




点continue忽略

点File->Save,保存配置文件为/opt/ecos/ecos-3.0/examples/ecos.ecc

点build->Library编译
在/opt/ecos/ecos-3.0/examples/ecos_install/lib目录就生成了ecos静态连接库文件libtarget.a等文件

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2013-7-1 21:05:39 | 显示全部楼层
xi_liang 发表于 2013-7-1 19:26
可能是推广问题,ecos软件支持很丰富,lwip,yaffs,jfffs2,goahead这些都支持,
不过我还没看到一个应 ...

本论坛有一个杨大侠,推了十来年吧?
呵呵。
写了很多文章。
当年都成了牛皮癣了。

出0入0汤圆

 楼主| 发表于 2013-7-2 09:41:45 | 显示全部楼层
移植ecos到百为STM32开发板4——运行ecos helloworld




编译ecos为RAM启动类型
重新生成ecos静态连接库文件libtarget.a等文件

建立helloworld目录,新建helloworld.c和makefile两个文件,
写helloworld.c
#include <cyg/kernel/kapi.h>  
#include <stdlib.h>  
/* this is a simple hello world program */
#include <stdio.h>
void cyg_user_start(void)
{
  printf("Hello, eCos world!\n");
  while(1);
}

编写makefile
# Mostly written by Jonathan Larmour, Red Hat, Inc.
# Reference to ecos.mak added by John Dallaway, eCosCentric Limited, 2003-01-20
# This file is in the public domain and may be used for any purpose
# Usage:   make INSTALL_DIR=/path/to/ecos/install
INSTALL_DIR=$$(INSTALL_DIR) # override on make command line
include $(INSTALL_DIR)/include/pkgconf/ecos.mak
XCC           = $(ECOS_COMMAND_PREFIX)gcc
XCXX          = $(XCC)
XLD           = $(XCC)
OBJCOPY       = $(ECOS_COMMAND_PREFIX)objcopy
CFLAGS        = -I$(INSTALL_DIR)/include
CXXFLAGS      = $(CFLAGS)
LDFLAGS       = -nostartfiles -L$(INSTALL_DIR)/lib -Ttarget.ld
# RULES
.PHONY: all clean
all: helloworld
clean:
-rm -f helloworld helloworld.o helloworld.bin helloworld.srec
helloworld.o: helloworld.c
$(XCC) -c -o $*.o $(CFLAGS) $(ECOS_GLOBAL_CFLAGS) $<
helloworld: helloworld.o
$(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o
$(OBJCOPY) -O srec $@ $@.srec
$(OBJCOPY) -O binary $@ $@.bin

然后在命令行执行make
root@xiliang-desktop:/opt/ecos/ecos-3.0/examples/helloworld# make INSTALL_DIR=/opt/ecos/ecos-3.0/examples/ecos_install/

得到helloworld.bin和helloworld.srec可执行文件,其中helloworld.bin可烧到flash执行(未试),helloworld.srec可被redboot加载到RAM中运行

开发板上电启动redboot,输入load -v -m yMODEM




在超级终端选择传送->发送文件,选择helloworld.srec,协议选择yMODEM




点发送,出现下面界面




待发送完成后,在redboot命令行输入go,即可运行下载的hellowrold程序

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2013-7-3 12:34:44 | 显示全部楼层
lz 能不能把redboot和hello.srec文件上传上来啊。 我的redboot可以启动, 但hello.srec文件始终无法通过ymodem传送给redboot。

出0入0汤圆

发表于 2013-7-3 13:07:42 | 显示全部楼层
您这个厉害了!
经过这段时间的再学习,我发现开源技术越来越火,很多的环境从windows慢慢迁移到了linux。
其实用过一段时间发现linux上的开发环境其实也不是很难用,可以心理关便可入手

熟悉linux环境下开发之后,感觉视野更开阔了,接触的资料更多了。

希望楼主生意越来越好啊!

出0入0汤圆

 楼主| 发表于 2013-7-3 15:22:14 | 显示全部楼层
omityoung 发表于 2013-7-3 12:34
lz 能不能把redboot和hello.srec文件上传上来啊。 我的redboot可以启动, 但hello.srec文件始终无法通过ymo ...

redboot和hello.srec文件打包传上来:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2013-7-3 16:05:52 | 显示全部楼层
xi_liang 发表于 2013-7-3 15:22
redboot和hello.srec文件打包传上来:

谢谢 网上回去试试。。。

出0入0汤圆

发表于 2013-7-3 19:58:11 | 显示全部楼层
为什么我的波特率始终是115200????默认配置是38400就是改了 也还是115200

出0入0汤圆

 楼主| 发表于 2013-7-3 23:16:05 | 显示全部楼层
omityoung 发表于 2013-7-3 19:58
为什么我的波特率始终是115200????默认配置是38400就是改了 也还是115200

那个ecos configure tool图形配置界面好象有点问题,build -> clean都不起作用的,
若是改了配置,把目标文件手工删了,再重新打开ecos configure tool重新编译一下就好了

出0入0汤圆

发表于 2013-7-4 08:56:56 | 显示全部楼层
楼主 v5  
推荐楼主也看看 NuttX 吧 感觉外设也比较齐全,会让你happy 的

出0入0汤圆

发表于 2013-7-4 09:06:43 | 显示全部楼层
楼主 你上传的那个波特率是多少的??  因为我烧录到板子上波特率也是115200

出0入0汤圆

发表于 2013-7-4 09:59:08 | 显示全部楼层
eCos stm32 好东西

出0入0汤圆

发表于 2013-7-29 12:28:48 | 显示全部楼层
楼主是用的什么编译器,arm-eabi吗
我这边编译的时候,始终不成功.
能否提供arm-eabi编译器

出0入0汤圆

发表于 2013-7-29 12:49:08 | 显示全部楼层
arm-eabi-gcc -c  -I/opt/fyg32f103/redboot_ROM_install/include -I/opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0 -I/opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0/src -I/opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0/tests -I. -I/opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0/src/ -finline-limit=7000 -Wall -Wpointer-arith -Wstrict-prototypes -Wundef  -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections  -fno-exceptions -Wp,-MD,src/context.tmp -o src/hal_cortexm_arch_context.o /opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0/src/context.S
make[1]: Leaving directory `/opt/fyg32f103/redboot_ROM_build/hal/cortexm/arch/v3_0'
make[1]: *** [src/context.o.d] Error 1
make: Leaving directory `/opt/fyg32f103/redboot_ROM_build'
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [src/hal_misc.o.d] Error 1
make: *** [build] Error 2

网楼主能解答?

出0入0汤圆

 楼主| 发表于 2013-7-29 13:07:03 | 显示全部楼层
feiyg 发表于 2013-7-29 12:28
楼主是用的什么编译器,arm-eabi吗
我这边编译的时候,始终不成功.
能否提供arm-eabi编译器 ...

不用自己另外装编译器的
上面自动下载的时候就装好了,你看上面的:
移植ecos到百为STM32开发板1——ecos开发环境搭建

装好在ecos目录下就有了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2013-7-29 13:41:00 | 显示全部楼层
ecos有什么特色,好像是个好古董了吧

出0入0汤圆

发表于 2013-7-30 07:54:15 | 显示全部楼层
本帖最后由 feiyg 于 2013-7-30 08:01 编辑
xi_liang 发表于 2013-7-29 13:07
不用自己另外装编译器的
上面自动下载的时候就装好了,你看上面的:
移植ecos到百为STM32开发板1——ecos开 ...


我这边用的是cygwin的环境,编译器使用的是arm-eabi的ecoscentric-gnutools-arm-eabi-20081213-sw.cygwin.tar.bz2
编译的过程中遇到编译错误的问题

arm-eabi-gcc -c  -I/opt/fyg32f103/redboot_ROM_install/include -I/opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0 -I/opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0/src -I/opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0/tests -I. -I/opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0/src/ -finline-limit=7000 -Wall -Wpointer-arith -Wstrict-prototypes -Wundef  -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections  -fno-exceptions -Wp,-MD,src/context.tmp -o src/hal_cortexm_arch_context.o /opt/ecos/ecos-3.0/packages/hal/cortexm/arch/v3_0/src/context.S
make[1]: Leaving directory `/opt/fyg32f103/redboot_ROM_build/hal/cortexm/arch/v3_0'
make[1]: *** [src/context.o.d] Error 1
make: Leaving directory `/opt/fyg32f103/redboot_ROM_build'
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [src/hal_misc.o.d] Error 1
make: *** [build] Error 2

出0入0汤圆

发表于 2013-7-30 11:38:16 | 显示全部楼层
这个是我在smartarm2200的板子上运行的状况,编译器用的是arm-elf

+
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v3_0 - built 10:55:07, Jul 30 2013

Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
RedBoot is free software, covered by the eCos license, derived from the
GNU General Public License. You are welcome to change it and/or distribute
copies of it under certain conditions. Under the license terms, RedBoot's
source code and full license terms must have been made available to you.
Redboot comes with ABSOLUTELY NO WARRANTY.

Platform: Olimex LPC-E2294 development board (ARM7TDMI-S)
RAM: 0x81000000-0x81100000 [0x81005dc8-0x810fc000 available]
FLASH: 0x80000000-0x801fffff, 512 x 0x1000 blocks
RedBoot> fis
*** invalid 'fis' command: too few arguments
Usage:
  fis create [-b <mem_base>] [-l <image_length>] [-s <data_length>]
      [-f <flash_addr>] [-e <entry_point>] [-r <ram_addr>] [-n] <name>
  fis delete name
  fis erase -f <flash_addr> -l <length>
  fis free
  fis init [-f]
  fis list [-c] [-d]
  fis load [-b <memory_load_address>] [-c] name
  fis write -f <flash_addr> -b <mem_base> -l <image_length>
RedBoot>
RedBoot>
Starting xmodem transfer.  Press Ctrl+C to cancel.
Transferring hello.bin...
  100%      29 KB    4 KB/s 00:00:06       0 Errors

Raw file loaded 0x81010000-0x810175eb, assumed entry at 0x81010000
xyzModem - CRC mode, 236(SOH)/0(STX)/0(CAN) packets, 0 retries
RedBoot> go 0x81010000



        *******************************
        *    Hello! The world.        *
        *******************************


        cyg_thread_create(1)
        cyg_thread_create(2)
        cyg_thread_create(3)
        AAAAAA111111 is active.thread data is 1.
        BBBBBB333333 is active.thread data is 2.
        CCCCCC666666 is active.thread data is 3.
        AAAAAA111111 is active.thread data is 1.
        BBBBBB333333 is active.thread data is 2.
        AAAAAA111111 is active.thread data is 1.
        AAAAAA111111 is active.thread data is 1.
        CCCCCC666666 is active.thread data is 3.
        BBBBBB333333 is active.thread data is 2.
        AAAAAA111111 is active.thread data is 1.
        BBBBBB333333 is active.thread data is 2.
        AAAAAA111111 is active.thread data is 1.
        CCCCCC666666 is active.thread data is 3.
        AAAAAA111111 is active.thread data is 1.
        BBBBBB333333 is active.thread data is 2.
        AAAAAA111111 is active.thread data is 1.
        BBBBBB333333 is active.thread data is 2.
        AAAAAA111111 is active.thread data is 1.
        CCCCCC666666 is active.thread data is 3.
        BBBBBB333333 is active.thread data is 2.
        AAAAAA111111 is active.thread data is 1.

出0入0汤圆

 楼主| 发表于 2013-7-30 17:27:10 | 显示全部楼层
feiyg 发表于 2013-7-30 07:54
我这边用的是cygwin的环境,编译器使用的是arm-eabi的ecoscentric-gnutools-arm-eabi-20081213-sw.cygwin. ...

上面用了这个编译工具: ecoscentric-gnutools-arm-eabi-20081213-sw.i386linux.tar.bz2
感觉cywin不太好用,很少用那个。交叉编译器,至少要支持arm-eabi和cortex-m3的

出0入0汤圆

发表于 2013-8-1 12:44:25 | 显示全部楼层
xi_liang 发表于 2013-7-30 17:27
上面用了这个编译工具: ecoscentric-gnutools-arm-eabi-20081213-sw.i386linux.tar.bz2
感觉cywin不太好 ...

上次提到的错误点已经解决了,是cygwin的环境的问题.

make[1]: Leaving directory `/opt/stm3210e_eval/stm3210e_eval_build/redboot/current'
make -r -C hal/cortexm/stm32/stm3210e_eval/current /opt/stm3210e_eval/stm3210e_eval_install/bin/redboot.bin
make[1]: Entering directory `/opt/stm3210e_eval/stm3210e_eval_build/hal/cortexm/stm32/stm3210e_eval/current'
arm-eabi-objcopy --strip-debug /opt/stm3210e_eval/stm3210e_eval_install/bin/redboot.elf /opt/stm3210e_eval/stm3210e_eval_install/bin/redboot.img
arm-eabi-objcopy -O srec /opt/stm3210e_eval/stm3210e_eval_install/bin/redboot.elf /opt/stm3210e_eval/stm3210e_eval_install/bin/redboot.srec
arm-eabi-objcopy -O binary /opt/stm3210e_eval/stm3210e_eval_install/bin/redboot.elf /opt/stm3210e_eval/stm3210e_eval_install/bin/redboot.bin
make[1]: Leaving directory `/opt/stm3210e_eval/stm3210e_eval_build/hal/cortexm/stm32/stm3210e_eval/current'
build finished
make: Leaving directory `/opt/stm3210e_eval/stm3210e_eval_build'

在STM32编译的过程中,发现STM32都是需要外带SRAM和ROM的,但是我现在只有一个mini_stm32,没有外挂任何存储芯片,这种方式怎么编译,求解?

出0入0汤圆

发表于 2013-8-1 14:41:01 | 显示全部楼层
xi_liang 发表于 2013-7-30 17:27
上面用了这个编译工具: ecoscentric-gnutools-arm-eabi-20081213-sw.i386linux.tar.bz2
感觉cywin不太好 ...


终于把ecos的kernel编译成库了.


make[1]: Leaving directory `/opt/mini_stm32/mini_stm32_kernel/mini_stm32_kernel_rom_build/hal/cortexm/arch/current'
build finished
make: Leaving directory `/opt/mini_stm32/mini_stm32_kernel/mini_stm32_kernel_rom_build'

没有直接使用redboot,因为只有stm32的芯片内部flash,没有外围的存储器芯片,所以直接使用kernel+app的方式,下载到mini_STM32的开发板上,运行效果.




        *******************************
        *    Hello! The world.        *
        *******************************


        cyg_thread_create(1)
        cyg_thread_create(2)
        cyg_thread_create(3)
        AAAAAA111111 is active.thread data is 1.
        BBBBBB333333 is active.thread data is 2.
        CCCCCC666666 is active.thread data is 3.
        AAAAAA111111 is active.thread data is 1.
        AAAAAA111111 is active.thread data is 1.
        BBBBBB333333 is active.thread data is 2.
        AAAAAA111111 is active.thread data is 1.
        AAAAAA111111 is active.thread data is 1.
        AAAAAA111111 is active.thread data is 1.
        BBBBBB333333 is active.thread data is 2.
        AAAAAA111111 is active.thread data is 1.
        CCCCCC666666 is active.thread data is 3.
        AAAAAA111111 is active.thread data is 1.
        AAAAAA111111 is active.thread data is 1.

出0入0汤圆

发表于 2013-9-5 12:25:42 | 显示全部楼层
xi_liang 发表于 2013-7-1 15:21
ecos开发环境搭建参考了老同事的博客介绍:

ubuntu9.10中安装eCos并建立eCos开发环境

这个eCos楼主有调用C++ API的经验么???我想让程序更加上层些。。。

出0入0汤圆

 楼主| 发表于 2013-10-9 22:49:20 | 显示全部楼层
Nexus 发表于 2013-9-5 12:25
这个eCos楼主有调用C++ API的经验么???我想让程序更加上层些。。。

C++有搞过,但貌似ecos没有提供一个像UCGUI那样集成的DEMO。
看到ecos的主页宣称支持yaffs,goahead等等等等,但没见有例子。草蛋

出0入0汤圆

发表于 2013-10-10 22:25:28 | 显示全部楼层
xi_liang 发表于 2013-10-9 22:49
C++有搞过,但貌似ecos没有提供一个像UCGUI那样集成的DEMO。
看到ecos的主页宣称支持yaffs,goahead等等 ...

Demo什么的确实没有。。。我是目前想用C++来写,遇到了点问题。。。
就是主函数:
extern int main(void)在main.cxx里面,发现eCOS启动不起来,不知道什么问题~~~求些许指导!

出0入0汤圆

 楼主| 发表于 2013-10-10 22:41:45 | 显示全部楼层
Nexus 发表于 2013-10-10 22:25
Demo什么的确实没有。。。我是目前想用C++来写,遇到了点问题。。。
就是主函数:
extern int main(void) ...

用cyg_user_start这个代替main函数试下

出0入0汤圆

发表于 2013-10-10 22:54:18 | 显示全部楼层
xi_liang 发表于 2013-10-10 22:41
用cyg_user_start这个代替main函数试下

回头试试。。。谢谢。。。
感觉eCOS支持的好少,想用C++写一些上层的程序,发现eCOS的C++API好难查找~~~~略感无力

出0入0汤圆

发表于 2013-10-13 22:35:06 | 显示全部楼层
向楼主致敬。

出0入0汤圆

发表于 2013-10-14 21:39:46 | 显示全部楼层
编译HELLOWORLD出现了问题, skipping incompatible /home/yang/share/rtos-ecos/ecos-3.0/examples/ecos_install/lib/vectors.o when searching for vectors.o
/usr/bin/ld: cannot find vectors.o  楼主这是什么原因?

出0入0汤圆

 楼主| 发表于 2013-10-14 22:09:49 | 显示全部楼层
dso_2012 发表于 2013-10-14 21:39
编译HELLOWORLD出现了问题, skipping incompatible /home/yang/share/rtos-ecos/ecos-3.0/examples/ecos_i ...

看意思是有不兼容的vectors.o,是不是之前有用不用的交叉编译器编译过,重新build一下看看

出0入0汤圆

发表于 2013-12-26 16:41:42 | 显示全部楼层
多谢 楼主 整好需要用下

出0入0汤圆

发表于 2013-12-26 21:45:22 | 显示全部楼层
太折腾了,不如直接用uclinux

出0入0汤圆

发表于 2014-1-6 23:08:07 | 显示全部楼层
mark     学习中

出0入0汤圆

 楼主| 发表于 2014-2-28 13:02:10 | 显示全部楼层
wujinliang 发表于 2013-12-26 16:41
多谢 楼主 整好需要用下


各有好处的,之前工作见过有几家公司在用这个代替原来的linux系统

PS:回错了不好意思

出0入0汤圆

 楼主| 发表于 2014-2-28 13:02:52 | 显示全部楼层
Xplain 发表于 2013-12-26 21:45
太折腾了,不如直接用uclinux

各有好处的,之前工作见过有几家公司在用这个代替原来的linux系统

出0入0汤圆

发表于 2014-3-19 16:06:53 | 显示全部楼层
252514251 发表于 2013-7-4 08:56
楼主 v5  
推荐楼主也看看 NuttX 吧 感觉外设也比较齐全,会让你happy 的

请问Nuttx ubuntu 下的编译环境怎么搭建?

出0入0汤圆

 楼主| 发表于 2014-5-16 15:59:30 | 显示全部楼层
pdenjoh 发表于 2014-3-19 16:06
请问Nuttx ubuntu 下的编译环境怎么搭建?

Nuttx没搞过,应该也差不多吧,都是用GCC编译

出0入0汤圆

 楼主| 发表于 2014-6-26 17:41:44 | 显示全部楼层
一直在领先,从未被超越。一年了,还没有开发板在STM32上搞ecos的

出0入0汤圆

发表于 2015-6-8 14:16:29 | 显示全部楼层
刚验证了ecos3.0版本,要打补丁才可编译通过

出0入0汤圆

发表于 2015-6-8 16:16:33 来自手机 | 显示全部楼层
我觉得stm32上跑ecos实用意义不大呀
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-8-26 06:26

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表