This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM263X: Sysconfig with two EQEP drivers creates "error: redefinition of 'sourceSelect'"

Part Number: MCU-PLUS-SDK-AM263X
Other Parts Discussed in Thread: SYSCONFIG

When adding two EQEP devices, sysconfig generates duplicate sections with the same name:

EQEP_SourceSelect sourceSelect;
sourceSelect.sourceA = EQEP_SOURCE_DEVICE_PIN;
sourceSelect.sourceB = EQEP_SOURCE_DEVICE_PIN;
sourceSelect.sourceIndex = EQEP_SOURCE_DEVICE_PIN;
EQEP_selectSource(CONFIG_EQEP0_BASE_ADDR, sourceSelect);

Compiler error:

generated/ti_drivers_open_close.c:2324:20: error: redefinition of 'sourceSelect'
EQEP_SourceSelect sourceSelect;
^
generated/ti_drivers_open_close.c:2286:20: note: previous definition is here
EQEP_SourceSelect sourceSelect;
^
1 error generated.
makefile:159: recipe for target 'ti_drivers_open_close.obj' failed

  • Sysconfig:

     * @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss1-0" --product "MCU_PLUS_SDK_AM263x@08.04.00"
    * @versions {"tool":"1.13.0+2553"}

  • Hi Jim

    you are right, even I am facing this issue with the latest SDK and SYSCFG. But Let me check with internal team and get back if this is a valid issue.

    Regards

    Sri Vidya

  • Hi Jim

    This is a syscfg bug from our side and I have created a Jira ticket for the internal team to fix the issue. For now you can copy the generated EQEP configuration from Relase/syscfg/drivers_open_close.c file and paste it in your main code and edit it as required for the EQEP instance 2.

    1. Configure the second EQEP also in the SysCfg. 

    2. The code for the same will be generated in the file -  Relase/syscfg/drivers_open_close.c

    3. Now copy the 2nd EQEP instance in the above file.

    4. Paste this configuration in your main code.

    5. Make sure to add the necessary include files required for EQEP configuration. Please do Let me know if you are not able to resolve any errors.

    6. Delete the SysCfg setting of the 2nd EQEP instance.

    This could be a workaround till the internal team could fix the issue in the upcoming release.

    MCUSDK-8554 is the Jira ID for reference.

    Apologies for the inconvenience.

    Thanks & Regards

    Sri Vidya