2010-07-12 08:49:42     Toolchian BF532 : defB532.h No such file or directory

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

2010-07-12 08:49:42     Toolchian BF532 : defB532.h No such file or directory

Anwar Naseem (PAKISTAN)

Message: 91167   

 

I am including the file available in toolchain defBD532.h

 

On Compilation :error is No such file or directory.

 

Any idea?

QuoteReplyEditDelete

 

 

2010-07-12 09:37:44     Re: Toolchian BF532 : defB532.h No such file or directory

Steve Kilbane (UNITED KINGDOM)

Message: 91169   

 

How are you compiling?

 

For example:

 

skilban@edin-florence:~/debugtest> cat blah.c

#include <defBF532.h>

int foo(void) {

return 0;

}

skilban@edin-florence:~/debugtest> bfin-elf-gcc -c blah.c

skilban@edin-florence:~/debugtest>

 

No problem. But:

 

skilban@edin-florence:~/debugtest> bfin-uclinux-gcc -c blah.c

blah.c:1:22: error: defBF532.h: No such file or directory

skilban@edin-florence:~/debugtest> bfin-linux-uclibc-gcc -c blah.c

blah.c:1:22: error: defBF532.h: No such file or directory

 

 

 

But then, defBF532.h is full of MMR addresses, and you can't access them from User Mode processes as they're supervisor-only resources. So, are you using the right toolchain target, and do you really need defBF532.h?

 

steve

QuoteReplyEditDelete

 

 

2010-07-13 06:34:58     Re: Toolchian BF532 : defB532.h No such file or directory

Anwar Naseem (PAKISTAN)

Message: 91195   

 

Thanks Steve

 

I have to run my code on blackfin bf532 on which uclinux is running and I am using  bfin-uclinux-gcc to compile it. I have downloaded the toolchain from the website.

 

I need to set some registers for sdram configuration,so I need the addresses.

 

What is the right toolchain target.

 

Kindly elaborate on User Mode processes and  supervisor-only resources ?

 

Thanks

 

Anwar

QuoteReplyEditDelete

 

 

2010-07-13 10:29:28     Re: Toolchian BF532 : defB532.h No such file or directory

Steve Kilbane (UNITED KINGDOM)

Message: 91200   

 

My understanding is that SDRAM configuration is done by U-Boot (so that you have somewhere for U-Boot to boot the kernel image into). See http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:customizing for a starter on configuring U-Boot.

 

User mode versus Supervisor mode: When you're running Linux, the kernel is running in Supervisor mode, and your normal user processes are running in user mode. The processor determines certain resources - memory-mapped device registers, certain status and configuration registers, etc. - and certain instructions - RTX, for example - as supervisor-only. The processor will raise an exception if you attempt to access/use them while in user mode. Instead, you have to execute a system call to transfer control to the kernel, where the kernel will access them on your behalf without stomping on whatever other processors (or the kernel itself) is doing.

 

steve

QuoteReplyEditDelete

 

 

2010-07-13 13:33:01     Re: Toolchian BF532 : defB532.h No such file or directory

Mike Frysinger (UNITED STATES)

Message: 91203   

 

steve is correct.  long story short: you do not programm MMRs from userspace.  that is for linux kernel drivers only.  the header you're looking for does not exist anywhere with linux toolchains by design.

QuoteReplyEditDelete

 

 

2010-07-14 05:58:18     Re: Toolchian BF532 : defB532.h No such file or directory

Anwar Naseem (PAKISTAN)

Message: 91238   

 

Thanks Steve

 

Ok. Then what should be done to check the status of BG  (Bus Grant ).

 

How signal can be read/write from an IO.

 

I have to communicate with FPGA to share the common SDRAM.

 

Thanks

 

Anwar

QuoteReplyEditDelete

 

 

2010-07-14 06:00:25     Re: Toolchian BF532 : defB532.h No such file or directory

Anwar Naseem (PAKISTAN)

Message: 91239   

 

Thanks Mike

 

Then what should be done to check the status of BG  (Bus Grant ) pin from user space?

 

How signal can be read/write from an I/O pin from user space?

 

I have to communicate with FPGA to share the common SDRAM.

 

Anwar

QuoteReplyEditDelete

 

 

2010-07-14 09:16:33     Re: Toolchian BF532 : defB532.h No such file or directory

Robin Getz (UNITED STATES)

Message: 91242   

 

anwar:

 

You don't.

 

The FPGA is connected to one of the ASYNC memory banks? If so - don't worry about things - just let the hardware handle things.

 

-Robin

Attachments

    Outcomes