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++
12606 Discussions

How to definition"SYSTEM_BUS_WIDTH"?

Altera_Forum
Honored Contributor II
1,983 Views

Hi,everybody: 

I'm write a custom logic on DE2 board. 

 

Within IO header file for the NIOS toolchain there is a definition 'SYSTEM_BUS_WIDTH'.  

 

Can anybody tell me where this is defined, I have done a search for the string and found nothing so far. 

 

Thank you for your help. 

 

Regards 

 

NiosQ
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
880 Views

PS: The message as following: 

 

NiosQ@localhost ~/NiosQ_program $ nios2-linux-uclibc-gcc hello_altera_avalon_pwm.c 

-o hello_altera_avalon_pwm -elf2flt 

hello_altera_avalon_pwm.c: In function `main': 

hello_altera_avalon_pwm.c:42: error: `SYSTEM_BUS_WIDTH' undeclared (first use in 

this function) 

hello_altera_avalon_pwm.c:42: error: (Each undeclared identifier is reported onl 

y once 

hello_altera_avalon_pwm.c:42: error: for each function it appears in.) 

hello_altera_avalon_pwm.c: In function `print_error': 

hello_altera_avalon_pwm.c:86: error: `SYSTEM_BUS_WIDTH' undeclared (first use in 

this function) 

NiosQ@localhost ~/NiosQ_program $
0 Kudos
Altera_Forum
Honored Contributor II
880 Views

 

--- Quote Start ---  

originally posted by niosq@Mar 12 2007, 06:55 AM 

ps: the message as following: 

 

niosq@localhost ~/niosq_program $ nios2-linux-uclibc-gcc hello_altera_avalon_pwm.c 

-o hello_altera_avalon_pwm -elf2flt 

hello_altera_avalon_pwm.c: in function `main': 

hello_altera_avalon_pwm.c:42: error: `system_bus_width' undeclared (first use in 

this function) 

hello_altera_avalon_pwm.c:42: error: (each undeclared identifier is reported onl 

y once 

hello_altera_avalon_pwm.c:42: error: for each function it appears in.) 

hello_altera_avalon_pwm.c: in function `print_error': 

hello_altera_avalon_pwm.c:86: error: `system_bus_width' undeclared (first use in 

this function) 

niosq@localhost ~/niosq_program $ 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=22218) 

--- quote end ---  

 

--- Quote End ---  

 

 

It seems that it is a design that uses SOPC Builder (SYSTEM_BUS_WIDTH is a parameter of the SOPC system).  

 

Usually a software project for a SOPC system needs a system description header file named "system.h", which will be automatically generated by Nios II IDE from the system description file (ptf file). It seems that the "system.h" is not found. 

 

Could you please post the source code for your project and give more information? Thanks.
0 Kudos
Altera_Forum
Honored Contributor II
880 Views

I had a similar error ("could not resolve system_bus_width") with the newer NIOS II SBT.  

 

the solution i found: 

Right Click on the BSP Folder and Select Index-->Rebuild  

Right Click on the Project Folder and Select Index-->Rebuild
Altera_Forum
Honored Contributor II
880 Views

I am also searching fro its solution and thanks for providing me this solution.

0 Kudos
Reply