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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Suspect linker fault

Altera_Forum
Honored Contributor II
1,044 Views

If I have two units, each containing the same variable name, but of different types, being of "file scope", the linker does not appear to raise a duplicate definitions error. What happens is that, in this particular instance, memory space for the smaller type is being allocated, and presumably they appear at the same address. This causes the consecutive variables to be overwritten. 

 

Oops! I now put a module name prefix on all module-global variables......
0 Kudos
0 Replies
Reply