Post Go back to editing

Porting bare metal framwork to SC598

Category: Software
Product Number: ADSP-SC598
Software Version: CCES 3.0.1.0

I'm currently working on porting some code based on the bare metal framework for the ADSP-SC589 to the ADSP-SC598.

I've encoundered some interesting issues with resources shared between cores (e.g. shared gpio drivers). N.B. gpio drivers have been updated away from the bare metal frameworks bm_gpio functions. 

When the drivers folder is added to a Sharc core (in addition to the Arm core), I get errors such as  'Symbol 'ADI_GPIO_DIRECTION_OUTPUT' could not be resolved', and on further inspection, this seems to be being referenced from multiple locations, possibly causing an issue? This is shown in the image below.

I have experimented with a simple example toggling pins in multiple cores just using the functions in <services/gpio/adi_gpio.h>, this compiles fine with no issues. Linking in a shared drivers folder to an additional core results in the issues above. Interestingly, removing links to common folders from the sharc core does not fix the errors produced, even when a clean build is undertaken. I suspect this may be an issue behind the scenes, or there's an option I'm not aware of to get the Arm to pull in only Arm drivers, similarly Sharc drivers for Sharc cores?

Any advice greatfully received! 

Thread Notes

  • Hi James,

    We are checking on this and we will get back to you as soon as possible.

    Regards,
    Nandini C

  • Hi James,

    Thank you for your inquiry.

    In order to simulate the issue, Could you please provide the steps you followed to port the code from the ADSP-SC589 to ADSP-SC598. This would be helpful for us to assist you further.

    We were not able to reproduce this observation in our sample application.

    Awaiting for your reply.

    Best Regards,
    Santhakumari.K

  • Hi Santhakumari, thanks for having a look,

    I've had an experiment this morning to try to reproduce this in the simplest possible way, and have come up with the following:

    Open CCES and create a new workspace
    File > New CrossCore Project
    Name e.g. 'Test', and select ADSP-SC598
    Create projects for all cores

    Create a folder in the workspace (i.e. same folder as the folders Test_Core0, Test_Core1, Test_Core2) called 'drivers'
    Create a header file 'test_gpio.h' with the following contents:

    #include <services/gpio/adi_gpio.h>
    
    // LEDs
    #define GPIO_LED_CORE0_PORT ADI_GPIO_PORT_G
    #define GPIO_LED_CORE0_PIN 14
    
    #define GPIO_LED_CORE1_PORT ADI_GPIO_PORT_G
    #define GPIO_LED_CORE1_PIN 13
    
    #define GPIO_LED_CORE2_PORT ADI_GPIO_PORT_G
    #define GPIO_LED_CORE2_PIN 12


    For Test_Core0 project in the project explorer, and within the 'src' folder:
    New > Folder > Advanced > Link to alternate location > choose 'drivers' folder

    Everything in the workspace still builds fine at this stage. N.B. none of the c code / header files have #included the drivers folder or gpio header file at this stage

    For Test_Core1 project in the project explorer, and within the 'src' folder:
    New > Folder > Advanced > Link to alternate location > choose 'drivers' folder

    Building now creates two errors within Test_Core0.c from the default contents of that c file:
    Symbol 'ADI_CORE_SHARC0' could not be resolved
    Symbol 'ADI_CORE_SHARC1' could not be resolved

    Following on, adding the gpio header file to multiple cores and using the contents results in similar 'symbol could not be resolved' errors when using the contents of the header file.






  • Hi James,

    Please verify whether the dxe file is generated in the Debug folder. If it isn't, kindly share your project with us. If the dxe file is generated, you can ignore the semantic error "Symbol 'ADI_CORE_SHARC0' could not be resolved" within Core0, as it does not affect your execution.

    To address such errors, you can try the following steps:

    1)Close and reopen the project in the IDE's Project Explorer to resolve the errors.

    2)Alternatively, you can uncheck the "Field cannot be resolved" checkbox in the "Syntax and Semantic Errors" section under "Code Analysis" in Preferences -> C/C++ General.

    Hope this helps.

    Best Regards,
    Santhakumari.K

  • Thanks Santhakumari,

    I do appear to be getting a .dxe file, so that's all good. Interestingly, I didn't manage to get rid of the errors using either of the above methods, very strange.

    Thanks for the help,

    James

  • Hi James,

    Apologies for the mistake happens.

    To resolve this error, please uncheck the "Symbol is not resolved" option in the "Syntax and Semantic Errors" section located under "Code Analysis." You can access this setting by navigating through Windows > Preferences -> C/C++.

    Best Regards,
    Santhakumari.K