Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Missing Header Files

Altera_Forum
Honored Contributor II
1,422 Views

Hi All! 

 

I am using the nios2-linux-20090825 package and am trying to roll in and compile a custom driver developed by us that compiles and works under uclinux 2.6.11. when compiling, gcc complains that it can't find linux/config.h and asm/semaphore.h. before getting into trial-and-error mode, what are my best bets for solving this issue?  

 

thanks! 

 

nick 

0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
692 Views

The linux/config.h is deprecated. You can safely remove the line. 

 

The asm/semaphore.h should exist but simply include include linux/semaphore.h. 

 

- Hippo
0 Kudos
Altera_Forum
Honored Contributor II
692 Views

Thanks, Hippo! 

 

I removed linux/config.h and am now using linux/semaphore.h. Not getting any more errors about missing header files but still am getting many errors the first few of which are pasted below. Looks like GCC is still looking for things it can't find. "sign_nios_uart" is the custom driver file we wrote. 

 

CC drivers/char/sign_nios_uart.o 

drivers/char/sign_nios_uart.c:249: error: 'platform_bus_type' undeclared here (not in a function) 

drivers/char/sign_nios_uart.c: In function 'sign_nios_uart_init': 

drivers/char/sign_nios_uart.c:268: error: implicit declaration of function 'class_simple_create' 

drivers/char/sign_nios_uart.c:268: warning: assignment makes pointer from integer without a cast
0 Kudos
Altera_Forum
Honored Contributor II
692 Views
0 Kudos
Altera_Forum
Honored Contributor II
692 Views

Yeah, I didn't realize that the "class_simple" interface is no longer available. 

Looks like we have some changes to make! 

 

Thanks 

 

Nick
0 Kudos
Reply