Editing BoostC from the Fourm

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
  
This is the extraction of useful info on BoostC from its forum.  We hope it is the most useful information as it deals only with issues which lead to conclusions on information that might otherwse have been missed.  Each extract starts with a link to the forum thread, read it in full if you wish.  I have removed names and edited the text in a way that I hope makes it more readable.  It is just a forum, the postings may be outright wrong, or out of date.  The final product is mine ( I am responsible for posting the material ( check page history), I claim no ownership, nor am I responsible for the accuracy of the material or your results using it. )  If you object let me [russ_hensel] know, or fix it yourself.  It is a wiki so others than [russ_hensel] may have added/edited the content. Not included:
+
This is the extraction of useful info on BoostC from its forum.  Each extract starts with a link to the foum thered, read it in full if you wish.  I have removed names and edited the text in a way that I hope makes it more readable.  It is just a forum, the postings may be outright wrong, or out of date.  The final product is mine ( I am responsible for posting the material ( check page history), I claim no ownership, nor am I responsible for the accuracy of the material or your results using it. )  If you object let me [russ_hensel] know, or fix it yourself.  It is a wiki so others than [russ_hensel] may have added/edited the content. Not included:
  
 
* Things unresolved:
 
* Things unresolved:
Line 7: Line 7:
 
* Compiler issues that should have been fixed by now or soon
 
* Compiler issues that should have been fixed by now or soon
 
* Most hardware issues
 
* Most hardware issues
* Things that i think are covered in the manual
+
* Things that i thnik are covered in the manual
 
* Documentation of most things you cannot do.
 
* Documentation of most things you cannot do.
 
* Notices of projects, websites.... we should have these in the [[PIC Links]] or some other place.
 
* Notices of projects, websites.... we should have these in the [[PIC Links]] or some other place.
Line 13: Line 13:
  
 
== 2008 Extracts ==
 
== 2008 Extracts ==
 
  
 
* From: http://forum.sourceboost.com/index.php?showtopic=3909&pid=14605&mode=threaded&start=#entry14605
 
* From: http://forum.sourceboost.com/index.php?showtopic=3909&pid=14605&mode=threaded&start=#entry14605
Line 29: Line 28:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3896
 
* From: http://forum.sourceboost.com/index.php?showtopic=3896
  
Line 37: Line 35:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3895&pid=14515&mode=threaded&start=#entry14515
 
* From: http://forum.sourceboost.com/index.php?showtopic=3895&pid=14515&mode=threaded&start=#entry14515
  
Line 43: Line 40:
 
(*Not* the current date and time at run-time).
 
(*Not* the current date and time at run-time).
  
  // CODE
+
  CODE
 
  char time[] = __TIME__;  // "16:38:53"
 
  char time[] = __TIME__;  // "16:38:53"
 
  char date[] = __DATE__;  // "Nov 30 2008"
 
  char date[] = __DATE__;  // "Nov 30 2008"
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3877&pid=14436&mode=threaded&start=#entry14436
 
* From: http://forum.sourceboost.com/index.php?showtopic=3877&pid=14436&mode=threaded&start=#entry14436
  
Question:  I can understand that the isr may interrupt the 'main loop' at any point and hence (global) variables may be in a indeterminate state, but why can't functions be used in both isr and main routines.
+
Question:  I can understand that the isr may interrupt the 'main loop' at any point and hence (global) variables may be in a inderterminate state, but why can't functions be used in both isr and main routines.
  
 
Surely the sw stack is used for 'main' and 'interrupt' functions, so local vars so they should be safe while the isr is running??
 
Surely the sw stack is used for 'main' and 'interrupt' functions, so local vars so they should be safe while the isr is running??
Line 60: Line 56:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3871&pid=14426&mode=threaded&start=#entry14426
 
* From: http://forum.sourceboost.com/index.php?showtopic=3871&pid=14426&mode=threaded&start=#entry14426
  
Line 72: Line 67:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3862&pid=14378&mode=threaded&start=#entry14378
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3862&pid=14378&mode=threaded&start=#entry14378
  
Line 92: Line 86:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3762&pid=14225&mode=threaded&start=#entry14225
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3762&pid=14225&mode=threaded&start=#entry14225
  
