[Tutorial] How to set configuration bits in code

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
aCkO
Posts: 1119
Joined: 14 Feb 2011 04:07
Location: Bar, Montenegro

[Tutorial] How to set configuration bits in code

#1 Post by aCkO » 26 Oct 2015 02:08

Two years ago I came up with a relatively simple solution for setting configuration bits in code. Original topic and implementation details can be found here. This weekend I decided to finish this mini-project. I have added full preprocessor support and option to set MCU clock in code. I also made a simple setup file that automates the process of installation. MCU definition files (MLK) are patched by the installer to insert named configuration settings (borrowed from XC8 definition files :)).

Project settings (Project -> Edit project...) are overwritten with the ones defined in code. That way, after compiling the project, you can check if the settings have been applied. This approach should satisfy both beginners and advanced users.

Your feedback and suggestions are appreciated. Screenshots and installer are below.
ccb_tool.png
ccb_tool.png (84.39 KiB) Viewed 3008 times
mlk_cfg_editor.png
mlk_cfg_editor.png (96.1 KiB) Viewed 3008 times
Regards
Attachments
CCB_Tool_Installer.7z
(1.17 MiB) Downloaded 169 times

gadelhas
Posts: 77
Joined: 09 Apr 2010 01:09

Re: [Tutorial] How to set configuration bits in code

#2 Post by gadelhas » 26 Oct 2015 15:08

Thank you!
Thanks and Regards
Gadelhas

Toley
Posts: 922
Joined: 03 Sep 2008 16:17

Re: [Tutorial] How to set configuration bits in code

#3 Post by Toley » 26 Oct 2015 20:11

Another thumbs up to aCkO. BTW do you plan to publish it on Libstock?
Serge T.
Learning is an endeless process but it must start somewhere!

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: [Tutorial] How to set configuration bits in code

#4 Post by janni » 27 Oct 2015 12:54

aCko wrote:This weekend I decided to finish this mini-project.
I'm afraid to imagine what you could do to the IDE if mE suddenly decided to let you play with the source code for a whole week :lol: :mrgreen:

fred85
Posts: 187
Joined: 27 Dec 2010 14:50
Location: Canada

Re: [Tutorial] How to set configuration bits in code

#5 Post by fred85 » 27 Oct 2015 13:31

At least someone is doing something with the PIC IDE, unfortunately it’s someone who doesn’t even get paid for their effort.

Other than small updates that seem to introduce more bugs then they solve not too much has been done in the last several years. Why is there for example no CLC tool or PPS tool like in MPLABX?

Thank you ACKO for the patch for the enhanced family.

aCkO
Posts: 1119
Joined: 14 Feb 2011 04:07
Location: Bar, Montenegro

Re: [Tutorial] How to set configuration bits in code

#6 Post by aCkO » 29 Oct 2015 21:50

Toley wrote:BTW do you plan to publish it on Libstock?
Just uploaded: http://www.libstock.com/projects/view/1573/ccb-tool
janni wrote:I'm afraid to imagine what you could do to the IDE if mE suddenly decided to let you play with the source code for a whole week :lol: :mrgreen:
:lol:
Actually, I was planning on making my own Scintilla based IDE, but that was put on hold. I've worked out all the bits and details, but unfortunately at this moment I don't have the time for such project. Maybe soon... :wink: :lol:

Regards

paulfjujo
Posts: 1544
Joined: 24 Jun 2007 19:27
Location: 01800 St Maurice de Gourdans France
Contact:

Re: [Tutorial] How to set configuration bits in code

#7 Post by paulfjujo » 04 Nov 2015 14:19

hello aCkO,


i didn't test yet your CB-tool
but did you expect to extend it to satisfied this request

concerne init of PIC EEprom inside the source code
instead through an external editor + file *.ihex
like we can do with MPLAB C18.

Thank's for your big support on this forum.

up

Post Reply

Return to “mikroC PRO for PIC General”