Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Pavel

  1. BoostC does not support struct initialization yet. You need to initialize your struct members in separate expressions like: ... typedef struct{ char titre[10]; char ligne; char position; }menu; ... menu.ligne = 1; menu.position = 2; ... Regards, Pavel
  2. http://forum.sourceboost.com/index.php?showtopic=261 Regards, Pavel
  3. Most likely the required bank was already set before calling this function. If you still think there is a problem in the compiler generated code please provide a simple project that will exibit this problem so we can reproduce it. Regards, Pavel
  4. I see the same errors. Once the offending vars are removed code compiles with no prob: #include <system.h> char led = 1; void interrupt( void ) { if( led ) { gpio = 7; led = 0; } else { gpio = 0; led = 1; } intcon &= 0xFB; } void main() { option_reg = 3; //set prescaler to 1:16 trisio = 0; //set all IOs to output //ansel = 0; cmcon = 7; gpio = 0; intcon = 0xA0; //enable GIE & TMR0 interrupt while( 1 ); //endless loop } Regards, Pavel
  5. This feature exists for a while already. From user's manual "Sometimes it's useful to rebuild the whole project even if some project files don't need to be processed. To force a full project build use the hot keys Ctrl+F7 or Ctrl+build command". Regards, Pavel
  6. I tried to reproduce this problem but didn't see any crash. Just a compile error (expected one). What is your definition of the phrase "compiler crashed"? Regards, Pavel
  7. We verified the issue and it happened to be a compiler bug that will be fixed in the next release. Try this workaround: void foo(char &n, char* m) { n = 100; } void main(void) { const char *test = "test"; char a = 0; char b=10; foo( a,test ); } Regards, Pavel
  8. Thanks for the code. This looks like a compiler bug. Try a workaround: instead of RA0=RA0^1; use: RA0^=1; Regards, Pavel
  9. Sorry my bad. Of course it's valid C. Can you provide a full and simple code that shows the problem. Regards, Pavel
  10. This is not a valid C operand. What kind of C compiler accepts this? Regards, Pavel
  11. What linker limitation are you talking about? The issue that we've been discussed if about compiler and it comes from PIC instruction set limitations. You still can pass a pointer to a port as function argument and than this port will be accessed trough INDF register. But this approach will require much more code than use of function templates. Pavel
  12. Yes there is a way to do this. Use function templates (like it's done in lcd driver included into SourceBoost installation). You can't pass port/pin numbers as function arguments because they need to be known at compile time. Actually there is a big reason for this. Because of this restriction you don't see tons of spam that are submitted to this forum every day. Regards, Pavel
  13. We have added CCS-like bit field support a while ago already: a.2 = 1; //set bit 2 of variable 'a' b.0 = 0; //clear bit 0 of variable 'b' True C bit fields are still in our todo list (very close to the bottom ) Regards, Pavel
  14. Step about adding the libc library into MPLAB based project is described in the BoostC help file in the chapted about MPLAB integration. Regards, Pavel
  15. Just to clarify your request. Do you want to use these constants in the code? If yes than they need to be expanded not by linker but by the compiler before they are written into obj file. Regards, Pavel
  16. Sorry for the confusion. Any access violation or exceptions or crashes in the compiler are problems and we are more than happy to get reports about them. Out philosophy is that any such problem is a serious one and should be fixed as soon as practical. In the corrent working compiler this crash has been fixed and I just forgot that your post actually included 2 issues: crash and unrecognized typedef and was addressing the second issue. Regarding it though gcc may handle such code this doesn't mean that this is standard behavoiur and others should do it as well. For example MSVC 8.0 doesn't han
  17. Bug fixed. Fix will be available in the coming release. Regards, Pavel
  18. This is not an error. You try to use NOTE_NODE before it's been typedefed and compiler reports an error because at this point it doesn't know yet what NOTE_NODE is. Regards, Pavel
  19. Yes BoostC and BoostBasic have compatible obj/lib files that can be mixed. In fact BoostBasic already uses libs.lib that contains system code that was built using BoostC. Regards, Pavel
  20. Use variables with absolute addresses as described in the P2C compiler help. Regards, Pavel
  21. This bug has been fixed. Fix will be available in the next release. Thanks for reporting. Pavel
  22. I just realized that this bug has been fixed in 6.41 patch that is available to download for several weeks already. Regards, Pavel
  23. This is a known problem that has been already fixed and fix will be available in the next release (soon). It was introduced sometimes around 6.40 release. The essence of this problem is that when elements of the same array get substructed one from another the compiler thinks that the result is always zero. A workaround is to assign one of array elements to a temporary variable and than do the substruction: #include <system.h> #define lit 40 void main() { unsigned short temp, _helper; unsigned short aa[3] = {752, 1008, 4520}; _helper = aa[0]; if( (aa[1] - _helper) < l
  24. This bug has been fixed. Fix will be available in the next release. Thanks for reporting. Pavel
  • Create New...