Line 99: Line 92:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3854&pid=14343&mode=threaded&start=#entry14343
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3854&pid=14343&mode=threaded&start=#entry14343
  
=== Using a library ===
+
To build (compile) a library, goto "Settings -> Options...", select Output Type: Library radio button.
  
 
To add a library to your project, goto the Workspace (project) window (left of screen usually), right click and add the .lib file you want to include.
 
To add a library to your project, goto the Workspace (project) window (left of screen usually), right click and add the .lib file you want to include.
 
Also #include the corresponding .h file in your source.
 
 
Remember: If you use #include <test.h> , the compiler expects the .h file to be in the ...\SourceBoost\include directory.
 
Use #include "test.h" if the header is in your local project directory. Or just use the full path name.
 
 
=== Building a library ===
 
 
To build (compile) a library, goto "Settings -> Options...", select Output Type: Library radio button.
 
  
 
I think left out a subtle point in that most libraries need not only a .lib but also a .h which defines the function prototypes that the library contains. Then, the user of the library would also #include the .h file in the source that is using it so that the compiler knows what to expect. This is the same as if you have multiple files in a stand-alone compile.
 
I think left out a subtle point in that most libraries need not only a .lib but also a .h which defines the function prototypes that the library contains. Then, the user of the library would also #include the .h file in the source that is using it so that the compiler knows what to expect. This is the same as if you have multiple files in a stand-alone compile.
Line 124: Line 107:
  
 
You now have your .h file to match your .lib file.
 
You now have your .h file to match your .lib file.
 +
 +
Remember: If you use #include <test.h> , the compiler expects the .h file to be in the ...\SourceBoost\include directory.
 +
Use #include "test.h" if the header is in your local project directory. Or just use the full path name.
  
  
-----------
 
== linker options ==
 
 
* From http://forum.sourceboost.com/index.php?showtopic=2704&pid=14026&mode=threaded&start=#entry14026
 
* From http://forum.sourceboost.com/index.php?showtopic=2704&pid=14026&mode=threaded&start=#entry14026
  
Line 134: Line 118:
  
  
-----------
 
 
* From http://forum.sourceboost.com/index.php?showtopic=3687&pid=13897&mode=threaded&show=&st=0
 
* From http://forum.sourceboost.com/index.php?showtopic=3687&pid=13897&mode=threaded&show=&st=0
  
Line 141: Line 124:
  
  
-----------
 
 
* From http://forum.sourceboost.com/index.php?showtopic=3689&pid=13901&mode=threaded&start=#entry13901
 
* From http://forum.sourceboost.com/index.php?showtopic=3689&pid=13901&mode=threaded&start=#entry13901
  
This looks like well documented but included as a gotcha.
+
This looks like well documented but included as a goctgha.
 
Have you tried reading the GPIO ports before clearing the interrupt flag GPIF?  The port has to be read to end the change mismatch condition otherwise GPIF will just set itself again (page 21 of data sheet).
 
Have you tried reading the GPIO ports before clearing the interrupt flag GPIF?  The port has to be read to end the change mismatch condition otherwise GPIF will just set itself again (page 21 of data sheet).
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3591&pid=13546&mode=threaded&start=#entry13546
 
* From: http://forum.sourceboost.com/index.php?showtopic=3591&pid=13546&mode=threaded&start=#entry13546
 +
  
 
...Is it not possible to get quick access to bits in an array?...  No it's not. You have to use good old bitwise operators.
 
...Is it not possible to get quick access to bits in an array?...  No it's not. You have to use good old bitwise operators.
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3670&pid=13847&mode=threaded&start=#entry13847
 
* From: http://forum.sourceboost.com/index.php?showtopic=3670&pid=13847&mode=threaded&start=#entry13847
  
Line 160: Line 141:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3669&pid=13792&mode=threaded&start=#entry13792
 
* From: http://forum.sourceboost.com/index.php?showtopic=3669&pid=13792&mode=threaded&start=#entry13792
  
Line 166: Line 146:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3649&pid=13765&mode=threaded&start=#entry13765
 
