Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. Is there a way to mark a code section and have it commented out n "one click" I know it is possible to /* at the begining and and then */ at the end but what I am looking for is a "one click" way to insert // at the beginning of each line in the section (an then removing it) This is a feature found in all IDEs that I know, so I either missed how to do this or it does not exist in the SB IDE editor.
  3. Earlier
  4. JorgeF

    Error code

    Hi Good you found it. But its a fact that the BoostC compiler is quite weak in terms of error reporting. I've seen that error, "failure", for all kinds of errors. In fact its quite rare to see other error messages. Best regards Jorge
  5. Can some one tell me what error code 133 "failure" means? I keep getting this error when trying to compile a project. It's associated to a *.h file line #133. I'm not sure what I did to break my code which compiled ok before, but after a bunch of edits I can't seem to figure out what I did to generate this error. The error "failure" seems a bit vague. Using SB 7.42 Also is there a document listing of all the error codes this compiler can generate? thanks Edit. I found the problem: I had mistakenly declared an emum element the same as a function name.
  6. jartim

    Compiler hangs with in-line assembly

    Hi Pavel You are 100% correct, I was changing the coding from assembler to C and wasn't concentrating! Please disregard my original post. Regards Tim
  7. Pavel

    Compiler hangs with in-line assembly

    Compiler hanging is not good and we will look into this but your code does not look correct either. Everything inside the asm{} block should be assembly language. Anything else including C statements like _tblptru = 0 will not work. Regards, Pavel
  8. Bug description: Compiler hangs indefinitely with the following source - Steps to reproduce: This file is "TClass.hpp" - unsigned char ReadFlash(unsigned int FlashAddr) { asm { _tblptru = 0 _tblptrh = _FlashAddr _tblptrl = _FlashAddr+1 tblrd* } return tablat; } Expected behaviour: This should compile with no errors Is the problem 100% reproduceable: 100% every time IDE version: MPLAB-X V4.20 Compiler: BoostC++ Compiler version: V7.43 Target device: PIC18F8527 OS: Win 7 Comments: Compiles if the three lines relating to _tblptrx are commented out.
  9. Hi Usualy the forums are more targeted at experience exchange between users than to technical support. Same happens with the Microchip forum and a few others I know. Best regards Jorge
  10. Hi Jorge No, not yet, I will do this today. I assumed that the forum was the first place to go to report an issue? Regards Tim
  11. Hi Confirmed, both for C++ and C. Did you try to send an email to support@sourceboost.com ? Best regards Jorge
  12. Bug description: Compiler generates incorrect code from mixed C++ and inline assembler - Steps to reproduce: The following is a sample section of code that generates the wrong address for _TestTemp+1 - void CPUTest() { unsigned char TestTemp[3]; asm { CPUTest_9: movlw 0xff ; set up locations ready to change movwf _TestTemp movwf _TestTemp+1 movwf _TestTemp+2 lfsr 0, _TestTemp+1 ; set up a pointer movlw 0x55 movwf _postdec0 } } Expected behaviour: In my application TestTemp[0] is located at 0x5C2, TestTemp[1] and [2] are at 0x5C3 and 0x5C4 respectively. The compiler should load fsr0 with the value 0x5C3 (_TestTemp+1), however the final generated code loads the value 0x5C2 instead. Is the problem 100% reproducible: 100% happens every time IDE version: MPLAB-X V4.20 Compiler: BoostC++ Compiler version: V7.43 Target device: PIC18F8527 OS: Win7 Comments:
  13. Hello I use since ages Sourceboost with Linux and MPLAB IDE 8,90 under wine (OS UBUNTU). Recently I migrated to MPLABX (Linux version) using the free version of MPLABXC8 compiler. As I have good experiences with SourceBoost I'd would like to go ahead with this complier and purchase the newest version 7.43 and use it with MPLABX IDE under Linux. Did any body make it work? Kind regards Martin
  14. jartim

    Incorrect code generated

    Thanks Pavel. Unfortunately the Chameleon compiler does not support C++ (does it?) Regards Tim
  15. Pavel

    Incorrect code generated

    I can confirm this issue for the BoostC compiler family. The Chameleon compiler however handles this code well. Regards, Pavel
  16. Hi I missed this topic in due time,so I don't know if this repply is usefull, but here it goes. That is a nice ASM trick, but I think its uneeded in 'C' and also undesired. Its not a good idea to directly manipulate the stack when using a compiled language, because you don't control how the compiler handles the stack. Also bear in mind that due to the limited stack size and specific stack access instructions of the 8 bit PICs, BoostC and other compilers implement a so called "software stack" to handle parameters and automatica variables. The hardware stack is used only for return addresses. To store strings in the program memory you can use the "rom" qualifier (page 47 of the Boost C manual) and then the usual 'C' tools to work with them. HIH Best regards Jorge
  17. JorgeF

    Incorrect code generated

    Hi I've confirmed the Bug, both for C and C++. But as I can't solve it, I would suggest 2 alternatives that generate correct code: while(c--) or while(c = c -1) HIH Best regards Jorge
  18. jartim

    Incorrect code generated

    Bug description: The compiler generates incorrect code for the following statement - while (c -= 1) Steps to reproduce: My source code is this - #define BSIZE 120 unsigned char RxBuffer[BSIZE]@0x100; unsigned char TxBuffer[BSIZE]@0x200; unsigned char RamSwapArea[16U]@0x300; void main() { asm lfsr 1, _RxBuffer asm lfsr 2, _TxBuffer unsigned char c = BSIZE; while (c -= 1) { asm movff _postinc1, _postinc2 } } The bug is the statement "while (c -= 1)" generates an INFSNZ instruction, even though variable c is being decremented. Here is the disassembly listing - 13: #define BSIZE 120 14: unsigned char RxBuffer[BSIZE]@0x100; 15: unsigned char TxBuffer[BSIZE]@0x200; 16: unsigned char RamSwapArea[16U]@0x300; 17: 18: void main() 19: { 20: asm lfsr 1, _RxBuffer 0008 EE11 LFSR 1, 0x100 000A F000 NOP 21: asm lfsr 2, _TxBuffer 000C EE22 LFSR 2, 0x200 000E F000 NOP 22: 23: unsigned char c = BSIZE; 0010 0E78 MOVLW 0x78 0012 6E01 MOVWF c, ACCESS 24: while (c -= 1U) 0014 4A01 INFSNZ c, F, ACCESS 001C D7FB BRA 0x14 25: { 26: asm movff _postinc1, _postinc2 0018 CFE6 MOVFF POSTINC1, POSTINC2 001A FFDE NOP 27: } 28: } 0016 0012 RETURN 0 Expected behaviour: The instruction at address 0014 should be 'DCFSNZ c, F, ACCESS Is the problem 100% reproduceable: 100% every time IDE version: MPLAB-X 4.15 (64-bit) Compiler: BoostC++ Optimizing C++ Compiler Version 7.43 (for PIC18 architecture) Compiler version: V7.43 Target device: PIC18F8527 OS: Windows 10 Pro 64-bit Comments: Have included the source files - main.cpp
  19. thanks. got it.
  20. Go to the Microchip web site. Select the page for your chip (PIC16F1788). Select the documentation tab and it's under Programming Specifications.
  21. I apologize for perhaps a dumb question, but what programming manual?
  22. Hi mityeltu, The programming manual page 35 suggests the base address for EEPROM is at 1E00h. Cheers Reynard
  23. I am making new .h and .tdf files for the 16f1788 chip that I wan to use for a new project. Why I wan to use this chip as opposed to another that might already have these files built is not important for this discussion. I have run through the .h file and am at the last section, but I don't understand where I can find the eeprom base address that is used in any of the existing .h files. For instance, the file for the 16f1783 that I am using as a template calls out the address as 0xf000. I can't find this information anywhere in the datasheet for this chip. Where can I find it? Is it always the same? If not, how can I verify the location for the chip I am currently working on? Can anyone tell me what section it's in?
  24. Is there a way to duplicate an assembly language macro that I use to store constant strings inline with my code? The putstr() function pulls the return address (the string address in this case) from top-of-stack, sends the string while updating TOS, and returns to the instruction immediately following the inline string. Here's the assembly language version I'm trying to duplicate; putstrg macro string ; in-line rom string call putstr ; inline string print function dt string,0 ; inline string endm ; Here's the inline print string function... /******************************************************************** * * ********************************************************************/ void putstr() // in-line strings (14 words) { strloop: // bank 31 (inserted by compiler) |31 asm movf _tosl,W // copy return address to FSR1 |31 asm movwf _fsr1l // " |31 asm movf _tosh,W // " |31 asm movwf _fsr1h // " |31 asm bsf _fsr1h,7 // set b7 for access to flash |31 asm incf _tosl,F // bump return/string address |31 asm btfsc _status,Z // " |31 asm incf _tosh,F // " |31 asm movf _indf1,W // end-of-string (0x00)? |31 asm btfsc _status,Z // no, skip (send char), else |31 asm return // exit (end-of-string) |31 asm call putwreg() // data passed in wreg |31 asm bra strloop // |31 } Thank you all for your time and kind consideration. Cheerful regards, Mike, K8LH
  25. Reynard

    Where's Chameleon?

    Go to Settings menu and select Toolsuite… There you will find Chameleon. Cheers Reynard
  26. I have looked all over the site and other somewhat disreputable sites looking for the Chameleon compiler that is mentioned every time I build a project with BoostC++. I can't seem to find it anywhere. Where do i go to get it?
  1. Load more activity