2008-08-09 00:52:16 coreb elf
Pranay Upadhyay (INDIA)
Message: 60195
Hello sir,
I have write the simple C program for led blink for BF 561 EZ-KIT.As I read from documentation, first I am compiling the code through bfin-elf-gcc. When in code main function named as a int coreb_main(void) then I am getting following error
[root@PranayU coreb_ledblink]# make
bfin-elf-gcc -o blink -mcpu=bf561-0.3 -mmulticore -mcoreb main_c.o
/opt/uClinux/bfin-elf/lib/gcc/bfin-elf/4.1.2/../../../../bfin-elf/lib/bf561-0.2/basiccrt.o: In function `__start':
/usr/src/packages/BUILD/blackfin-toolchain-08r1/../gcc-4.1/libgloss/bfin/basiccrt.S:390: undefined reference to `_main'
collect2: ld returned 1 exit status
make: *** [blink] Error 1
But the main function is simple int main(void), then there is no error and compiled successfully.Is it formed elf file is write?
And when I run the made elf file in coreB using the given command
/pranay/uClinux-dist/user/blkfin-apps/corebld/coreb> corebld main_c
Then I am getting error like that
bash: /pranay/uClinux-dist/user/blkfin-apps/corebld/coreb: cannot execute binary file
where am I doing wrong please, guide me?
-Regards
Pranay
QuoteReplyEditDelete
2008-08-10 23:26:55 Re: coreb elf
Yi Li (CHINA)
Message: 60215
Why not define main() in your program?
QuoteReplyEditDelete
2008-08-11 00:58:01 Re: coreb elf
Pranay Upadhyay (INDIA)
Message: 60219
Hello sir,
I have read in some document that when code used for the coreB you give main function as a coreb_main.Now I am using as main(). I am reading the document for loading the C program to the Core B.I am trying to do same thing but I am not successful.I have loaded the 2008R1 uboot. Can you told me some more document about this.Where is the coreb driver, for loading the c-program in core B?
When I am booting that code then I am getting following error
---------------------------------------------------
## Total Size = 0x0000fb18 = 64280 Bytes
## Start Addr = 0x01000000
bfin> erase 0x20030000 0x207effff
- Warning: 1 protected sectors will not be erased!
........................................................................................................................... done
Erased 124 sectors
bfin> cp.b 0x1000000 0x20030000 $(filesize)
Copy to Flash... Can't write to protected Flash sectors
bfin> bootelf 0x20030000
Loading .init @ 0xff600000 (18 bytes)
Loading .text @ 0xff600014 (3644 bytes)
Loading .fini @ 0xff600e50 (14 bytes)
Loading .rodata @ 0xff400000 (8 bytes)
Loading .eh_frame @ 0xff400008 (4 bytes)
Loading .ctors @ 0xff40000c (8 bytes)
Loading .dtors @ 0xff400014 (8 bytes)
Loading .jcr @ 0xff40001c (4 bytes)
Loading .data @ 0xff400020 (2076 bytes)
Clearing .bss @ 0xff40083c (92 bytes)
## Starting application at 0xff600014 ...
Ack! Something bad happened to the Blackfin!
SEQUENCER STATUS:
SEQSTAT: 0000c02b IPEND: 3fc00bc SYSCFG: 0032
HWERRCAUSE: 0x3
EXCAUSE : 0x2b
physical IVG7 asserted : <0x03fc0764> { _evt_default + 0x0 }
RETE: <0xa2291404> { ___smulsi3_highpart + 0x9e2bb6e0 }
RETN: <0xa130908a> { ___smulsi3_highpart + 0x9d333366 }
RETX: <0xff7ffff6> { ___smulsi3_highpart + 0xfb82a2d2 }
RETS: <0x03fcdaca> { _do_bootelf + 0x96 }
PC : <0x03fc00bc> { _start + 0xbc }
DCPLB_FAULT_ADDR: <0xffb00fff> { __etext_l1 + 0x100fc7 }
ICPLB_FAULT_ADDR: <0xff7ffff6> { ___smulsi3_highpart + 0xfb82a2d2 }
PROCESSOR STATE:
R0 : 06380000 R1 : 03fc400d R2 : 00000fb6 R3 : ffffffff
R4 : 00000000 R5 : 00000000 R6 : 00000000 R7 : ffb00000
P0 : ffb00000 P1 : 03fc4058 P2 : ffb00fff P3 : 00000002
P4 : ff600014 P5 : 03f9c000 FP : 03f9bcd6 SP : 03f9babc
LB0: 03fd5cec LT0: 03fd5ce0 LC0: 00000000
LB1: 03fc65ae LT1: 03fc65a8 LC1: 00000000
B0 : 364197d7 L0 : 00000000 M0 : 38b7c7fc I0 : 20030000
B1 : d24dff2e L1 : 00000000 M1 : 9e9595b5 I1 : 03fd78f8
B2 : d49513cb L2 : 00000000 M2 : acc073bb I2 : d6c72f9a
B3 : 93365fd5 L3 : 00000000 M3 : deec3fa3 I3 : c78456dd
A0.w: 24c9c666 A0.x: 00000000 A1.w: 00004a2b A1.x: 00000000
USP : 4d166b76 ASTAT: 00001006
Hardware Trace:
0 Target : <0x03fc0504> { _bfin_panic + 0x0 }
Source : <0x03fc068e> { _trap_c + 0x14a }
1 Target : <0x03fc0682> { _trap_c + 0x13e }
Source : <0x03fc0560> { _trap_c + 0x1c }
2 Target : <0x03fc0544> { _trap_c + 0x0 }
Source : <0x03fc070a> { _trap + 0x56 }
3 Target : <0x03fc06b4> { _trap + 0x0 }
Source : <0xff7ffff2> { ___smulsi3_highpart + 0xfb82a2ce }
4 Target : <0xff600014> { ___smulsi3_highpart + 0xfb62a2f0 }
Source : <0x03fcdac8> { _do_bootelf + 0x94 }
5 Target : <0x03fcdab8> { _do_bootelf + 0x84 }
Source : <0x03fc731c> { _strncpy + 0x1c }
6 Target : <0x03fc731a> { _strncpy + 0x1a }
Source : <0x03fc7312> { _strncpy + 0x12 }
7 Target : <0x03fc730c> { _strncpy + 0xc }
Source : <0x03fc7318> { _strncpy + 0x18 }
8 Target : <0x03fc730c> { _strncpy + 0xc }
Source : <0x03fc7318> { _strncpy + 0x18 }
9 Target : <0x03fc730c> { _strncpy + 0xc }
Source : <0x03fc7318> { _strncpy + 0x18 }
10 Target : <0x03fc730c> { _strncpy + 0xc }
Source : <0x03fc7318> { _strncpy + 0x18 }
11 Target : <0x03fc730c> { _strncpy + 0xc }
Source : <0x03fc7318> { _strncpy + 0x18 }
12 Target : <0x03fc730c> { _strncpy + 0xc }
Source : <0x03fc7318> { _strncpy + 0x18 }
13 Target : <0x03fc730c> { _strncpy + 0xc }
Source : <0x03fc7318> { _strncpy + 0x18 }
14 Target : <0x03fc730c> { _strncpy + 0xc }
Source : <0x03fc7318> { _strncpy + 0x18 }
15 Target : <0x03fc730c> { _strncpy + 0xc }
Source : <0x03fc7318> { _strncpy + 0x18 }
Please reset the board
### ERROR ### Please RESET the board ###
-Regards
pranay
QuoteReplyEditDelete
2008-08-11 03:45:45 Re: coreb elf
Yi Li (CHINA)
Message: 60224
Did you follow the doc: http://docs.blackfin.uclinux.org/doku.php?id=load_application_running_in_bf561_core_b? Could you try to run the examples?
QuoteReplyEditDelete
2008-08-11 04:01:37 Re: coreb elf
Pranay Upadhyay (INDIA)
Message: 60225
hello sir,
Yes i am following the same documents , But I am not getiing the point at
corebld loads test_c to memory according the the program headers:
root:/usr/coreb> corebld test_c
wrote 2204 bytes to 0x0xff400000
wrote 3714 bytes to 0x0xff600000
Starting Core B
Where is the core B driver? I was trying for example, but 2007R1 dist. the example is different as you told in document.may I take from svn and run the example code as said in document,
-Regards
pranay
QuoteReplyEditDelete
2008-08-11 06:14:27 Re: coreb elf
Yi Li (CHINA)
Message: 60240
The the coreb driver you mentioned, please configure your kernel as the doc says:
"
Linux kernel:
BF561 Specific Configuration -->
--- Core B Support
Core B Support --->
[*] Enable Core B support
[*] Enable Core B reset support
uClinux-dist:
Blackfin app programs --->
[*] BF561 Core B support tools
"
And you cannot use it on 2007R1, since the gcc options "
-mcpu=bf561-0.3 -mmulticore -mcoreb
" requires 2008R1 toolchain.
QuoteReplyEditDelete
2008-08-11 19:56:04 Re: coreb elf
Mike Frysinger (UNITED STATES)
Message: 60260
if the document isnt on our websites, then you shouldnt be following it. none of our documentation refers to "coreb_main".
QuoteReplyEditDelete
2008-08-20 02:37:26 Re: coreb elf
Pranay Upadhyay (INDIA)
Message: 60714
Hello sir,
After compilinf the code through the bfin-elf-gcc compiler I am getting the following warnning.
root@PranayU singlecorevideoout]# make
bfin-elf-gcc -c -mcpu=bf561 -g l3_sdram.c -o l3_sdram.o
In file included from system.h:5,
from l3_sdram.h:5,
from l3_sdram.c:2:
ccblkfn.h:164:1: warning: "alloca" redefined
In file included from /opt/uClinux/bfin-elf/lib/gcc/bfin-elf/4.1.2/../../../../bfin-elf/include/stdlib.h:19,
from ccblkfn.h:18,
from system.h:5,
from l3_sdram.h:5,
from l3_sdram.c:2:
/opt/uClinux/bfin-elf/lib/gcc/bfin-elf/4.1.2/../../../../bfin-elf/include/alloca.h:14:1: warning: this is the location of the previous definition
l3_sdram.c:13:100: warning: no newline at end of file
bfin-elf-gcc -c -mcpu=bf561 -g isrb.c -o isrb.o
In file included from system.h:5,
from mainb.h:4,
from isrb.c:1:
ccblkfn.h:164:1: warning: "alloca" redefined
In file included from /opt/uClinux/bfin-elf/lib/gcc/bfin-elf/4.1.2/../../../../bfin-elf/include/stdlib.h:19,
from ccblkfn.h:18,
from system.h:5,
from mainb.h:4,
from isrb.c:1:
/opt/uClinux/bfin-elf/lib/gcc/bfin-elf/4.1.2/../../../../bfin-elf/include/alloca.h:14:1: warning: this is the location of the previous definition
bfin-elf-gcc -c -mcpu=bf561 -g coreb_main.c -o coreb_main.o
In file included from system.h:5,
from mainb.h:4,
from coreb_main.c:1:
ccblkfn.h:164:1: warning: "alloca" redefined
In file included from /opt/uClinux/bfin-elf/lib/gcc/bfin-elf/4.1.2/../../../../bfin-elf/include/stdlib.h:19,
from ccblkfn.h:18,
from system.h:5,
from mainb.h:4,
from coreb_main.c:1:
/opt/uClinux/bfin-elf/lib/gcc/bfin-elf/4.1.2/../../../../bfin-elf/include/alloca.h:14:1: warning: this is the location of the previous definition
There is no problem in the toolchain installation I have tested many code but not getting that type of warnning.What should be the problem?
-Regards
Pranay
QuoteReplyEditDelete
2008-08-20 02:47:49 Re: coreb elf
Mike Frysinger (UNITED STATES)
Message: 60715
do you read the things before you post them ? we do not provide a "ccblkfn.h" header with our toolchains. if you have a local version that conflicts with the system headers, that's up to you to resolve. the warnings tell you quite clearly what is conflicting.
QuoteReplyEditDelete
2008-08-20 08:32:10 Re: coreb elf
Pranay Upadhyay (INDIA)
Message: 60751
hello sir,
Sorry sir, actually I had read this but I am not able to understand the things.I have created the elf file but not working.In my code I am try to display Bar pattern on monitor using single core from elf file.I am attatching the elf file for that please check this is it correct or not.
-Regards
Pranay
adi_itu656.h
video
QuoteReplyEditDelete
2008-08-20 10:37:34 Re: coreb elf
Robin Getz (UNITED STATES)
Message: 60760
Pranay:
We can not help you move VDSP code to Linux - we have said that every time you ask. We don't have the examples you are looking for. If you can not figure it out by yourself - there isn't much we can do to help.
-Robin
QuoteReplyEditDelete
2008-08-23 09:24:28 Re: coreb elf
Pranay Upadhyay (INDIA)
Message: 60944
Hello sir,
Please give me some information , that how can we declare the SDRAM for core B in the fikle bfin-common-mc.ld , when I am using the multicore for standalone application.
-Regards
Pranay