An issue has been identified with the linker script generated by the 11.1 version of the Nios® II Board Support Package (BSP) generator. The issue leads to link errors similar to the following:
/opt/altera/11.0sp1/nios2eds/bin/gnu/H-i686-pc-linux-gnu/bin/.. /lib/gcc/nios2-elf/4.1.2/.. /.. /.. /.. /nios2-elf/lib/libstdc .a(locale.o): Có chức năng 'std::locale::id::_M_id() const':
/build/swbuild/SJ/nightly/11.0sp1/208/l32/work/ip/sopc/app/gnu/BUILD/gnu/build-0-gcc.nios2-elf.i686-pc-linux-gnu/nios2-elf/libstdc -v3/src/.. /.. /.. /.. /src/gcc-4.1/libstdc -v3/src/locale.cc:436: cảnh báo: Không thể tiếp cận (null) (tại 0x00e77e74) từ con trỏ toàn cầu (tại 0x00d217f0) vì bù giờ (1402500) không trong phạm vi cho phép, -32678 đến 32767.
Để giải quyết vấn đề này, mở lệnh linker.x linker trong BSP và chỉnh sửa dòng sau:
.rwdata LOADADDR (.rodata) SIZEOF (.rodata) : AT ( LOADADDR (.rodata) SIZEOF (.rodata) SIZEOF (.rwdata) )
Xóa chỉ thị SIZEOF (.rwdata) cuối cùng, để xác định chính xác phần .rwdata như sau:
.rwdata LOADADDR (.rodata) SIZEOF (.rodata) : AT ( LOADADDR (.rodata) SIZEOF (.rodata) )
Vấn đề này sẽ được khắc phục trong phiên bản tương lai của Công cụ Nios II mềm dành cho người Eclipse.