[Bug Report] SigimaStudio 3.9 Exported system files in ADAU1772 project contain compilation errors
Description : After exporting system files for an ADAU1772 project into a Visual Studio 2008 project I find that there are hundreds of warnings and errors.
Sigma Studio Version : 3.9. Build 2, Rev 1246. 7/24/2013
OS : Windows 7 (32-bit). Service Pack 1.
Other software : Microsoft Visual Studio 2008 Standard Edition. Version 9.0.21022.8
Background information (which is probably irrelevant to the bug report) : I am using the files exported from SigmaStudio to generated an exe on a PC. The PC has USB I2C interface that is connected to custom PCB containing an ADAU1772. I have been able to correct all the errors in the exported files to enable compilation, but after calling default_download_IC_1() to configure the ADAU1772 I find that the chip does not produce any detectable analog or digital output signal. I am powering the chip from a 3V supply (2xAA batteries) and providing a 700mV pk-pk chirp signal to inputs AIN0-AIN3 . I am however able to confirm the correct operation of the following aspects of the ADAU1772 device:
- MICBIAS0 can be enabled and disabled
- I2S bit-clock (MP2) and LRCLK (MP2) toggle correctly. I2S data is zero.
- Speaker outputs HPOUTLN, HPOUTLP, HPOUTRN, HPOUTRP can be enabled/disabled (The DC offset turns on and off).
This minimal functionality leads me to believe that the ADAU1772 is correctly receiving I2C instructions.
The compilation errors occur with all ADAU1772 projects that I have created. In all cases I have exported the system files with the name "Params". I have imported the following files into my Visual Studio project:
Params_IC_1.h
Params_IC_1_REG.h
Params_IC_1_PARAM.h
There are three categories of error.
Error 1: There are undefined constants in file "Params_IC_1.h". The generated function default_download_IC_1() includes the following lines:
SIGMA_WRITE_REGISTER_BLOCK( DEVICE_ADDR_IC_1, BANK_A_PARAMETERS_ADDR_IC_1, BANK_A_PARAMETERS_SIZE_IC_1, BANK_A_PARAMETERS_IC_1 );
SIGMA_WRITE_REGISTER_BLOCK( DEVICE_ADDR_IC_1, BANK_B_PARAMETERS_ADDR_IC_1, BANK_B_PARAMETERS_SIZE_IC_1, BANK_B_PARAMETERS_IC_1 );
None of the definitions that begin with "BANK_" are defined.
A solution to this problem is to add the following code, which defines the constants in terms of auto-generated constants.
#define BANK_A_PARAMETERS_ADDR_IC_1 PARAM_ADDR_IC_1
#define BANK_A_PARAMETERS_SIZE_IC_1 PARAM_SIZE_IC_1
#define BANK_A_PARAMETERS_IC_1 Param_Data_IC_1
#define BANK_B_PARAMETERS_ADDR_IC_1 0x180
#define BANK_B_PARAMETERS_SIZE_IC_1 PARAM_SIZE_IC_1
#define BANK_B_PARAMETERS_IC_1 Param_Data_IC_1
Error 2. The following code sequence in file "Params_IC_1.h" is repeated 79 times, each time producing the same warning/error.
/* DSP Ram Data */
#define ZERO_SIZE_IC_1 4
#define ZERO_ADDR_IC_1 241
ADI_REG_TYPE ZERO_Data_IC_1[ZERO_SIZE_IC_1] = {
0x00, 0x00, 0x00, 0x00,
};
1a ) Each repetition changes the value of "ZERO_ADDR_IC_1", so causes the warning "warning C4005: 'ZERO_ADDR_IC_1' : macro redefinition".
1b) Each repetition attempts to create a new array called "ZERO_Data_IC_1". This causes the error "error C2374: 'ZERO_Data_IC_1' : redefinition; multiple initialization
A solution to the problem is to comment out all of these definitions. The function default_download_IC_1() doesn't refer to these arrays anyway.
Error 3: Four of the single register writes have incorrect size definitions. The code segments from "Params_IC_1.h" that give rise to the errors are included below
/* Register Default - IC 1.PLL_CTRL5 Register */
ADI_REG_TYPE R8_PLL_CTRL5_IC_1_Default[REG_PLL_CTRL5_IC_1_BYTE] = ;
/* Register Default - IC 1.ABSREG0 Register */
ADI_REG_TYPE R18_DBREG0_IC_1_Default[REG_DBREG0_IC_1_BYTE] = ;
/* Register Default - IC 1.ABSREG1 Register */
ADI_REG_TYPE R19_DBREG1_IC_1_Default[REG_DBREG1_IC_1_BYTE] = ;
/* Register Default - IC 1.ABSREG2 Register */
ADI_REG_TYPE R20_DBREG2_IC_1_Default[REG_DBREG2_IC_1_BYTE] = ;
Each of the code segments produces the compilation error "error C2466: cannot allocate an array of constant size 0". The definitions that cause the errors are included from file "Params_IC_1_REG.h". The offending lines are:
#define REG_PLL_CTRL5_IC_1_BYTE 0
#define REG_DBREG0_IC_1_BYTE 0
#define REG_DBREG1_IC_1_BYTE 0
#define REG_DBREG2_IC_1_BYTE 0
The problem can be resolved by changing the definitions to '1'. (This change was deduced by observing the corresponding to transactions listed in the Capture window of SigmaStudio.)
Best regards,
Robert
bug_report
adau1772
Integrated/Special Purpose A/D Converters
sigmastudio
Audio CODECs
Hi ralcock,
Thanks for this valuable feedback. I will report this to the software team for fixing in coming SigmaStudio builds.
Regards,
BillJ
I have a brief update regarding the general use of the exported files from Sigma Studio that might be useful to other users.
In my original bug report I included some background information that stated I was having difficult getting any output from the ADAU1772. I've solved the problem and my platform is now working exactly as the EVM board does when programmed via SigmaStudio.
The problem was that my I2C interface did not support 16 bit and 32 bit writes. These formats are required when writing to the ADAU1772 program memory and parameter memory. After I added this support, everything was fine.
This also confirms that my proposed work-arounds for the three groups of compilation errors is apparently OK.
I hope that someone finds this comment useful.
Rob
This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.
Thank you,
EZ Admin
Please log in to reply.