Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

CRC and static data location

Hello all nios users,

I have 2 questions that are somehow related:

1. Is there a built in feature in the IDE or compiler that enables to calculate a CRC of any kind on the build code? If so, where is it being placed?

2. More general question: can I "force" location of static data in pre-determined memory section (something like pragma locate in other compilers)? how?

Thanks a lot for your help,

A.G.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi A.G.

    I don't know of any CRC feature but it may be worth checking the GCC documentation.

    It is possible to specify a memory section to place code or data in e.g.

    alt_u32 cheese __attribute__ (( section (".nv_sram")));

    would put the variable 'cheese' into the memory device called 'nv_sram' in your system.

    To verify where the linker has placed this variable (and everything else besides), add the following compiler option to your Project properties:

    -Wl,-Map,Output.map

    This will create a linker map file called 'Output.map' in your project's output folder.

    I hope this is useful.

    All the best

    Sharkybaba