Author Topic: MPLAB X a PIC inhibitor! Alternatives ?  (Read 28619 times)

0 Members and 1 Guest are viewing this topic.

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 403
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #300 on: June 21, 2018, 04:55:35 am »
Quote
It is odd that the byte offsets of interest are exactly the same on all 3 files as v2.05- not sure how that happens with different code. I guess when the source becomes available I can check it out, although not terribly important.
Actually the source is available (via simple deduction), they just don't show it on the the web page (yet). XC32 v2.10 looks like it basically just removed all C++ license references and now just uses PRO (2). So the 6 (Full C++) becomes a 2 (PRO). Which is why I was failing. I should have noticed when I was viewing the objdump, as I saw that 2 being used (for the mafrlcsj test) but glanced over it as I thought 2 was referring to some form of the free version. I guess they now think c++ is mainstream and no longer special :)

Anyway, just use the simple way as my previous post suggests. The binary mod should be faster as it skips checking with xclm, but its hardly worth the trouble for most people (maybe for projects with many many files to compile, but it still probably only adds time measured in ms).
 

Offline peterson

  • Newbie
  • Posts: 1
  • Country: jp
    • skysmotor
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #301 on: June 21, 2018, 08:10:23 pm »
While I too applaud Microchip for maintaining a substantial selection of DIP parts, nowadays you are seriously restricting your options.

I’m not sure of the rationale regarding having to be through hole? If it’s for a kit for end user assembly I guess I can understand. If it’s for solderless breadboarding, you can use breakout boards which would dramatically increase the options available to you.
Japan stepper motor site:skysmotor.com
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 1335
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #302 on: June 22, 2018, 01:40:28 am »
Here's the download link to the source of the new compiler:

http://ww1.microchip.com/downloads/en/DeviceDoc/xc32-v2.10-src.zip

I can confirm that the "old" method still works when you change the return value from 6 to 2 as described here:

https://www.eevblog.com/forum/microcontrollers/pic32-evolution/msg1621915/#msg1621915

Here's the content of an header file: XC32 source v2.10/xc32-v2.10-src/pic32c-gcc-binutils/pic32c-source/XC32-arm-gcc/gcc/gcc/config/mchp-cci/xclm_public.h

Code: [Select]
/* General XCLM return values */
 #define MCHP_XCLM_NORMAL_EXIT            0x0

/* Original options used for C translation units */
 #define MCHP_XCLM_FREE_LICENSE           0x0
 #define MCHP_XCLM_VALID_STANDARD_LICENSE 0x1
 #define MCHP_XCLM_VALID_PRO_LICENSE      0x2

 #define MCHP_XCLM_DONOTUSE               0x3

/* New options used for C++ translation units */
 #define MCHP_XCLM_NO_CPP_LICENSE         0x4
 #define MCHP_XCLM_VALID_CPP_FREE         0x5
 #define MCHP_XCLM_VALID_CPP_FULL         0x6

/* diagnose problems */
 #define MCHP_XCLM_OPTION_ERROR 0x10 /* something bad in supplied options - refer to stderr for details */
 #define MCHP_XCLM_INTERNAL_ERROR 0x11 /* internal error - memory, filesystem, network, ? */
 #define MCHP_XCLM_LICENSE_ERROR 0x12 /* no license available, or license expired */


/* -liccheck */
 #define MCHP_XCLM_NO_VALID_LICENSE 0x1
 #define MCHP_XCLM_SUBSCRIP_RENEWED 0x2
 #define MCHP_XCLM_LICENSE_EXPIRED 0x3
 #define MCHP_XCLM_LICENSE_RENEWED 0x4
 #define MCHP_XCLM_DONGLE_LICENSE 0x5
The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 4567
  • Country: gb
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #303 on: July 23, 2018, 04:46:21 am »
cv007: xc32 v2.10, looks like there may be a couple of errors in the cc1/cc1plus Windows offsets in https://raw.githubusercontent.com/cv007/XC3216/master/xc32xc16-info-rev5.txt

May I suggest:

