Brew-solution for using global variables and static variables in brew to report errors

Source: Internet
Author: User

If a global or static variable is used (note that no error is reported if it is only defined but not used ),

The following error is reported (I used static variables in cCommon. cpp)

 

Error: l6265e: Non-rwpi section cCommon. O (. BSS) cannot be assigned to Pi exec region er_zi.

Error: l6248e: cCommon. O (I. _ CT _ 7 ccommonfv) in PI region 'er _ R' cannot have address type relocation. BSS $2 in PI region 'er _ zi '.
Nmake: Fatal error u1077: "C:/ARM/adsv12/bin/armlink": ReturnCode"0x1"

 

Solution:

1 download elf2mod.exe (my resources have free download, http://d.download.csdn.net/down/2244832/miyunhong)

2. Install elf2mod to the/ARM/adsv1_2 directory. The installation directory is C:/ARM/adsv1_2.

3. Modify the Mak file as follows:
(1). Convert hextool =$ (armbin)/fromelf # arm ads utility to create HEX file from Image
Replace with: hextool = $ (armbin)/elf2mod # arm ads utility to create HEX file from Image
(2) Set CPU =-CPU ARM7TDMI # ARM7TDMI target processor
Replace with: CPU =-CPU ARM926EJ-S # arm9tdmi target processor

(3). Set lflags =$ (ropilink)-rwpi-entry 0x8000 #
Replace with: lflags =-Split-reloc-entry aeemod_load

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.