Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About chrisassall

  • Rank
  1. chrisassall

    How To Make Lib's In Boostbasic

    Thanks Dave for quick answer. Meanwhile I've made the example with some dos/command lines /batches ;-) Now I want to know, if it's possible to mix .obj/.lib from Boostc/Basic in one Project. In other words - are the obj/lib files generated from C/Basic are compatible so the linker can link them to a Hex file. Chris
  2. Just want to make a lib in Boostbasic. I tried your example from PunerjotMangat -> Hard-Usart consist of 3 files Usart.bas , Mylibs\usartlib.bas , Mylibs\lcdbaslib.bas compiling and linking at this state/ with the deliverd project file. Works. - O.K. Now tried to make a XXX.lib file from Mylibs\usartlib.bas , Mylibs\lcdbaslib.bas let's say Mylibs\uartlcd.lib for later linking with Usart.bas in a second project. So I deleted Usart.bas from the project and switch Settings->Options->Compiler-options from Application to Library. O.K. - Looking at Settings->Target now has changed from PIC16F877A to PIC16. Seems to be o.k., as I understand ... But now whenI I run a build all pic identifiers like 'trisc' a.s.o. are undefined .. How are the right settings for making a lib. Chris
  3. Thanks Pavel, that's what i thought/hoped Chris
  4. Dave, what I thought is not to overwrite the older install, but to remain it in it's directory -f.e. c:\programme\picant and all the files there - including the older IDE and the older compiler c2cpp.exe. Then install the new IDE in another directory f.e. . C:\Programme\SourceBoost. Then use 'older' C2CPP as ususal when starting picant from the older dir (Picant 5.0.8). Maybe then I could try to recompile all projects with the new IDE/C2CPP from SourceBoost dir. If it's identical - great - then forget the older install - if not - it's good to know that I can compile the older files with the older IDE/C2CPP. New projects then done from SourceBoost with newer C2CPP and parallel try the BoostC Compiler! This should work, if the new install did not overwrite important things in the registry from the older IDE/Compiler. - I think - But I did not know if there are such entries in the registry which could prevent older IDE/C2CPP from running when install SourceBoost. Maybe the copy IDE/compiler protection/registration ... ???? Chris
  5. I want to try out new BoostC. But I have several older projects which I may had to support in the future without any problems. I use till now PicAnt 5.0.8 So for the older projetcs I want to use this version of the IDE and compiler and also for future support. (Never change a running .... ) Question: Is it possible to install BoostC parallel to my older PicAnt so that I can use the new version from now on for new projects and the older IDE/compiler for the old projects ? What should I respect ? I have a legal registration for PicAnt and C2C++ Thanks Chris
  6. chrisassall

    C macro

    That's exact what we all want to hear!! Great !!!!! One of the biggest antvantages of this compiler tool is the great great support !!! Regards
  7. chrisassall

    C macro

    No no , I agree with you totally!! I think the limited macro facilities are the weakest point of the c2c/c2c++ compiler - and in the last consequence could be the reason to have to change to compiler - this is really sad, because many other things I like so much of this tool. Also tried to use a standalone precompiler - but this is not possible, because of such C enhancements like 'direct adressing' which will cause an external preprocessor to fail!!! Also tried to ask Pavel what he plans about the preprocessor but never got any comment Regards Chris
  8. Save your time 'cracker' to go into the hospital to repair your brain. Nobody of the real users will use a cracked version of the compiler, because this tool is worth every penny and we also want to have the support of admin! I hope you also will be betrayed some day if you have to earn money for your living! you sucker !!
  9. Use simpler experession for a compare which should result in a bit test command: example: char _INTCON@0x0B; char _PIR1@0x0C; char _PIE1@0x8C; #define _T0IF 0x04 #define _TXIF 0x10 #define _TXIE 0x10 Use: if(_INTCON & _T0IF) { ... } instead of if ((_INTCON & _T0IF) != 0) { .... } This will also work with nested compares but you had to help the compiler a little bit ;-) // Better use this construction .... if(_PIR1 & _TXIF) if (_PIE1 & _TXIE) { } // instead of if ( (_PIR1 & _TXIF) && (_PIE1 & _TXIE) ) { }
  10. I will open a new topic where I want to pool all the optimisation 'tricks' belongig this topic. Regards, Chris
  11. Thanks Pavel - this works excellent - exact what I want ! :laugh: but we should point the other users to the fact that you must deactivate the 'context saving during interrupt' option of the compiler if they use this script! >> in some cases C++ code may not work. The PicAnt IDE will issue a warning when such target gets selected. How could we - the users - find the code which maybe will not work - because the warning is only given at once and only global when you select a 'critical' target . ??? Regards, Chris
  12. Sorry - I had to shorten this posting (I omit the source samples) because the forum editor always cripples my text. I've send a much more detailed text direct to support@picant.com. ---------------------------------------------------------- Another problem (? :-) maybe only for me). If you want to use Option 'Context saving during interrupt' and your PIC doesn't have common (mapped) register area - f.e. the 16C73 / 16F73. The compiler generates the message 'Can't map context saving variables into mapped area.' O.K. that's clear - because the compiler generates code with could not handle if the interrupt happens when you are in Page1 and not in Page0: Solution could be: ;-------------------------------- ; During an interrupt, only the return PC value is saved on the stack. typically, users may wish to save key registers during an interrupt, i.e., W register and STATUS register. This will have to implemented in software: ; ; Stores and restores the W FSR and STATUS registers. ; The register, W_TEMP must be defined in each bank and must be defined at the same offset from the bank base address. ; f.e. ; If __int_save_cont_W is defined at 0x20 in bank 0. ; If int_save_cont_W1 at 0xA0 in bank 1.) ; same for bank 2/3 if you have a PIC with this banks but no common ram O.K. the code change we could do with a script! But I found no solution to generate the 'shadow'-WReg automatically. So my request - could the compiler do this for us in the next release ? Or is there another solution ? Regards Chris PS.: Has the simliar warning for C++ sources aynthing to do with the same fact ... and would it be solved then as well ?
  13. Thanks Admin for the Tip -- but the expression if ((INTCON & _T0IF) != 0) is extracted of your example Sample #4 that outputs a string to serial line using interrupts. http://www.picant.com/c2c/examples.html As I have the compiler only a short time I thought that this example was exemplarily and it makes no difference to give the compiler the complicated expression or the simple. Normally I prefer the complicated expression - because then I had not to bear in mind how is the logic in C. (is 0 true or is it false ? .... ) ((INTCON & _T0IF) != 0) is more self-explanatory. If you program in different langues you easy forget such facts and my experience shows that such little things are always a hidden sources of error ! So I prefer the long expressions if this makes no difference for the compiler! I have also thought about a script solution - but since now I haven't the time to work into this! Besides I maybe assume that there must be a problem with this, because there was no ready made script for this obvious problem. Regards Chris PS.: I also agree with the Admin that special functions are not a good solution of such things. But I thought that on this way this feature maybe could be implemented easier and quicker when you gave the compiler a little tip what he should do
  14. chrisassall

    c++ freeness

    Because C2C++ has most (all) the features of C2C (am I right Admin ?!). Then also C2C would be free! Besides - why should the C2C++ be free? Regards Chris
  15. Got Single User license for the C2C++ compiler version: 1.2 as: Christian Assall last week. It really fun only to look what the compiler makes with your C-Code! :-) But then the shock! Where is a test_bit() function! If you want to test in the intterupt the int flags you must use if ((_INTCON & _T0IF) != 0) and you will get: movf __INTCON, W andlw D'4' sublw D'0' movlw 1 btfsc STATUS, Z clrw sublw 0 btfsc STATUS, Z goto label_0000 but if you made this in assembler you will made this of course btfss INTCON,T0IF goto handle_int test_next_int: ooops ! CCS also generates: if ((INTCON & _T0IF) != 0) 00AD: MOVF INTCON,W 00AE: ANDLW 04 00AF: XORLW 00 00B0: BTFSC STATUS.2 00B1: GOTO 0B4 .................... { .................... erg=1; 00B2: MOVLW 01 00B3: MOVWF erg .................... } .................... .................... but if you use the bit_test() function it will do want we want! .................... if(bit_test(INTCON,T0IF)) 00B4: BTFSS INTCON.2 00B5: GOTO 0B8 .................... { .................... erg=2; 00B6: MOVLW 02 00B7: MOVWF erg .................... } Any idea (except inline assembler - yes you can make this - but then I will better use the pure mplab assembler, because the I could use my macro LIB which make assembler at this point as easy as C. I had the idea to put my used macros in the used P16CXXX.INC files - that's because you could not make it that the compiler put any asm line before the interrupt code where I want to use the macros. Also it's impossible to define the macros in the C-source because the Compiler will make some code checks which will crash with the most macros! But that isn't all really satisfying Any idea ? It's a pity - the compiler does so great work in the most aspects but in some details it failed a little bit :-( Regards Chris Assall