xc32 version 2.10 | - notice now uses 2 instead of 6
----------------------------------------------------------------------Windows--
 Dir: C:\Program Files\Microchip\xc32\v2.10\bin\bin\gcc\pic32mx\4.8.3\
File: cc1plus   Offset: 0x774510  Change: FFFFFFFFFFFFFFFF to 0200000000000000
File: cc1       Offset: 0x6c3410  Change: FFFFFFFFFFFFFFFF to 0200000000000000

Furthermore, for XC16 v1.35, things seemed to have changed in this regard. I've found where the relevant code appears to be (Windows at offset 0x16220C). The jump is now a short jump, and of the opposite sense. I switched it around (0x74 -> 0x75) but it doesn't open the optimisations up.

 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 4567
  • Country: gb
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #304 on: July 23, 2018, 04:50:03 am »
While I too applaud Microchip for maintaining a substantial selection of DIP parts, nowadays you are seriously restricting your options.

I’m not sure of the rationale regarding having to be through hole? If it’s for a kit for end user assembly I guess I can understand. If it’s for solderless breadboarding, you can use breakout boards which would dramatically increase the options available to you.

Many of us do exactly that, pretty much on almost a daily basis in my case!
 

Online NorthGuy

  • Super Contributor
  • ***
  • Posts: 1548
  • Country: ca
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #305 on: July 23, 2018, 05:03:36 am »
While I too applaud Microchip for maintaining a substantial selection of DIP parts, nowadays you are seriously restricting your options.

I’m not sure of the rationale regarding having to be through hole? If it’s for a kit for end user assembly I guess I can understand. If it’s for solderless breadboarding, you can use breakout boards which would dramatically increase the options available to you.

Many of us do exactly that, pretty much on almost a daily basis in my case!

I like DIP parts. Very easy to connect, very easy to probe. I don't need any more soldering in my life.

And when you need it, you can get the exact same part in QFN. Perfect.
 

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 403
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #306 on: July 23, 2018, 11:05:07 am »
Quote
May I suggest:
I corrected the Windows numbers for xc32 2.10, added xc16 1.35 info.

Quote
for XC16 v1.35, things seemed to have changed in this regard
Same as before, v1.35 offset is 0x161FEB. Tested.

I would suggest using-
https://github.com/cv007/XC3216/blob/master/xc32xc16-info-rev6.txt
one simple file, when a new version rolls out, simply copy the file to the new version folder. Works for xc16 and xc32, every os.

I may take down the old method, as they seem to update the compilers more often and I really don't want to update the info for every new version when a simple method works just fine. I'm not sure more than a handful of people even use the info anyway.
 
The following users thanked this post: rachaelp

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 4567
  • Country: gb
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #307 on: July 23, 2018, 06:08:11 pm »

I may take down the old method, as they seem to update the compilers more often and I really don't want to update the info for every new version when a simple method works just fine. I'm not sure more than a handful of people even use the info anyway.

I may well have misunderstood, but with the new method, switching between optimised and not optimised requires you to add or remove spec files. I quite often switch between optimised and non optimised particularly while debugging, and it's not uncommon to switch off optimisation at an individual source file level. How well does the new method work with this?
 

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 403
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #308 on: July 23, 2018, 11:19:02 pm »
Quote
switching between optimised and not optimised requires you to add or remove spec files
Read the file I posted. Its too simple, I guess. Just create a file, put it in a folder, done. You have no restrictions. Change optimizations as wanted.
 
The following users thanked this post: Howardlong

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 4567
  • Country: gb
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #309 on: July 24, 2018, 05:33:33 am »
Quote
switching between optimised and not optimised requires you to add or remove spec files
Read the file I posted. Its too simple, I guess. Just create a file, put it in a folder, done. You have no restrictions. Change optimizations as wanted.

OK, I had misunderstood, the way I thought it worked was as a global "always on". It does indeed seem to just work with that file.

Regarding the XC16 location, I'm not sure how I managed to get fixated on the wrong part a few bytes down, anyway, no need for it now!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf