文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Coldfire M5272C3 colilo flash mini-howto

Coldfire M5272C3 colilo flash mini-howto

时间:2006-06-03  来源:rwen2012

Coldfire M5272C3 colilo flash mini-howto
These are some results of my first day with uClinux on the motorola 5272C3 board with other people who are also new on the subject. One of the first things I wanted to try before getting to the 'real programming' was running uClinux from flash, but without killing dBug if possible. I managed by flashing a combined colilo-uclinux image in the second part of flash, and by switching the jumper on the 5272C3 board booting into this image. I'm sure there are a lot of other (and better) ways of doing things, read on for what I have done.
  1. make some small changes to colilo
  2. create a combined image
  3. flash using dBug

1. Some Changes to colilo

First some changes small to the vendors/Motorola/M527C3-16MB directory that makes colilo run in the second part of flash (at 0xfff00000 instead of 0xffe00000) and load the compressed linux image from 0xfff08000 instead of 0xffe40000
--------------------
diff -r M5272C3-16MB/Makefile M5272C3-16MB/Makefile
2c2
< $(OBJCOPY) --input-target=binary --output-target=srec --adjust-vma 0xffe00000 \
---
> $(OBJCOPY) --input-target=binary --output-target=srec --adjust-vma 0xfff00000 \
diff -r M5272C3-16MB/board.c M5272C3-16MB/board.c
33,34c33,34
< source_addr = (unsigned char *)0xffe40000;
< down_addr = (unsigned char *)0xffe40000;
---
> source_addr = (unsigned char *)0xfff08000;
> down_addr = (unsigned char *)0xfff08000;
62,63c62,63
< mbar_writeLong(MCFSIM_CSBR0, 0xFFE00201);
< mbar_writeLong(MCFSIM_CSOR0, 0xFFE00014);
---
> mbar_writeLong(MCFSIM_CSBR0, 0xFFF00201);
> mbar_writeLong(MCFSIM_CSOR0, 0xFFF00014);
diff -r M5272C3-16MB/flash.ld M5272C3-16MB/flash.ld
3c3
< flash : ORIGIN = 0xffe00000, LENGTH = 0x00004000
---
> flash : ORIGIN = 0xfff00000, LENGTH = 0x00008000
------------------------

2. Making the combined image

This creates a image that consists of the zipped linux image and colilo. uclinux is appended at offset 0x8000 after colilo :
$ gzip -9 -c /tmp/image.gz 
$ dd if=../colilo-20030502/colilo.bin of=img
$ dd if=/tmp/image.gz of=img bs=1024 seek=32 conv=sync
$ m68k-elf-objcopy --input-target=binary --output-target=srec --adjust-vma 0xfff00000 img img.s19
$ cp img.s19 /tftpboot

3 . Flashing the image using dBug

Boot the board with the jumper in the normal position and download and flash the image
dBug> set filename img.s19
dBug> set filetype s19
dBug> dn -o -ffe20000
dBug> update
The 'upuser' command flashes data from 0x20000 to 0xffe40000, so by placing our data at 0xe0000 it is flashed to 0xfff00000. When the jumper is set to the other position, the board starts booting from here, instead from 0xffe00000. The "-o -ffe20000" parameter does the trick. The image is created for address 0xfff00000, but Dbug cannot download the image to that address directly, since it's flash. The "-o -ffe20000" tells dbug to download the image into RAM at offset -ffe20000 relative to the address in the S19 file.
相关阅读 更多 +
排行榜 更多 +
空中跑酷汉化版

空中跑酷汉化版

赛车竞速 下载
修仙传说

修仙传说

角色扮演 下载
魔界零之迷宫

魔界零之迷宫

冒险解谜 下载