Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About BeanBrain

  • Rank
  1. Another thought, is Clk cast to unsigned char prior to shifting right , if so this will explain your problem? Need to consider C language and examine Compiler output to verify. If so you could use an intermediary allocation to ensure high order bits are shifted prior to assignment; unsigned int Clktmp = Clk >> 2; Clk2=(unsigned char) Clktmp; Beany
  2. I think I may see the problem? Global Clk is unsigned in but local Clk2, Clk3, Clk4 are unsigned char, therefore the maximum value is 255 for those. Beany
  3. Is this a bug? Bug description: Return type of function taking pointer to structure as an argument can not be enum type. They compile oky but generate a linker error message. Steps to reproduce: Two files, one calling the function and the other the function. They compile okay but generate an error when linking. First file, main.c // File main.c // BoostC Compiler options -v -W2 -t PIC18F4550 #include <system.h> /* BoostC v6.40 bug. If a function takes a -> struct as an argument, the return type cannot be a typedef - generally get missing extern when linking to g
  4. Hi Dave, This looks like the same problem I reported in posting #7711 Regards B
  5. I looked at porting this code to source boost a few months ago. However after reading the terms and conditions of the Microchip licence agreement and pursuing it with Microchip I came to the conclusion it was not viable to do this to be able to share code with other forum members. Any attempt to share code with other team members in a usable way would be in violation of the Microchip licence agreement. <{POST_SNAPBACK}> As Phil has said, "Oh Dear!". What a nuisance. I wonder if porting the code between compilers really is a problem?
  6. Hi Pavel, Sorry about the lack of easy reading, but it was necessary in ordet to demonstrate and to test the error. Regards, G
  7. Bug description: Anonymous reference with union / structure generates error - should it? Steps to reproduce: Compile the example code as is, it will generate errors. If you uncomment the #define BOOSTC line it will compile OK because the unions / structure are no longer anonymous nor are the accesses to them. // BoostC Compiler options -v -W2 -t PIC18F4550 #include <system.h> typedef unsigned char b_ytes; typedef unsigned int word; // uncomment next line to compile successfully //#define BOOSTC typedef union _BYTE { b_ytes _byte; struct { #ifdef BOOSTC b_yte
  8. Bug description: Compiler reports errors with some operations when you typedef a type, ie: typedef unsigned char byte; and you also have an identifies which starts with all characters of that typedef, ie: byte byte_data; Steps to reproduce: Please see the CODE box. As it stands the compiler will generate erros. If you then delete the 'b' of 'byte' from #define STORAGE_B byte, a different error occurs. If you then delete the 'w' of 'word' from #define STORAGE_W word , the code will compile and link WITHOUT ERRORS! Your comments please. Is it an compiler problem withs resolving the ide
  9. BoostC doesn't support bit fields. It did not handle anonymous unions and structures but this problem has been fixed a few releases back. If this feature still doesn't work for you can you send us a simple project that demonstrates the problem. If there is one we'll try to fix it by the next release. Regards, Pavel <{POST_SNAPBACK}> I will retry with a small example and post the code if I find problems. Regards, G
  10. I will try and send in a few minutes ... though I may need to install a zipping program:( G
  11. Hi Phil, I have been editing and now have a modified Microchip source which compiles with BoostC in the SourceBoost IDE. If you wish me to e-mail / pass you a copy of the modified sources, please let me know. I think I may be able to do so via the forum's personal message system? It may save you a monster of an edit! ------------------------------------------------ First set of results are for the USB firmware and some of the demo user stuff, but none of the temperature stuff, just to get an idea of the memory requirements With aggressive optimistation in both compiler and lin
  12. Hi Phil, I found the same problem with BoostC not catering for anonymous unions and structures. I have modified and compiled the Microchip sources for use with BoostC and the SourceBoost IDE. There is possibly a compiler bug too, I will see if I can produce a failing example for Dave or Pavel, it is connected with the byte and word typedefs and the BYTE and WORD unions / structures. I have also sorted the bit field test and modifications where needed. If you wish me to e-mail / pass you a copy of the modified sources, please let me know. I think I may be able to do so via the for
  13. Hi Dave, Thank you for the quick reply. I will use the method you suggest. Regards, G
  14. Bug description: I have started to port the Microchip Technology USB firmware for CDC RS-232 design reference from Microchip C18 compiler to BoostC compiler. The example code which I have cut and pasted produces the following compiler error message: error: incompatible types 'unsigned char' and 'struct USB_DEV_DSC' I am not too sure what is happening, but it looks like the compiler is treating at least the first member of the struct variable 'device_dsc' as the same type as the structure itself. Additionally the output shows both success and failure! Is 'main.c success' the output from
  15. Hi Phil, I too am getting started on a PIC based USB project. I have read Microchip's USB demo code. Their provided Windows USB API functions (using their DLL) and IOCTL functions (direct driver control) have helped in my understanding. I will try and read through their PIC code again to see if we can be of mutual assistance. Regards, G
  • Create New...