Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12606 Discussions

CRC and static data location

Altera_Forum
Honored Contributor II
907 Views

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.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
217 Views

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 

 

 

0 Kudos
Reply