Jump to content
jartim

Preprocessor Macros Do Not Work In Mplab-X V4

Recommended Posts

jartim    0

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

 

 

post-13742-0-60046000-1502729241_thumb.png

Share this post


Link to post
Share on other sites
jartim    0

Found a workaround to this issue - manually define the macro in the "Additional options" field -

blob.png.d2d45f57f0e01df480c3c5cc58271c38.png

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.

Share this post


Link to post
Share on other sites
jartim    0

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.

Share this post


Link to post
Share on other sites
JorgeF    0

Hi

 

8 hours ago, jartim said:

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.

If my memory is not tricking me, that "item 2" refered a problem with the Sourceboost IDE and has nothing to do with MPLAB integration.

 

Just my 2 cents...

 

Best regards

Jorge

 

Edited by JorgeF

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×