PIC Vietnam

Go Back   PIC Vietnam > Microchip PIC > Các ngôn ngữ lập trình khác (CCS C, HT PIC,...) > Lỗi lập trình ngôn ngữ cấp cao

Tài trợ cho PIC Vietnam
Trang chủ Đăng Kí Hỏi/Ðáp Thành Viên Lịch Bài Trong Ngày Vi điều khiển

Lỗi lập trình ngôn ngữ cấp cao Những lỗi trường gặp trong lập trình. Khóa luồng khi bug được lỗi.

 
 
Ðiều Chỉnh Xếp Bài
Prev Previous Post   Next Post Next
Old 04-08-2010, 11:21 AM   #2
lybao_huy
Đệ tử 5 túi
 
Tham gia ngày: Jan 2008
Bài gửi: 97
:
Vấn đề này là do trong 1 hàm nào đó của bạn chứa qua nhiều code, nhưng nếu bạn tách các đoạn code trong hàm ra làm nhiều hàm nhỏ hơn, sau đó gọi nó thì ok, còn không là bị lỗi. Bạn coi trong Errors Messages trong Help của CCS.
**Out of ROM, A segment or the program is too large

A function and all of the INLINE functions it calls must fit into one segment (a hardware code page). For example, on the PIC16 chip a code page is 512 instructions. If a program has only one function and that function is 600 instructions long, you will get this error even though the chip has plenty of ROM left. The function needs to be split into at least two smaller functions. Even after this is done, this error may occur since the new function may be only called once and the linker might automatically INLINE it. This is easily determined by reviewing the call tree. If this error is caused by too many functions being automatically INLINED by the linker, simply add a #SEPARATE before a function to force the function to be SEPARATE. Separate functions can be allocated on any page that has room. The best way to understand the cause of this error is to review the call tree.

thay đổi nội dung bởi: lybao_huy, 04-08-2010 lúc 11:38 AM.
lybao_huy vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn
 


Quyền Sử Dụng Ở Diễn Ðàn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Smilies đang Mở
[IMG] đang Mở
HTML đang Tắt

Chuyển đến


Múi giờ GMT. Hiện tại là 11:11 AM.


Được sáng lập bởi Đoàn Hiệp
Powered by vBulletin®
Page copy protected against web site content infringement by Copyscape
Copyright © PIC Vietnam