Post Go back to editing

byte-addressable IVT

Category: Software
Product Number: ADSP-21583
Software Version: CCES 2.11.0

hi 

I am migrating to adsp-21583 processor and CCES 2.11.0 .from earlier [ ADSP-21161 processor with visual dsp tool]

  1. ADSP-21161 has the IVT which support both byte- (char-size-8) and word-(char-size-32) addressable modes. my code earlier in ADSP-21161  was made on word-(char-size-32) addressable mode so all variables are declared as _variableName. Problem to solve is -- ADSP-21583 has IVT which supports only byte- (char-size-8) mode. is there a workaround to retain the _variableName style declaration and re-use/import the code from 21161 to ADSP-21583 without renaming all variables ?
  2. what steps should be follwed to write a custom SEC interrupt dispatcher to call ISR without the API calls? 
Parents
  • Hi,

    Please find our replies below:

    1. We understand that you want to use variable which was built with char-size-32 in 21583 project. Please confirm.We recommend to refer below CCES help path which explains the use of functions and data compiled for word-addressing within byte-addressed applications, and vice versa.
    CrossCore® Embedded Studio 2.11.0 > SHARC® Development Tools Documentation > C/C++ Compiler Manual for SHARC® Processors > Compiler > Using Byte-Addressing > Mixed Char-Size Applications

    2. Please refer below CCES help path for RTL-Level Interrupt Support:
    CrossCore® Embedded Studio 2.11.0 > System Run-Time Documentation > Interrupt Support > RTL-Level Interrupt Support for SHARC and Blackfin Processors

    Regards,
    Divya.P

Reply
  • Hi,

    Please find our replies below:

    1. We understand that you want to use variable which was built with char-size-32 in 21583 project. Please confirm.We recommend to refer below CCES help path which explains the use of functions and data compiled for word-addressing within byte-addressed applications, and vice versa.
    CrossCore® Embedded Studio 2.11.0 > SHARC® Development Tools Documentation > C/C++ Compiler Manual for SHARC® Processors > Compiler > Using Byte-Addressing > Mixed Char-Size Applications

    2. Please refer below CCES help path for RTL-Level Interrupt Support:
    CrossCore® Embedded Studio 2.11.0 > System Run-Time Documentation > Interrupt Support > RTL-Level Interrupt Support for SHARC and Blackfin Processors

    Regards,
    Divya.P

Children
  • for 1. we need to declare #pragma for changing the addressable modes. but we have a more than 50 .C files which will have many functions. writing #pragma for each function prototype looks like will lose consistency in accessing variable memory allocations 

    2. could you provide System Run-Time Documentation in pdf format ? like other reference manuals. i did not find it in ADI website.  

  • based on response above, 

    here is what i tried. 

    since entire code is in word-addressed format. the compiler setting is -char-size-32, and i tried to declare the interrupt header files contained in adi_gpio.h with byte-addressed format in 2 ways 

    1. 

    #pragma byte_addressed
    #include <services/gpio/adi_gpio.h>


    2. 

    #pragma byte_addressed(push)
    #include <services/gpio/adi_gpio.h>
    #pragma byte_addressed(pop) 

    #include <services/gpio/adi_gpio.h> ---- contains below code 

    #if !defined(__BYTE_ADDRESSING__) && defined(__ADSPSHARC__)
    #error "Only Byte addressing mode is supported"
    #endif 

    despite declaring byte_addressed in both ways described in sections told by you above.. i get this error

    "C:\Analog Devices\CrossCore Embedded Studio 2.11.0\SHARC\include\services/gpio/adi_gpio.h", line 40: cc0035: catastrophic error: #error directive: "Only Byte addressing mode is supported"
    #error "Only Byte addressing mode is supported"
    ^

    kindly provide some way to declare the interrupt header files and associated handlers with byte-addressed mode with compiled with -char-size-32 mode. 

  • Hi,

    For SHARC+ processors,the interface to enable interrupts and install interrupt handlers is provided for byte-addressing mode only.

    Any source files that are compiled with –char-size-32 and call the interrupt interface results in an error. This restriction does not apply to SHARC processors that do not support a byte-addressing mode.

    Please refer the below CCES help path: CrossCore® Embedded Studio <version> > System Run-Time Documentation > Interrupt Support > Interrupt Support Specific to SHARC and SHARC+ Processors>Supported Mode on SHARC+ Processors

    ADSP-2158x have the ability to access individual 8-bit bytes in memory. This feature is known as byte-addressing. Each individual 8-bit byte has a unique address, in contrast to earlier SHARC families which, in the C runtime environment, permitted access to a minimum of 32 bits at a time (known as word-addressing). Byte-addressing permits compatibility with code written assuming that the C/C++ char type is 8 bits in length, and the C/C++ short type is 16 bits in length.

    In some cases, you may wish to reuse existing code written for earlier, word-addressed SHARC processors within an application using -char-size-8. Combining such code with the new -char-size-8 parts of your application requires you to direct the compiler regarding the interface between the different application parts. The interface between the byte-addressed and word-addressed parts allows the compiler to perform any necessary conversions.

    The pragmas #pragma byte_addressed or #pragma word_addressed you have referenced can be used for your case.  You can use the pragma immediately precede a single function or external data declaration. This approach is discussed in detail in CCES help:

    CrossCore® Embedded Studio <version> > SHARC® Development Tools Documentation > C/C++ Compiler Manual for SHARC® Processors > Compiler > Using Byte-Addressing > Mixed Char-Size Applications > How to Use Different Char Sizes Together

    Regarding interrupt support, please refer in CCES help:

    CrossCore® Embedded Studio <version> > System Run-Time Documentation > Interrupt Support > Interrupt Support Specific to SHARC and SHARC+ Processors

    Regarding System Run-Time Documentation, You can find the System Services and Device Drivers User Guide in below CCES installation directory in pdf format.

    C:\Analog Devices\CrossCore Embedded Studio 2.11.0\Docs

    Regards,
    Santhakumari.K

  • No, 

    (System Run-Time Documentation) ≠ (System Services and Device Drivers User Guide) 

    looks like i won't get solution in both of the queries. 

    its ok. i will look for some other way. 

    thanks for your time. 

  • Hi Rajesh,

    Apologies for the confusion caused.

    The System Run-Time Documentation is not available as a PDF. Unfortunately, it is only available within the CrossCore Embedded Studio help system.

    We have a known issue for this in our database which might be addressed in future release of CCES.

    Regards,
    Santhakumari.K