打印

我DIY的STM32核心板启动uClinux成功了

[复制链接]
25396|84
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
不爱说话|  楼主 | 2013-1-22 10:40 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 不爱说话 于 2013-3-7 16:27 编辑

增加一个uClinux启动的视频

板子是我自己做的,外扩了flash和大容量pSRAM(4M Byte)。FSMC的片选按照ST3210E-EVAL设计的,使用了ST官方发布的uClinux针对我的板子进行修改。只是苦于ST提供的bootloader没有源码,为了启动我修改后的uClinux费了不少功夫,最后分析上网搜索linux的启动步骤,自己写了一个bootloader,顺利的启动了uClinux。虽然还有些小问题,别的不说了先上启动信息(后面有板子的照片)

Linux version 2.6.26-uc0 (root@localhost.localdomain) (gcc version 4.5.2 (Sourcery G++ Lite 2011.03-46) ) #18 Mon Jan 21 14:36:20 CST 2013
CPU: ARMv7-M Processor [411fc231] revision 1 (ARMv?(11)M)
Machine: STM3210E-EVAL
SRAM Config: bank[0] @ 0x68000000 (size: 4096KB) - bank[1] @ 0x20000000 (size: 64KB).
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 1016
Kernel command line: noinitrd root=mtd1 rootfstype=jffs2 init=/linuxrc console=ttyS0
PID hash table entries: 16 (order: 4, 64 bytes)
console [ttyS0] enabled
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 4MB 0MB = 4MB total
Memory: 4052KB available (492K code, 56K data, 8K init)
Mount-cache hash table entries: 512
JFFS2 version 2.2. 漏 2001-2006 Red Hat, Inc.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
kobject_add_internal failed for P/ with -EEXIST, don't try to register things with the same name in the same directory.
simple-gpio: now handling 16 GPIOs: 0 - 15
ttyS0 at MMIO 0x40013800 (irq = 37) is a STM32 USART1 Port
Probed and found the STM3210E-EVAL NOR flash chip
Creating 4 MTD partitions on "S29GL064N NOR FLASH":
0x00000000-0x00100000 : "Kernel raw data"
0x00100000-0x00160000 : "rootfs"
0x00160000-0x00190000 : "rawdata"
0x00190000-0x001c0000 : "cramfs_partition"
rtc-stm3210e_eval rtc-stm3210e_eval.0: rtc core: registered rtc-stm3210e_eval as rtc0
rtc-stm3210e_eval rtc-stm3210e_eval.0: setting system clock to 1970-01-01 00:00:00 UTC (0)
VFS: Mounted root (jffs2 filesystem) readonly.
Bad page state in process 'swapper'
page:68001040 flags:0x00000000 mapping:00000000 mapcount:1 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Bad page state in process 'swapper'
page:68001060 flags:0x00000000 mapping:00000000 mapcount:1 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Freeing init memory: 8K
Mounting proc fs
Mounting sysfs
Welcome to
       ____ _  _
      /  __| ||_|
_   _| |  | | _ ___   _   _ _    _
| | | | |  | || |  _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/    \
| ___ \____|_||_|_| |_|\____|\_/\_/
| |
|_|

For further information check:

http://www.uclinux.org/

http://www.st.com/stm32

/ #

IMG_3262.JPG (117.91 KB )

核心板背面

核心板背面

IMG_3261.JPG (122.21 KB )

核心板正面

核心板正面
沙发
不爱说话|  楼主 | 2013-1-22 13:15 | 显示全部楼层
LDTEST 发表于 2013-1-22 11:13
呱唧呱唧!

谢谢关注!

使用特权

评论回复
板凳
不爱说话|  楼主 | 2013-1-22 13:19 | 显示全部楼层
戒指320 发表于 2013-1-22 13:11
uclinux 跑起来后  请问cpu还能干点啥

我移植的是ST官方的那个uClinux包,它里面只是一个demo。可以点亮LED,液晶屏什么的。因为我这个是核心板没有LCD所以就没有这些了。linux功能很多的,系统能跑起来后具体的功能就看需要添加了。

使用特权

评论回复
地板
不爱说话|  楼主 | 2013-1-22 16:23 | 显示全部楼层
戒指320 发表于 2013-1-22 13:21
f103系列的不建议使用uclinux

作为学习uclinux用还是可以的。

使用特权

评论回复
5
不爱说话|  楼主 | 2013-1-23 09:55 | 显示全部楼层
reille 发表于 2013-1-22 22:44
板子不错啊,很精致,几层?4层板?BGA的封装,焊接不易啊
此外,LZ有兴趣移植个ecos上去呗 ...

2层板 + 手工焊接BGA

你说的ecos是ucos-II吗,这些系统移植到STM32满大街都是,没必要再重复了吧。

使用特权

评论回复
6
不爱说话|  楼主 | 2013-1-23 16:24 | 显示全部楼层
aceice 发表于 2013-1-23 10:14
手工BGA?咋检查呢?

