2008-08-27 06:12:11 problem for standalone application using coreB
Pranay Upadhyay (INDIA)
Message: 61172
Hello sir,
I am trying to use simple LED blinking code using coreB. The makefile for this is that
OBJS=main.o
SRCS=$(SRCS:%.o=%.c)
CFLAGS=-g
all: blink
.c.o:
bfin-elf-gcc -c -mcpu=bf561 $(CFLAGS) $< -o $@
blink: $(OBJS)
bfin-elf-gcc -o $@ -mcpu=bf561 -mmulticore -mcoreb $(OBJS)
clean:
rm -f blink *.o *.i *.s
But after compiling the code I am gettin the eroor
/opt/uClinux/bfin-elf/lib/gcc/bfin-elf/4.1.2/../../../../bfin-elf/lib/bf561-none/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.
What should be modification in any file?
Can you tell me which toolchain should be installed on my PC for use of dual core for
standalone applicatioon in dual core.
-Regards
Pranay
QuoteReplyEditDelete
2008-08-27 16:28:00 Re: problem for standalone application using coreB
Mike Frysinger (UNITED STATES)
Message: 61197
you've already asked this question and been told the answer. the default entry point is the "main" symbol. either provide it like normal or provide your own C runtime init files.
QuoteReplyEditDelete
2008-08-28 01:00:53 Re: problem for standalone application using coreB
Pranay Upadhyay (INDIA)
Message: 61215
Hello sir,
Thanks for your reply. When I am giving the default entry point main then ther is no compilation error but giving error like..
## Total Size = 0x0000fc82 = 64642 Bytes
## Start Addr = 0x01000000
bfin> bootelf 0x1000000
Loading .init @ 0xff600000 (18 bytes)
Loading .text @ 0xff600014 (3704 bytes)
Loading .fini @ 0xff600e8c (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: <0xa229140c> { ___smulsi3_highpart + 0x9e2bb6e8 }
RETN: <0xa132988a> { ___smulsi3_highpart + 0x9d353b66 }
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 : 03f9bcd5 SP : 03f9babc
LB0: 03fd5cec LT0: 03fd5ce0 LC0: 00000000
LB1: 03fc65ae LT1: 03fc65a8 LC1: 00000000
B0 : 364197d7 L0 : 00000000 M0 : 38a7c7fc I0 : 01000000
B1 : d24dff2e L1 : 00000000 M1 : 9e95d5b5 I1 : 03f9bf40
B2 : d49513cb L2 : 00000000 M2 : acc073bb I2 : d6c52f9a
B3 : 93375fd5 L3 : 00000000 M3 : deec3fa3 I3 : c78456dd
A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000
USP : ffb00ff4 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 ###
I am not getting why this error come. As i read from document they say that for coreb we should use the coreb_main () function in place of the main (), that's why I was using this.
-Regards
Pranay
QuoteReplyEditDelete
2008-08-28 01:16:12 Re: problem for standalone application using coreB
Sonic Zhang (CHINA)
Message: 61216
Which document do you refer to?
How do you load standalone app to coreb?
Do you run kernel?
You can't not run app on coreb from uboot directly.
QuoteReplyEditDelete
2008-08-28 01:50:46 Re: problem for standalone application using coreB
Pranay Upadhyay (INDIA)
Message: 61217
Hello,
Thanks for your reply.
I read the gcc compiler(blackfin option) document for running the standalone application.
I was also preferring the document docs.blackfin.uclinux.org/doku.php?id=load_application_running_in_bf561_core_b
but in this document explain the use of core B when in core A kernel is running.
I am not using and running the kernel.
I am trying to load the standalone application through the uboot.
Can we use the core A and core B for standalone application through the loading uboot?
For using core A it is working fine.
But through the core B I am getting the problem.
When I am using Dual core in BF 561, the function for Core A is working fine but Function in for core B is not working.
-Thanks & Regards
Pranay
QuoteReplyEditDelete
2008-08-28 02:15:16 Re: problem for standalone application using coreB
Sonic Zhang (CHINA)
Message: 61220
Loading standalone app to run on coreb is not supported yet in uboot.
QuoteReplyEditDelete
2008-08-28 03:23:19 Re: problem for standalone application using coreB
Pranay Upadhyay (INDIA)
Message: 61227
Hello,
Please tell me , Can uboot supportfor loading the program through for dual core?The code is compiled through the bfin-elf-gcc and elf file is made.
-Thanks & Regards
Pranay