* From: http://forum.sourceboost.com/index.php?showtopic=3649&pid=13765&mode=threaded&start=#entry13765
  
Line 173: Line 152:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3658&pid=13746&mode=threaded&start=#entry13746
 
* From: http://forum.sourceboost.com/index.php?showtopic=3658&pid=13746&mode=threaded&start=#entry13746
  
Line 180: Line 158:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3644&pid=13713&mode=threaded&start=#entry13713
 
* From: http://forum.sourceboost.com/index.php?showtopic=3644&pid=13713&mode=threaded&start=#entry13713
  
Line 186: Line 163:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3588&pid=13562&mode=threaded&start=#entry13562
 
* From: http://forum.sourceboost.com/index.php?showtopic=3588&pid=13562&mode=threaded&start=#entry13562
  
Line 192: Line 168:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3602&pid=13596&mode=threaded&start=#entry13596
 
* From: http://forum.sourceboost.com/index.php?showtopic=3602&pid=13596&mode=threaded&start=#entry13596
  
Line 198: Line 173:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3598&pid=13576&mode=threaded&start=#entry13576
 
* From: http://forum.sourceboost.com/index.php?showtopic=3598&pid=13576&mode=threaded&start=#entry13576
  
Line 204: Line 178:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3593&pid=13553&mode=threaded&start=#entry13553
 
* From: http://forum.sourceboost.com/index.php?showtopic=3593&pid=13553&mode=threaded&start=#entry13553
  
Q: The problem is that Debug Express reserves RAM, as well as some program memory, for its own use. e.g. on the 16F887 it reserves 0x070, 0x0f0, 0x165 to 0x170 inclusive and 0x1f0. (These are shown as RR in the MPLAB IDE file registers window). On larger projects requiring more RAM BoostC has no knowledge of these reserved locations and simply overwrites them. Does anyone know the best way, if there is one, of reserving these or any other locations to prevent them being used by BoostC?
+
The problem is that Debug Express reserves RAM, as well as some program memory, for its own use. e.g. on the 16F887 it reserves 0x070, 0x0f0, 0x165 to 0x170 inclusive and 0x1f0. (These are shown as RR in the MPLAB IDE file registers window). On larger projects requiring more RAM BoostC has no knowledge of these reserved locations and simply overwrites them. Does anyone know the best way, if there is one, of reserving these or any other locations to prevent them being used by BoostC? Declare fixed address variables at the locations you want to protect. BoostLink will work around any fixed address variables.
 
 
A:
 
Declare fixed address variables at the locations you want to protect. BoostLink will work around any fixed address variables.
 
  
 
Something like this would fit the bill:
 
Something like this would fit the bill:
Line 222: Line 192:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3591&pid=13546&mode=threaded&start=#entry13546
 
* From: http://forum.sourceboost.com/index.php?showtopic=3591&pid=13546&mode=threaded&start=#entry13546
  
Line 229: Line 198:
 
The "<<", ">>", "&", and "|" operators.
 
The "<<", ">>", "&", and "|" operators.
  
 
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3590&pid=13539&mode=threaded&start=#entry13539
 
* From: http://forum.sourceboost.com/index.php?showtopic=3590&pid=13539&mode=threaded&start=#entry13539
  
 
When a project contains multiple source files, is there a way to compile a single file?  You can try using "Project -> Quick", then select the source (.c) file you are interested in, and a mini project will be created containing only that single file.  When you are done, just delete the mini project file and go back to the main project.
 
When a project contains multiple source files, is there a way to compile a single file?  You can try using "Project -> Quick", then select the source (.c) file you are interested in, and a mini project will be created containing only that single file.  When you are done, just delete the mini project file and go back to the main project.
  
 
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3587&pid=13523&mode=threaded&start=#entry13523  
 
* From: http://forum.sourceboost.com/index.php?showtopic=3587&pid=13523&mode=threaded&start=#entry13523  
  
Line 257: Line 222:
  
  
-----------
 
 
* From: http://forum.sourceboost.com/index.php?showtopic=3577&pid=13494&mode=threaded&start=#entry13494
 
