2011-08-10 12:23:38     2011R1-BETA2 bfin-elf run does not work

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

2011-08-10 12:23:38     2011R1-BETA2 bfin-elf run does not work

Akash Agarwal (UNITED STATES)

Message: 102885   

 

Hi,

 

I have a problem using the bfin-elf run in the BETA2 version

 

with the trace-hw it gave me the following error

> /home/agarwal/2011R1-BETA2-elf/bin/bfin-elf-run --env operating --model bf527 --trace-hw gpio_interrupt

 

/core: attach - level=0, space=0, addr=0xffc01000, nr_bytes=20, client=/core/bfin_ppi@0

/core: attach - level=0, space=0, addr=0xffc01400, nr_bytes=144, client=/core/bfin_twi@0

/core: attach - level=0, space=0, addr=0xffc01500, nr_bytes=68, client=/core/bfin_gpio@6

/core: attach - level=0, space=0, addr=0xffc01700, nr_bytes=68, client=/core/bfin_gpio@7

/core: attach - level=0, space=0, addr=0xffc02000, nr_bytes=48, client=/core/bfin_uart@1

/core: attach - level=0, space=0, addr=0xffc03000, nr_bytes=512, client=/core/bfin_emac

/core/bfin_emac: unable to open /dev/net/tun: Permission denied

/core/bfin_otp: hw_find_integer(property=type)

 

/core: attach - level=0, space=0, addr=0xffc03600, nr_bytes=160, client=/core/bfin_otp

/core/bfin_otp: Unreconized port stat

Quit Simulator

 

Things worked fine for me in BETA1 version

> /home/agarwal/2011R1-BETA1/bfin-elf/bin/bfin-elf-run --env operating --model bf527 --trace-hw gpio_interrupt

 

/core: attach - level=0, space=0, addr=0xffc01500, nr_bytes=68, client=/core/bfin_gpio@6

/core: attach - level=0, space=0, addr=0xffc01700, nr_bytes=68, client=/core/bfin_gpio@7

/core: attach - level=0, space=0, addr=0xffc02000, nr_bytes=48, client=/core/bfin_uart@1

/core: attach - level=0, space=0, addr=0xffc03000, nr_bytes=512, client=/core/bfin_emac

/core/bfin_emac: unable to open /dev/net/tun: Permission denied

/core: attach - level=0, space=0, addr=0xffe02000, nr_bytes=64, client=/core/bfin_evt

/core: attach - level=0, space=0, addr=0xffe05000, nr_bytes=12, client=/core/bfin_jtag

/core: attach - level=0, space=0, addr=0xffe00000, nr_bytes=8192, client=/core/bfin_mmu

/core: attach - level=0, space=0, addr=0xffe06000, nr_bytes=260, client=/core/bfin_trace

/core: attach - level=0, space=0, addr=0xffe07000, nr_bytes=516, client=/core/bfin_wp

/core/bfin_ebiu_amc: hw_find_integer(property=type)

 

/core: attacph - level=0, space=0, addr=0xffc00a00, nr_bytes=12, client=/core/bfin_ebiu_amc

/core/bfin_ebiu_amc: reattaching banks: AMGCTL 0x0000[0] -> 0x00f2[1]

/core/bfin_ebiu_amc: attaching bank 0 (0x20000000 base) to <floating pins>

/core: attach - level=0, space=0, addr=0xffc00a10, nr_bytes=16, client=/core/bfin_ebiu_sdc

/core/bfin_ebiu_sdc: hw_find_integer(property=type)

 

/core/bfin_emac: attach - level=0, space=0, addr=0x0, nr_bytes=32, client=/core/bfin_emac/eth_phy

/core/bfin_otp: hw_find_integer(property=type)

 

/core: attach - level=0, space=0, addr=0xffc03600, nr_bytes=160, client=/core/bfin_otp

/core: attach - level=0, space=0, addr=0xffc03700, nr_bytes=80, client=/core/bfin_nfc

/core/bfin_spi@0: write 0xffc00500 (SPI_CTL) length 2 with 0x400

/core/bfin_dmac@0/bfin_dma@5: write 0xffc00d48 (CONFIG) length 2 with 0x0

/core/bfin_mmu: write 0xffe01300 (ITEST_COMMAND) length 4 with 0x0

/core/bfin_mmu: write 0xffe00300 (DTEST_COMMAND) length 4 with 0x0

 

 

Do i need to do some modifications to use the BETA2 release ?

 

Thanks

 

Akash

QuoteReplyEditDelete

 

 

2011-08-10 20:02:29     Re: 2011R1-BETA2 bfin-elf run does not work

Stuart Henderson (UNITED KINGDOM)

Message: 102888   

 

Hi,

 

There shouldn't have been any changes in bfin-elf-run between these two releases.  Would you be able to provide an example of a change of behaviour so I can reproduce the problem on my end?

 

Thanks,

Stu

QuoteReplyEditDelete

 

 

2011-08-11 00:57:54     Re: 2011R1-BETA2 bfin-elf run does not work

Akash Agarwal (UNITED STATES)

Message: 102890   

 

The bfin-elf-run for the BETA2 version fails to start up it gives a error

 

I installed the BETA1 and BETA2 version using

 

the following command

 

./BuildToolChain -o /home/agarwal/2011R1-BETA2/bfin

 

 

[agarwal@localhost gpio_interrupts]$ /home/agarwal/2011R1-BETA2/bfin-elf/bin/bfin-elf-run --model bf527 --env operating gpio_interrupt

/core/bfin_otp: Unreconized port stat

Quit Simulator

[agarwal@localhost gpio_interrupts]$ /home/agarwal/2011R1-BETA1/bfin-elf/bin/bfin-elf-run --model bf527 --env operating gpio_interrupt

 

 