我用程序测试的。

使用特权

评论回复
7
不爱说话|  楼主 | 2013-1-23 22:53 | 显示全部楼层
aceice 发表于 2013-1-23 20:11
e...胆大心细啊
就用的热风枪吹的吧?

用热风枪吹到一定的温度,锡球就会融化和焊盘连上,这时用镊子轻轻推一下芯片,由于张力作用,芯片会自动回到原位,这时就可以降温关热风枪了。
这是多年的经验一般人我不告诉:)

使用特权

评论回复
8
不爱说话|  楼主 | 2013-2-21 22:55 | 显示全部楼层
本帖最后由 不爱说话 于 2013-2-21 23:00 编辑
huangfeng33 发表于 2013-2-21 21:03
分享的比较全面,楼主好人,顶一个,必须的!!支持


多谢支持!我后来又完善了一下移植的uCLinux,增加了对可读写JFFS2分区的支持。可惜了解uCLinux是怎么回事的人不多,不知道我是否还有继续下去的必要?
我的STM32 uClinux具备了初步的实用价值(加载JFFS2文件系统成功) https://bbs.21ic.com/icview-438364-1-1.html

使用特权

评论回复
9
不爱说话|  楼主 | 2013-3-8 09:24 | 显示全部楼层
谢谢关注!
后续我又写了几个实用的程序用在这个板子上。有兴趣的话可以关注我的TB店。

使用特权

评论回复
10
不爱说话|  楼主 | 2013-3-12 10:15 | 显示全部楼层
ABCDELF 发表于 2013-3-9 15:54
2层板能花下来吗
线宽多少啊
过孔内径 外径多少

能画出来的。只要用心。

使用特权

评论回复
11
不爱说话|  楼主 | 2013-5-6 09:55 | 显示全部楼层
很明显你的内存不够,在STM32上跑uclinux至少需要1M内存,你板子上的512k太小了。

使用特权

评论回复
12
不爱说话|  楼主 | 2013-5-7 10:14 | 显示全部楼层
不客气:)

使用特权

评论回复
13
不爱说话|  楼主 | 2013-5-8 17:21 | 显示全部楼层
自己写bootloader,需要知道内核的加载地址(如果是XIP内核直接跳过去就是了),另外就是bootloader传递给内核的参数。

使用特权

评论回复
14
不爱说话|  楼主 | 2013-5-14 10:01 | 显示全部楼层
Simon21ic 发表于 2013-5-11 22:45
请问是否提供uClinux的patch?
虽然由于成本原因,无法直接把移植的任务外包给LZ,不过还是可以参考一下LZ ...

你可以期待STM32F439,这个集成了SDRAM控制器。有了大容量的DRAM,相信跑uclinux会更好。

使用特权

评论回复
15
不爱说话|  楼主 | 2013-5-14 10:02 | 显示全部楼层
cjhk 发表于 2013-5-12 13:27
强大   呵呵   顶一个   原创帖   必须要加精   呵呵

谢谢支持!!!

使用特权

评论回复
16
不爱说话|  楼主 | 2013-5-20 12:20 | 显示全部楼层
Simon21ic 发表于 2013-5-20 01:28
STM32的官方移植代码,连最基本的内存映射和管理都有问题,能够运行简直是奇葩
内存0x20000000开始64K,0x6 ...

周末一直没有上来。今天看到你的很多回复,很有水平啊!
我的板子跑ST官方的uCLinux也只是demo而已,毕竟他们有很多东西没有实现。希望我的板子对你有帮助,希望你的项目能很快用上uCLinux:)

使用特权

评论回复
17
不爱说话|  楼主 | 2013-5-21 11:10 | 显示全部楼层
Simon21ic 发表于 2013-5-20 18:41
谢谢,你的硬件确实非常合适用来做一些uclinux的系统验证。
BUG也都找到并且修复了,我也可以放心在实际产 ...

多谢了。回来我试试。

使用特权

评论回复
18
不爱说话|  楼主 | 2015-6-29 12:52 | 显示全部楼层
天灵灵地灵灵 发表于 2015-6-27 10:31
我从另外一个帖子过来的,好高大上的感觉,这个是串口实现显示吗、

你问的串口实时显示是什么意思?

使用特权

评论回复
19
不爱说话|  楼主 | 2015-6-30 13:36 | 显示全部楼层
天灵灵地灵灵 发表于 2015-6-29 19:30
就是电脑屏幕上的,是通过串口发来的数据吗?

是的啊

使用特权

评论回复
20
不爱说话|  楼主 | 2017-1-4 10:53 | 显示全部楼层
现在看来PASRAM容量还是太小,跑uClinux不宽裕。
我现在已经转向Linux kernel 4.20了,正在做STM32F429的porting,板载SDRAM 16MB,SPI FLASH 16MB。很快会有成果!

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:飞翼电子工作室 http://shop68798667.taobao.com/

115

主题

886

帖子

34

粉丝