2010-02-17 08:28:34     My first bare metal. Plese point me.

Document created by Aaronwu Employee on Sep 26, 2013
Version 1Show Document
  • View in full screen mode

2010-02-17 08:28:34     My first bare metal. Plese point me.

Morten Winkler (DENMARK)

Message: 86177   

 

Hi All.

 

I have the Bluetechnix CM-BF561 board up and running. I have my costum hardware tested and verified by building and running testprograms on the ucLinux installed on my board. So far so good. Now I want to make my programs run bare metal w/o the embedded linux

 

I have the the GCC tool chain installing and working on my development host - Kubuntu 9.10.

 

"bfin-linux-uclibc-gcc -v" says

 

Using built-in specs.

Target: bfin-linux-uclibc

Configured with: /usr/src/packages/BUILD/blackfin-toolchain-09r1/../gcc-4.1/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=bfin-linux-uclibc --prefix=/opt/uClinux/bfin-linux-uclibc --enable-threads=posix --enable-shared --with-sysroot=/opt/uClinux/bfin-linux-uclibc/bfin-linux-uclibc/runtime --disable-libstdcxx-pch --disable-symvers --disable-libssp --disable-libffi --enable-clocale=generic --enable-version-specific-runtime-libs --enable-__cxa_atexit --with-bugurl=URL:http://blackfin.uclinux.org/gf/project/toolchain/tracker --with-pkgversion=ADI-09r1-10

Thread model: posix

gcc version 4.1.2 (ADI svn)

 

My testprogram is "int main(void) { return 1; }" (And I have the trailing newline)

 

Output from make is

 

bfin-linux-uclibc-gcc -o da --static  main.c

bfin-linux-uclibc-strip -g da

bfin-uclinux-ldr -T bf561 -c --bits 16 --dma 8 da.ldr da --bmode para

Creating LDR da.ldr ...

Adding DXE 'da' ... [jump block to 0x000000B0] [ELF block: 4172 @ 0x00000000] [ELF block: 460 @ 0x0000504C] OK!

Done!

 

 

During the following dialog I transfer da.ldr to my board using minicom and U-boot:

 

bfin> loady

## Ready for binary (ymodem) download to 0x01000000 at 115200 bps...

C## Total Size      = 0x0000120c = 4620 Bytes

bfin>

bfin> bootldr 0x01000000

## Booting ldr image at 0x01000000 ...

loading to 0xffa00000 (0xc bytes) flags: 0x0002

loading to 0x00000000 (0x104c bytes) flags: 0x0002

loading to 0x0000504c (0x188 bytes) flags: 0x0002

loading to 0x000051d4 (0x44 bytes) flags: 0x8003

 

 

The then out put halts. This might work - I wouldn't know :-)

 

My questions are:

 

    Does this approach seem right? Can anybody spot something Imight have done wrong.

    Please point me to a resource so I can access the PF I/O pins on my board and access my costum hardware. I cannot find anything on that quite simple issue.

 

Best regards and thank you in advance.

 

Morten W.

QuoteReplyEditDelete

 

 

2010-02-17 11:29:47     Re: My first bare metal. Plese point me.

Mike Frysinger (UNITED STATES)

Message: 86178   

 

using bfin-linux-uclibc makes no sense.  please read the documentation:

https://docs.blackfin.uclinux.org/doku.php?id=toolchain:targets

QuoteReplyEditDelete

 

 

2010-02-17 15:23:33     Re: My first bare metal. Plese point me.

Morten Winkler (DENMARK)

Message: 86182   

 

Hi Mike.

 

Good point. Thank you.

Attachments

    Outcomes