
- #Mplab xc8 optimization how to
- #Mplab xc8 optimization pro
- #Mplab xc8 optimization software
- #Mplab xc8 optimization code
there is no point as you are then not gaining anything. Unless you have a lot of free time, you are not going to roll your own xc16/32 version of gcc easily unless you stick to the sources they have provided. In the case of xc8-avr, I just changed a bit in the gpl binaries so optimization nullification is 'undone' as if we have something greater than a free license. It will just tell the compiler executable (which calls it) that we have a free license.
#Mplab xc8 optimization software
No one is touching that piece of software and it is free to do what it wants, and it doesn't matter. Yes, they check if their xclm program is the 'real' one, but who cares. Anyone want to buy some binaries from me?
#Mplab xc8 optimization code
Get the source code, change one line in the source code (for those that will request the source code), modify a few bytes in 3 binaries (no need to compile), sell the 3 binaries for $x, offer to provide the source for a $100 fee. I guess we all can get into the compiler business. I can imagine the next step will be to require anyone wanting the source to send in their $100 to request a copy.


The only positive is they currently provide the source code to xc16/32 from their web site. The arm compiler they have in xc32 also restricts optimizations, so they are going all in with this idea. data section (3 binaries) and you are good to go. Although they don't have an easy 'backdoor' option like xc16/32 (that I know of- no source released), the binaries can be changed easily enough even without the source as they use the same method as xc16/32 to check the license. I guess they figure if they can get a grand from the xc16/32 'pro' users, why not the 'pro' avr (and sam) users also. the GCC license check can be bypassed easily as we saw in the past threads, if you want to compile GCC the source code is there in the download archives as it has always been (altough the AVR part of XC8 is not there yet.) but -O1 is usually good enough (we ran some tests on generated code here in this forum some months ago, little difference for higher optimizations, the listing file was more and more confusing to read as the optimizer put pieces of code together and rearranged instructions in order to gain some more speed or space)
#Mplab xc8 optimization how to
you just have to know how to write good code for your platform, the architecture is what it is so you can't optimize it that much.
#Mplab xc8 optimization pro
From time to time i run comparisons between free and pro code and the difference in code size is minimal, like speeding up the startup routine or using more the indirect registers. (if you want you can still get the ancient chips in mask rom or OTP memory, new stock) In the end the code generated by XC8 is FINE for a free compiler. If you have spend 1k$ on a compiler and only ever sell a few thousand 1$ parts, then that's probably more earned by the compiler than the actual silicon.ĭon't forget that they keep increasing the price of older chips in order to - move people to newer and better chips - squeeze more money from people who can't or don't want to use pin-to-pin compatible. There could be too little margin in todays chips, that they want to make money twice of their customers by also selling them a "premium" compiler. The existance of MicrochipDirect and low-quantity production programming support would suggest that. Maybe (also guessing/speculating here) Microchip is having lots of relatively small customers in the thousand quantity region.

Nonetheless, I'm still amazed why they want to hard-split their own customer base like that. After all, MPLAB integrates the compiler package, debugger and device support dialogs all together to make a fully functional toolchain. These terms may apply to the GCC binary from XC compiler, but what about MPLAB X? I haven't checked, but it may have a constraint saying you can't use 3rd party or modified compilers with their software.
