- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all!!
I applying audio code demo of altera. But when I build project, it had 2 error : 'I2C_SCL_BASE' undeclared (first use in this function) AUDIO.c /audio_de2_115_MTL line 357 C/C++ Problem and 'I2C_SDA_BASE' undeclared (first use in this function) AUDIO.c /audio_de2_115_MTL line 357 C/C++ Problem I just found define of them is clk base for SCL. and data base for SDA, but I don't understood what are they? and how to use it? So, have someone can me me understand it and the way to fix it? Thank you so much!! ( I'm a beginner!!) Have a nice day every body!!Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apparently the code you are compiling is looking for two peripherals in your system, one called i2c_scl and another one i2c_sda, but they aren't present. You should add them to your SOPC Builder or QSys project.
From the names I'm guessing they are 1 bit bidirectional PIOs.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Apparently the code you are compiling is looking for two peripherals in your system, one called i2c_scl and another one i2c_sda, but they aren't present. You should add them to your SOPC Builder or QSys project. From the names I'm guessing they are 1 bit bidirectional PIOs. --- Quote End --- Thanks for your advice,Daixiwen! I did review my SOPC, it have enough component for audio. And in define of function I2C_write(); the sample code was define I2C_SCL_BASE is clk_base and I2C_SDA_BASE is data_base. But I don't understand what are the address of clk base and data base? I found it in the internet but it haven't had the info. I need!! (T_T")! hix hix, Who have another idea please help me (^_^")!!!???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The component you need isn't for audio itself, it is for I2C. If you have a peripheral that is called i2c_scl in your SOPC builder project, then you will have in your BSP a file called system.h that defines I2C_SCL_BASE, among others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh!! Thank you so much, Daixiwen (^_^), I review my SOPC again, and recognized something I need into my project!
Have a nice day!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page