CuoreDiGhiaccio 0 Posted December 12, 2013 Report Share Posted December 12, 2013 Hi, i'm using SourceBoostC 7.20 version with Mplab IDE v.8.86, my project working fine untill 2 day ago, but i do not understandi why now the compiler give me this build error after all success. Clean: Deleting intermediary and output files. Clean: Deleted file "S10_mono.OBJ". Clean: Deleted file "D:\- Progetti -\-VABCD-\S10\S10_mono_new\S10_mono_New.HEX". Clean: Done. Executing: "C:\ProgramFiles\SourceBoost\boostc_pic16.exe" S10_mono.c -O1 -W1 -t 16F887 BoostC Optimizing C Compiler Version 7.20 (for PIC16 architecture) http://www.sourceboost.com Copyright© 2004-2013 Pavel Baranov Copyright© 2004-2013 David Hobday Licensed to Carlo Bazzoni under Single user Pro License for 1 node(s) Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited S10_mono.c success Executing: "C:\ProgramFiles\SourceBoost\boostlink_picmicro.exe" "D:\- Progetti -\-VABCD-\S10\S10_mono_new\S10_mono.obj" "C:\ProgramFiles\SourceBoost\Lib\libc.pic16.lib" -O1 -p "S10_mono_New" -t 16F887 BoostLink Optimizing Linker Version 7.20 http://www.sourceboost.com Copyright© 2004-2013 Pavel Baranov Copyright© 2004-2013 David Hobday Optimisation level:1 Building CASM file Memory Usage Report =================== RAM available:368 bytes, used:175 bytes (47.6%), free:193 bytes (52.4%), Heap size:191 bytes, Heap max single alloc:95 bytes ROM available:8192 words, used:3897 words (47.6%), free:4295 words (52.4%) success Loaded D:\- Progetti -\-VABCD-\S10\S10_mono_new\S10_mono_New.COF. BUILD FAILED: Thu Dec 12 16:01:15 2013 if i disable linker optimization Build Successfully but ROM is almost full and the program runs very slow; I'm going crazy.... can someone help me? ThankYou Quote Link to post Share on other sites
Reynard 0 Posted December 12, 2013 Report Share Posted December 12, 2013 Your heap has exceeded the maximum contiguous allocation for any RAM bank. You will have to reduce the RAM chunk allocation size to 95 bytes max. (Why not 96 ?) DO you have any large constant strings that you have not put in ROM. DO you have any large arrays. Cheers Reynard Quote Link to post Share on other sites
CuoreDiGhiaccio 0 Posted December 12, 2013 Author Report Share Posted December 12, 2013 (edited) thankyou very much, i have only 2 arrays, the first one of 10 unsigned short and the second of 7 unsigned char, no string or constant but compiler create this at the start of program: include "P16F887.inc" ; Heap block 0, size:96 (0x00000190 - 0x000001EF) __HEAP_BLOCK0_BANK EQU 0x00000003 __HEAP_BLOCK0_START_OFFSET EQU 0x00000010 __HEAP_BLOCK0_END_OFFSET EQU 0x0000006F ; Heap block 1, size:95 (0x00000110 - 0x0000016E) __HEAP_BLOCK1_BANK EQU 0x00000002 __HEAP_BLOCK1_START_OFFSET EQU 0x00000010 __HEAP_BLOCK1_END_OFFSET EQU 0x0000006E ; Heap block 2, size:0 (0x00000000 - 0x00000000) __HEAP_BLOCK2_BANK EQU 0x00000000 __HEAP_BLOCK2_START_OFFSET EQU 0x00000000 __HEAP_BLOCK2_END_OFFSET EQU 0x00000000 ; Heap block 3, size:0 (0x00000000 - 0x00000000) __HEAP_BLOCK3_BANK EQU 0x00000000 __HEAP_BLOCK3_START_OFFSET EQU 0x00000000 __HEAP_BLOCK3_END_OFFSET EQU 0x00000000 can i do something for resolve it? and this why is succesfully compiled? Optimisation level:1 Caution: argument of 'delay_us' calls must have a value of 1 or more Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.0045ms, Unit delay:0.001ms, Delay resolution:2 units Building CASM file Memory Usage Report =================== RAM available:368 bytes, used:181 bytes (49.2%), free:187 bytes (50.8%), Heap size:187 bytes, Heap max single alloc:95 bytes ROM available:8192 words, used:5321 words (65.0%), free:2871 words (35.0%) success Loaded D:\- Progetti -\-VIMEC-\S10\S10_mono_new\S10_mono_New.COF. BUILD SUCCEEDED: Thu Dec 12 19:10:23 2013 this is an old version of 4 days ago maybe I do not understand Edited December 12, 2013 by CuoreDiGhiaccio Quote Link to post Share on other sites
Pavel 0 Posted December 12, 2013 Report Share Posted December 12, 2013 First I'd try to figure out it this is Mplab or BoostC who causes the problem. Can you try to build your project outside of Mplab (under SourceBoost IDE or just command line). Regards, Pavel Quote Link to post Share on other sites
Reynard 0 Posted December 12, 2013 Report Share Posted December 12, 2013 I get something different at the top of my .asm file: include "P16F887.inc" ; Heap block 0, size:112 (0x00000110 - 0x0000017F) __HEAP_BLOCK0_BANK EQU 0x00000002 __HEAP_BLOCK0_START_OFFSET EQU 0x00000010 __HEAP_BLOCK0_END_OFFSET EQU 0x0000007F ; Heap block 1, size:96 (0x00000190 - 0x000001EF) __HEAP_BLOCK1_BANK EQU 0x00000003 __HEAP_BLOCK1_START_OFFSET EQU 0x00000010 __HEAP_BLOCK1_END_OFFSET EQU 0x0000006F ; Heap block 2, size:80 (0x000000A0 - 0x000000EF) __HEAP_BLOCK2_BANK EQU 0x00000001 __HEAP_BLOCK2_START_OFFSET EQU 0x00000020 __HEAP_BLOCK2_END_OFFSET EQU 0x0000006F ; Heap block 3, size:60 (0x00000034 - 0x0000006F) __HEAP_BLOCK3_BANK EQU 0x00000000 __HEAP_BLOCK3_START_OFFSET EQU 0x00000034 __HEAP_BLOCK3_END_OFFSET EQU 0x0000006F Can you check the .tdf file in the config directory and look at the RegisterGP definitions. There should be 5 of them, one for each RAM block. Cheers Reynard Quote Link to post Share on other sites
CuoreDiGhiaccio 0 Posted December 13, 2013 Author Report Share Posted December 13, 2013 Reynard, those are all RegisterGp definitions RegisterGP[ 50h ] { // block of general purpose memory Description = "General Purpose Register",""; Address = 020h; } RegisterGP[ 10h ] { // Theses general purpose registers all map to the same physical memory, // but appear in mulitple banks Description = "General Purpose Register - shared",""; Address = 0070h, 00F0h, 0170h, 01F0h; } RegisterGP[ 50h ] { // block of general purpose memory Description = "General Purpose Register",""; Address = 0A0h; } RegisterGP[ 60h ] { // block of general purpose memory Description = "General Purpose Register",""; Address = 110h; } RegisterGP[ 60h ] { // block of general purpose memory Description = "General Purpose Register",""; Address = 190h; } Pavel, SourceBoost IDE compile it without error, so how can i procede for debug my hardware with pickit 3 ? Please, i posted something in bug report forum section, now i delete the content but i've not understand how to delete topic and post, can you remove it ? I' m sorry, have not familiarity with the use of the forums Regards Gianni Quote Link to post Share on other sites
Reynard 0 Posted December 13, 2013 Report Share Posted December 13, 2013 Hi Gianni, Sourceboost compiling OK gives some comfort that your program is good to some extent. I don't use MPLAB or pickit so cannot give any advice here. You do have to include the idc3.h header if you are debugging. I assume MPLAB will set the DEBUG bit accordingly in the config word. Good luck Reynard Quote Link to post Share on other sites
CuoreDiGhiaccio 0 Posted December 13, 2013 Author Report Share Posted December 13, 2013 Hi Reynard and Pavel, i reinstalled mplab and now all work fine thankyou very much Quote Link to post Share on other sites
JorgeF 0 Posted December 13, 2013 Report Share Posted December 13, 2013 (edited) Hi About using MPLAB 8.xx for debugging either with Pickit3 or ICD3 my experience says: The Boost C integration with MPLAB doesn't make available the debug/release options of the MPLAB toolbar. What I do is to create 2 projects in MPLAB one for debug and the other for release. I then use the "project" properties in MPLAB to setup the compiler/linker options acording to the two build types. For the debug project: Besides including the "ICD3.h" header to reserve the registers used by the debuge executive (extra code added by MPLAB in debug build for PK3 or ICD3). (*) One also needs to: - define the "_DEBUG" macro for the compiler (-d switch) - set the "rom top" linker option (-rt switch) to protect the program memory for the debug executive. - set the "icd2" linker option(-icd2 switch) to protect program address "0x000" (reset vector) also used by the "debug executive" (**) (*) Double check the register (RAM) reservations of the "icd3.h" header against the "reserved resources" documentation for the debuging tool depicted in the "help" documentation of MPLAB. I did find some diferences and needed to make some adjustments to the default "icd3.h" header, at least for one PIC. (**) its the same for all debuging tools, PK2, PK3, ICD2 and ICD3. Applicable to: Sourceboost 7.20 MPLAB 8.86 HIH Best regards Jorge Edited December 13, 2013 by JorgeF Quote Link to post Share on other sites
robotchen 0 Posted January 1, 2014 Report Share Posted January 1, 2014 (edited) Hi, Jorge, I use HIBYTE, , and MAKESHORT for pic16f1827 programming. For the code: LOBYTE(ccpr1l,temp16); and HIBYTE(ccpr1h,temp16); I will get compiler errors: pichardware31.c(38:2): warning: expression is always false pichardware31.c(38:27): warning: 'if' body was optimised out Any suggestion to avoid these warnings. Chen Edited January 1, 2014 by robotchen Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.