Jump to content

jartim

EstablishedMember
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jartim

  • Rank
    Newbrie
  1. Preprocessor Macros Do Not Work In Mplab-X V4

    It looks like this problem was originally fixed in V7.10 but has been re-introduced (this is the text from the version log for V7.10) - Mplab x integration 1. Updated MPLAB X plugin to support all SourceBoost compilers. 2. Fixed problem when extra command line arguments were not added to the command line. 3. Added support for include directories to mplabx plugin. Item 2 is the problem being reported here.
  2. Preprocessor Macros Do Not Work In Mplab-X V4

    Found a workaround to this issue - manually define the macro in the "Additional options" field - The output window shows the value gets tagged on to the end of the command line, whereas before it was not being passed to the compiler at all.
  3. Bug description: The same source code line generates different assembly code in different places. Sometimes the generated code is incorrect, sometimes it is correct. Steps to reproduce: Use the same source code in 2 different places in the source. Detailed description to reproduce this problem I use this statement in two different places in my source code - WatchdogTarget = CONST_WDT_MINTIME + (Trembler & 0x07); CONST_WDT_MINTIME is a constant - #define CONST_WDT_MINTIME 1U The first time it is used, the following code is generated (which looks correct) - 01D7 3007 MOVLW 0x7 01D8 0547 ANDWF 0x47, W 01D9 00CA MOVWF 0x4A 01DA 0A4A INCF 0x4A, W 01DB 00C4 MOVWF WatchdogTarget The second time is it used, the following code is generated (which is not correct as it modifies the value in "Trembler" at 0x47) - 020A 3007 MOVLW 0x7 020B 05C7 ANDWF 0x47, F 020C 0A47 INCF 0x47, W 020D 00C4 MOVWF WatchdogTarget Expected behaviour: This is the code I would expect to see - 020A 3007 MOVLW 0x7 020B 05C7 ANDWF 0x47, W 020C 0A47 ADDLW 0x01 020D 00C4 MOVWF WatchdogTarget The compiler should not modify the value of "Trembler" at 0x47 (and as the value of CONST_WDT_MINTIME may be other values at compile-time) If CONST_WDT_MINTIME was (say) 32, I would expect to see this instead - 020A 3007 MOVLW 0x7 020B 05C7 ANDWF 0x47, W 020C 0A47 ADDLW 0x20 020D 00C4 MOVWF WatchdogTarget Is the problem 100% reproduceable: Every time IDE version: MPLAB-X 4.0 Compiler: BoostC++ Compiler version: 7.42 Target device: PIC12F635 OS: Windows 7 64-bit
  4. Update To Test_Bit

    Hello - When the compiler generates code for "test_bit(x,y)" it very nicely generates a 'btfss' instruction. However, when it generates code for "!test_bit(x,y)" it generates much more complex code because the ! is a logical operation not a bit-wise operation. It would be nice if the compiler could spot that "!test_bit(x,y)" is really a 'btfsc' instruction instead. Thanks!
  5. I would guess the endian-ness is wrong for the long-integer so when you load the bytes in individually, they're actually going in in the wrong order. The union works because the compiler automatically swaps the bytes around to match the correct endian-ness for the long or float.
  6. Hello - I am trying your excellent compiler before buying a license for my business. I have installed the toolchain in MPLAB-X V4.00 but the pre-processor macros do not work. Please see the attached file for an example of my configuration. I have defined 2 Preprocessor macros "_ICD3_DEBUG" and "_SJL_BUILD" , but they do not get passed to the compiler - CLEAN SUCCESSFUL (total time: 266ms) make -f nbproject/Makefile-ICD3_Debug.mk SUBPROJECTS= .build-conf make[1]: Entering directory 'E:/Projects/InCarKeepAlive' make -f nbproject/Makefile-ICD3_Debug.mk dist/ICD3_Debug/production/InCarKeepAlive.production.hex make[2]: Entering directory 'E:/Projects/InCarKeepAlive' gnumkdir -p build/ICD3_Debug/production gnumkdir -p build/ICD3_Debug/production gnumkdir -p build/ICD3_Debug/production "C:\Program Files (x86)\SourceBoost\xlaunch.exe" -t PIC12F635 -obj "build/ICD3_Debug/production" -o "build/ICD3_Debug/production/main.o" main.c -v "C:\Program Files (x86)\SourceBoost\xlaunch.exe" -t PIC12F635 -obj "build/ICD3_Debug/production" -o "build/ICD3_Debug/production/config.o" config.c -v "C:\Program Files (x86)\SourceBoost\xlaunch.exe" -t PIC12F635 -obj "build/ICD3_Debug/production" -o "build/ICD3_Debug/production/init.o" init.c -v BoostC Optimizing C Compiler Version 7.41 (for PIC16 architecture) http://www.sourceboost.com Copyright(C) 2004-2017 Pavel Baranov Copyright(C) 2004-2017 David Hobday Single user Lite License (Unregistered) for 0 node(s) Limitations: PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only main.c Starting preprocessor: "C:\Program Files (x86)\SourceBoost\pp.exe" main.c -i "C:\Program Files (x86)\SourceBoost\include" -d _PIC12F635 -la -c2 -o build/ICD3_Debug/production\main.pp -v -d _BOOSTC -d _PIC16 -d _CHAR_INDEX BoostC Optimizing C Compiler Version 7.41 (for PIC16 architecture) http://www.sourceboost.com Copyright(C) 2004-2017 Pavel Baranov Copyright(C) 2004-2017 David Hobday Single user Lite License (Unregistered) for 0 node(s) Limitations: PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only init.c Starting preprocessor: "C:\Program Files (x86)\SourceBoost\pp.exe" init.c -i "C:\Program Files (x86)\SourceBoost\include" -d _PIC12F635 -la -c2 -o build/ICD3_Debug/production\init.pp -v -d _BOOSTC -d _PIC16 -d _CHAR_INDEX BoostC Optimizing C Compiler Version 7.41 (for PIC16 architecture) http://www.sourceboost.com Copyright(C) 2004-2017 Pavel Baranov Copyright(C) 2004-2017 David Hobday Single user Lite License (Unregistered) for 0 node(s) Limitations: PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only C:\Program Files (x86)\SourceBoost\include\system.h(40): WARNING: Try our new Chameleon C compiler. It's fast, free and 95% backward compatible with BoostC. headers.h(14): WARNING: Release build headers.h(18): WARNING: BoostC compiler in use config.c Starting preprocessor: "C:\Program Files (x86)\SourceBoost\pp.exe" config.c -i "C:\Program Files (x86)\SourceBoost\include" -d _PIC12F635 -la -c2 -o build/ICD3_Debug/production\config.pp -v -d _BOOSTC -d _PIC16 -d _CHAR_INDEX C:\Program Files (x86)\SourceBoost\include\system.h(40): WARNING: Try our new Chameleon C compiler. It's fast, free and 95% backward compatible with BoostC. headers.h(14): WARNING: Release build headers.h(18): WARNING: BoostC compiler in use C:\Program Files (x86)\SourceBoost\include\system.h(40): WARNING: Try our new Chameleon C compiler. It's fast, free and 95% backward compatible with BoostC. headers.h(14): WARNING: Release build headers.h(18): WARNING: BoostC compiler in use init.c success config.c success Compile time: 0:01 success Compile time: 0:01 success main.c success Compile time: 0:01 success gnumkdir -p dist/ICD3_Debug/production "C:\Program Files (x86)\SourceBoost\boostlink_picmicro.exe" -t PIC12F635 -ld "C:\Program Files (x86)\SourceBoost"\lib -p dist/ICD3_Debug/production/InCarKeepAlive.production.hex build/ICD3_Debug/production/main.o build/ICD3_Debug/production/config.o build/ICD3_Debug/production/init.o BoostLink Optimizing Linker Version 7.41 http://www.sourceboost.com Copyright(C) 2004-2017 Pavel Baranov Copyright(C) 2004-2017 David Hobday Building CASM file Memory Usage Report =================== RAM available:64 bytes, used:12 bytes (18.8%), free:52 bytes (81.2%), Heap size:52 bytes, Heap max single alloc:51 bytes ROM available:1024 words, used:247 words (24.2%), free:777 words (75.8%) success make[2]: Leaving directory 'E:/Projects/InCarKeepAlive' make[1]: Leaving directory 'E:/Projects/InCarKeepAlive' BUILD SUCCESSFUL (total time: 7s) Loading code from E:/Projects/InCarKeepAlive/dist/ICD3_Debug/production/InCarKeepAlive.production.hex... Loading completed Please can you advise how to make this work? Many thanks
×