TLL6527M is setup and ready

CORE_CLOCK = 600 MHz

SYSTEM_CLOCK = 100 MHz

 

GPIO init

QuoteReplyEditDelete

 

 

2011-08-11 06:36:17     Re: 2011R1-BETA2 bfin-elf run does not work

Stuart Henderson (UNITED KINGDOM)

Message: 102892   

 

Do you get the same behaviour difference between 2011R1-BETA1 and 2011R1-BETA2 with the pre-built binaries available from the website?

QuoteReplyEditDelete

 

 

2011-08-11 17:19:27     Re: 2011R1-BETA2 bfin-elf run does not work

Akash Agarwal (UNITED STATES)

Message: 102896   

 

Yes,

 

I get the same behaviour using the precompiled binaries.

 

It seems that the simulator may have some issues attaching the devices to the code that is why we get a unrecongnized port stat

 

from the device otp

 

Thanks

Akash

QuoteReplyEditDelete

 

 

2011-08-11 21:38:32     Re: 2011R1-BETA2 bfin-elf run does not work

Akash Agarwal (UNITED STATES)

Message: 102898   

 

Hi ,

 

The problem was not with the build in the BETA1 and BETA2

 

In machs.c

 

There is a connectivity made between the SIC and the OTP   for some models (bf52x, bf51x ) in the BETA2 version which was not there in BETA1 version

 

But the dv-bfin_otp.c does not have any ports defined

 

static const struct hw_port_descriptor bfin_otp_ports[] =

{

  { "stat", 0, 0, output_port, },

  { NULL, 0, 0, 0, },

};

 

bfin_otp_finish

 

 

    set_hw_ports(me,bfin_otp_ports);

 

}

 

As a result when  bfin_otp_finish is called to attached the ports from bfin_model_hw_tree_init (),It complains about the stat port unreconized ,

 

I added the code in the dv_bfin_otp.c and it worked for me .

 

2) The other option can be to comment the connectivity in machs.c

 

Please verify

 

Thanks

 

Akash

QuoteReplyEditDelete

 

 

2011-08-12 13:25:57     Re: 2011R1-BETA2 bfin-elf run does not work

Stuart Henderson (UNITED KINGDOM)

Message: 102919   

 

Hi Akash,

 

The code you mention is not in our repository, nor the BETA2 release.  I believe you may have polluted your sources with upstream gdb changes, as bfin_otp_ports has only been added there at the moment.

 

Could you try a build of the toolchain with clean sources from the release and tell me if you still see the issue?

 

Thanks,

Stu

QuoteReplyEditDelete

 

 

2011-08-12 14:16:01     Re: 2011R1-BETA2 bfin-elf run does not work

Akash Agarwal (UNITED STATES)

Message: 102920   

 

   Hi  Stuart,

 

   I am sorry for the confusion ,

  You are right the code snippet that i proposed was is not part of BETA2 release.

  That was the solution i proposed to the problem found

 

Problem :

 

> bfin-elf-run --model bf527 --env operating gpio_interrupt

   core/bfin_otp: Unreconized port stat

    Quit Simulator

 

Possible Reason :

    The reasons for the error as follows :

    File  machs.c

 

line 308 :

 

bfin_port_layout bf51x_port []

 

{  ......

   SIC (0,26, "bfin_otp" ,  ""stat")

......}

 

line 463 :

    bfin_port_layout bf52x_port[] {

  ......

   SIC (0,26, "bfin_otp" ,  ""stat")

......  }

 

  Connection is made betweeen SIC 0, 26 pin to bfin otp device port stat

 

Line : 499

 

#define bf527_port bf51x_port

 

Now if we see the dv-bfin_otp.c there is no port defined for the  devices

as a result the hardware parse generates the error stat port not recongnized

 

Proposed solution :

 

1) Comment out the  connectivity line  as shown above from machs.c

 

2 ) Define a port for the device otp

 

The code snippet i gave adds a port on the otp device.

 

The problem occurs for model bf52x , bf51x ,bf54x

But does not occur for bf533 as we do not have the connectivity there in machs.c file

 

I am using  BETA2 release  from the ADI released 2 weeks ago .

 

Please guide me on my understanding

 

Thanks

Akash

QuoteReplyEditDelete

 

 

2011-08-15 10:55:34     Re: 2011R1-BETA2 bfin-elf run does not work

Stuart Henderson (UNITED KINGDOM)

Message: 102932   

 

Hi Akash,

 

Thanks for the clarification.  I understand the problem you are seeing now, have reproduced it and have committed a fix for it to the trunk of our svn repository.  The change is actually a merge from upstream gdb, but it is identical to your second solution (defining bfin_otp_ports and calling set_hw_ports with it). The change can be found here:

 

http://blackfin.uclinux.org/gf/project/toolchain/scmsvn/?action=browse&path=%2F&view=rev&revision=5662

 

Sorry for the confusion and thanks for contacting us about this issue.

 

Stu

QuoteReplyEditDelete

 

 

2011-09-04 15:42:49     Re: 2011R1-BETA2 bfin-elf run does not work

Akash Agarwal (UNITED STATES)

Message: 103273   

 

Hi Stuart,

 

The same issue comes up in bfin2011-RC! as well was it updted with the changes from the trunk

 

Thanks

 

Akash

QuoteReplyEditDelete

 

 

2011-09-05 04:49:51     Re: 2011R1-BETA2 bfin-elf run does not work

Stuart Henderson (UNITED KINGDOM)

Message: 103279   

 

Hi Akash,

 

The change was merged on to the 2011R1 branch after the tag for the RC1 release.  It will be in the RC2 release.

 

We are currently working on some issues with RC1 after which we will release RC2.

 

Thanks,

Stu

Attachments

    Outcomes