generated code should be add 'const' in initialize*.c


uint8_t initialize_binary_10[] = { ....

should be change

const uint8_t initialize_binary_10[] = { .... 

If const is omit, initialize_binary_10 location ram, but no OS system is not have enough store this.

  • 0
    •  Analog Employees 
    on Jul 7, 2021 8:58 AM

    Hello Jae,

    Apologies, I'm struggling to fully understand your question. Is your concern that when the "const" is omitted the "initialize_binary_10[]" is stored only in RAM and not in System Memory?

    If so, then whether or not to store variables like these in RAM or System Memory should be a decision made by the customer. Every application will have different memory requirements, some customers will need very fast access to variables and will have the RAM to support them, others will be RAM constrained and will need to push large variables to System Memory. Depending on what your application is you can make that decision in your own codebase.

    I hope I've addressed your question correctly, do return with more clarifications if I have missed the point!

    Best Regards,

  • Hi OWatkins,

    I think ADI coside no-OS system as bare-metal on Cortex-A series (for exapmple Xilinx Zynq)
    But someone include me conside no-OS system as Coretex-M series (aka MCU)
    The MCU I use only have 320 kilo-byte ram, so It can not contain all initialize data.
    So, I'm adding 'const' to every TES code generation because build error - not fit RAM region -

    As you said, there will be users who value speed.
    But all initialize data write via SPI, I think this will be slow read system memory in most cases.
    So, even for those who value speed, it will not be a problem for the initial data to be stored in the system memory.



  • +1
    •  Analog Employees 
    on Jul 7, 2021 1:25 PM in reply to JaeKyung

    Hello JaeKyung,

    In response to this request I'll be meeting with the Software team to discuss this idea. Apparently it was once an option that was then removed, we'll see if it should be brought back or left out in future releases.

    Thanks very much for your interest!

    All the best,

  • +1
    •  Analog Employees 
    on Jul 13, 2021 2:18 PM in reply to OWatkins

    Hello JaeKyung,

    So I just had a meeting with the Software team, it seems that requests such as these (for refactoring large variables based on memory requirements, compiler choice, etc.) are few and far between. Given that there's so few customers asking for this we are not going to add a new feature to allow choosing "consnt" declarations vs. normal declarations.

    We will be improving our documentation to account for this shortfall however, I do hope this helps!

    Best Regards,