* From: http://forum.sourceboost.com/index.php?showtopic=3577&pid=13494&mode=threaded&start=#entry13494
  
Line 263: Line 227:
  
  
-----------
 
 
*From:  http://forum.sourceboost.com/index.php?showtopic=3574&pid=13469&mode=threaded&start=#entry13469
 
*From:  http://forum.sourceboost.com/index.php?showtopic=3574&pid=13469&mode=threaded&start=#entry13469
  
Line 278: Line 241:
  
  
-----------
 
 
*From:  http://forum.sourceboost.com/index.php?showtopic=3570&pid=13455&mode=threaded&start=#entry13455
 
*From:  http://forum.sourceboost.com/index.php?showtopic=3570&pid=13455&mode=threaded&start=#entry13455
  
Line 286: Line 248:
  
  
-----------
 
 
*From:  http://forum.sourceboost.com/index.php?showtopic=3571&pid=13459&mode=threaded&start=#entry13459
 
*From:  http://forum.sourceboost.com/index.php?showtopic=3571&pid=13459&mode=threaded&start=#entry13459
  
The library code for [[one wire]] library use the nop() instruction. They should rewrite this lib because now it´s not working with different clock frequency. A work around is to run goodies if you have pro licens and change the code your self. Or you can download the lib code from lika.be
+
The libary code for one wire library use the nop() instruction. They should rewrite this lib becasue now it´s not working with different clock frequency. A work around is to run goodies if you have pro licens and change the code your self. Or you can download the lib code from lika.be
  
 
Not sure about the above, you many want to see the original post
 
Not sure about the above, you many want to see the original post
  
  
-----------
 
 
*From:  http://forum.sourceboost.com/index.php?showtopic=3566&pid=13440&mode=threaded&start=#entry13440
 
*From:  http://forum.sourceboost.com/index.php?showtopic=3566&pid=13440&mode=threaded&start=#entry13440
  
Line 331: Line 291:
  
  
-----------
+
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3556
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3556
  
Line 349: Line 309:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3496
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3496
  
Line 355: Line 314:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3494&pid=13143&mode=threaded&start=#entry13143
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3494&pid=13143&mode=threaded&start=#entry13143
  
Line 361: Line 319:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3491&pid=13139&mode=threaded&start=#entry13139
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3491&pid=13139&mode=threaded&start=#entry13139
  
Line 371: Line 328:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3489&pid=13124&mode=threaded&start=#entry13124
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3489&pid=13124&mode=threaded&start=#entry13124
  
Line 379: Line 335:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3199
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3199
  
Line 385: Line 340:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3475&pid=13043&mode=threaded&start=#entry13043
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3475&pid=13043&mode=threaded&start=#entry13043
  
Line 403: Line 357:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3484&pid=13085&mode=threaded&start=#entry13085
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3484&pid=13085&mode=threaded&start=#entry13085
  
Line 411: Line 364:
  
  
-----------
+
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3473&pid=13038&mode=threaded&start=#entry13038
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3473&pid=13038&mode=threaded&start=#entry13038
  
Line 419: Line 372:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3472&pid=13035&mode=threaded&show=&st=#entry13035
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3472&pid=13035&mode=threaded&show=&st=#entry13035
  
Line 425: Line 377:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3438
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3438
 +
  
 
discussion of functions in interrupts, debouncing in various ways, see the post.
 
discussion of functions in interrupts, debouncing in various ways, see the post.
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3463
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3463
  
Line 438: Line 389:
  
 
---------
 
---------
 +
 
* From:   
 
* From:   
  
Line 453: Line 405:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=2802&pid=10768&mode=threaded&start=#entry10768
 
* From:  http://forum.sourceboost.com/index.php?showtopic=2802&pid=10768&mode=threaded&start=#entry10768
  
Line 459: Line 410:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3457&pid=12979&mode=threaded&start=#entry12979
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3457&pid=12979&mode=threaded&start=#entry12979
  
Line 465: Line 415:
  
  
-----------
 
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3455&pid=12946&mode=threaded&start=#entry12946
 
* From:  http://forum.sourceboost.com/index.php?showtopic=3455&pid=12946&mode=threaded&start=#entry12946
  

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)