Figured Out MPLAB X


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Figured Out MPLAB X

    Agreed. I probably won't spend a $grand for high performance XC8. My reason for wanting to learn the basics of C are several-fold. First, there is a massive wealth of information available to do various things... in C. If I can understand it better, I can port it to PBP. Second, I would like to at least dabble with some of the higher level 16-, 24-, and 32-bit PIC MCUs. Who knows, I may fall in love. Next, my wife & I are Mac users. I started learning Visual Basic (part of the Visual Studio 2015 bundle) to create apps for the PC. As Mac users, my wife is starting to learn X Code for creating Mac apps. It is a variation of C called Objective C. Furthermore, this isn't just a hobby for me, I create electronic gizmos for a living. Having never gone to school for any of it (analog or digital electronics), I have a massive library that I refer to often. I subscribe to about 1/2 dozen electronics magazines, plus receive daily/weekly emails with electronics news & new products. I learned by doing, trial & error. I learned how to learn from books. Working on my New Year's Resolutions, I simply decided it's time for me to learn more of the nuts & bolts of the tools I use every day, acquire some new skills, and refine some comfortable ones.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    Did you find this post helpful? Yes | No

    Default Re: Figured Out MPLAB X

    in C. If I can understand it better, I can port it to PBP
    i have been doing the same thing but pbp is going nowhere .i think its time to go the other way i.e
    converting to C from pbp ,If I can understand it pbp then its easy in C. i have been hanging on so as
    to be able to support my older products but really!.
    conversion is not too onerous and once i get it going in C i can refine away using the obvious advantages
    available . its taken a while to come to terms with the microchip code configurator but if you are
    working with chips with pps then its well worth the effort.

    after ioannis got me interested in apa10c rgb leds i discovered i had 17 more of them and thought why not
    make a animated "star" to christen the top of the christmass tree.

    the idea seemed pretty straight forward a good simple project, but it soon got tedious trying to manipulate
    24bit vars in pbp. data transmission was slow and getting it to function in an isr was problematic
    so i gave up and went asm, which generated another set of issues when the code needs to port between
    pic16/18 devices.
    in C with its abundant variable types combined with structures and unions its just so simple no mental
    gymnastics required and once functional in C its just a simple task using the code configurator [MCC] to
    port it to other chips.
    interestingly a led dataframe [ 24bit start, 17 x 32bit data ,24bit stop ] sent in isr
    time asm pic18f26k22@64m 410uS, C pic18f26k22@64m 608uS, C pic16f18326@32m 667uS.
    turns out C is not too bad at banging out bytes from complex arrays ,even if its not optimised .isr's are way easier to implement.
    this really meant that asm was no longer even a consideration for this application.

    here's the pbp version and the first draft of the C conversion done with a 18f26k22 , although the finished
    project went on a 16f18326.
    Attached Images Attached Images  
    Attached Files Attached Files
    Warning I'm not a teacher

  3. #3
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Figured Out MPLAB X

    If you don’t want to pay $1000 for XC8, then just take XC16 or XC32.
    They are both GCC. GCC is open source, and it isn’t possible to steal open source software.

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Figured Out MPLAB X

    Step 1)
    Familiarise yourself with the concept and lisencing for GNU software:
    https://en.wikipedia.org/wiki/GNU_Ge...Public_License

    Step 2)
    Become rightfully pissed off with Microchip for selling something they made
    absolutely no contribution toward the creation of, and non-compiance with GNU
    for deliberately introducing difficulties compiling source after anyone has done so.
    The former, they have every right to do, although morally reprehensible, and not at
    all in the spirit of open source software. The later is a blatant GNU lisence breach.

    Step 3)
    Download the current version of XC16 for Apple Mac OS, or Windows directly from Microchip.
    The current XC16 is version 1.33. Install MPLAB-X and XC16 normally.

    Step 4)
    Locate in Windows:
    C:\Program Files\Microchip\xc16\v1.33\bin\bin\elf-cc1.exe

    Locate in Mac OS:
    /Applications/microchip/xc16/v1.33/bin/bin/elf-cc1

    Back up this orginal file somewhere.

    Step 5)
    Take what already belongs to you, which is specifically GCC (XC16/32).

    Open the original file from it’s original location with any hex editor program.

    For Windows:
    Find file offset: 0x161E7E, and change the original value 0x85 to 0x84.

    For Mac OS:
    Find file offset: 0x64CCC7, and change the original value 0x85 to 0x84.

    Save the file, and you now have the pro version with every level optimisation.
    Free as it was intended by it’s actual authors, who see none of the $1000 Microchip ask.

  5. #5
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    173


    Did you find this post helpful? Yes | No

    Default Re: Figured Out MPLAB X

    Hi Art,

    Are you saying that by following the five steps outlined in your last post, a person will end up with a full version of XC8 - with all the bells and whistles?

    Cheers
    Barry
    VK2XBP

  6. #6
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Figured Out MPLAB X

    That example was for XC16 specifically, but I can also help with XC32.
    These are both GCC (General Cross Compiler), and you already have the absolute right to use unrestricted, fully unlocked versions of them for free,
    so long as you agree to the GNU license terms and conditions.

    I can’t say the same of XC8, and can’t help with that either in public or private.
    That said, they are both C, and it wouldn’t be a huge jump to use XC16 with a 16 bit pic.
    Select the right device and you get zero overhead looping.

    Mods/Admin may feel uncomfortable about this kind of thing as it is, and if so, I guess it will be deleted,
    which is ok, but it won’t be because posting it was the wrong thing to do.

    I told Microchip exactly why I cancelled my paid XC16 subscription, and received no reply. Were I ever to hear anything from them I didn’t like,
    I’d run straight to the Free Software Foundation, who have the time, money, resource, and willingness to pound Microchip’s legal team into the mud.

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    Did you find this post helpful? Yes | No

    Default Re: Figured Out MPLAB X

    they might be on to you already , if you download ver 1.33 from the archive you now get ver 1.32b
    and the hack does not fit the latest. which is ver 1.34
    Warning I'm not a teacher

  8. #8
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Figured Out MPLAB X

    I’ll have to get that!

    Meanwhile, can you back up a version from 1.32b to 1.32?

    Windows:
    Same file location in Windows directory structure.

    Find file offset 0x1623AE, change 0x85 to 0x84.

    For them to have truly deliberately blocked a weakness, the new version would not have the 0x85 value in a close location (for the new version),
    and/or changing it to 0x84 would have no effect. There’s a completely different method though, they would have had to stop both.

    It’s probably best if certain words are never mentioned in this thread to it isn’t found,
    such as the word that describes what happens to an egg shell when you hit it.

Similar Threads

  1. Mplab x
    By l_gaminde in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th July 2013, 04:59
  2. Mplab 8.40
    By Andre_Pretorius in forum General
    Replies: 1
    Last Post: - 25th November 2009, 19:42
  3. Errors In MPLAB 8.02
    By HOTLNC in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 4th June 2008, 13:52
  4. using MPLAB 8.0 ?
    By iugmoh in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st May 2008, 21:07
  5. Mplab 7.22
    By Patrick in forum Documentation
    Replies: 3
    Last Post: - 1st June 2006, 06:32

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts