Quartus Prime Lite Ver 21.1.0 Build 842 10/21/21 - Windows 10 Host system
Eclipse Mars.2 rel 4.5.2
After spending a few more hours digging into the code, it appears the project wizard doesn't set up everything correctly. Two corrections need to be made to get the application to build.
1. altera_modular_adc.h contains the following, form lines 92 to lines 120:
#define ALTERA_MODULAR_ADC_INSTANCE(name, dev) \
static alt_modular_adc_dev dev = \
{ \
{ \
ALT_LLIST_ENTRY, \
name##_NAME, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
}, \
NULL, \
NULL, \
0, \
0, \
name##_DUAL_ADC_MODE \
}
/*
* The macro ALTERA_MODULAR_ADC_INIT is called by the auto-generated function
* alt_sys_init() to initialize a given device instance.
*/
#define ALTERA_MODULAR_ADC_INIT(name, dev) \
altera_modular_adc_init(&dev, name##_IRQ_INTERRUPT_CONTROLLER_ID, name##_IRQ);
After going through system.h, I modified this file to add the correct constant names.
#define ALTERA_MODULAR_ADC_INSTANCE(name, dev) \
static alt_modular_adc_dev dev = \
{ \
{ \
ALT_LLIST_ENTRY, \
name##_SEQUENCER_CSR_NAME, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
}, \
NULL, \
NULL, \
0, \
0, \
name##_SEQUENCER_CSR_DUAL_ADC_MODE \
}
/*
* The macro ALTERA_MODULAR_ADC_INIT is called by the auto-generated function
* alt_sys_init() to initialize a given device instance.
*/
#define ALTERA_MODULAR_ADC_INIT(name, dev) \
altera_modular_adc_init(&dev, name##_SAMPLE_STORE_CSR_IRQ_INTERRUPT_CONTROLLER_ID, name##_SAMPLE_STORE_CSR_IRQ);
2. The second problem is that the application doesn't resolve the paths to all the libraries in the BSP. I modified the application's makefile to include the following at line 131:
APP_INCLUDE_DIRS += ../anotherADC_bsp/
APP_INCLUDE_DIRS += ../anotherADC_bsp/drivers/inc/
Once these corrections are made the application builds successfully. Attached is the SPOC information file.