Author Topic: PIC32 evolution  (Read 29479 times)

0 Members and 1 Guest are viewing this topic.

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: PIC32 evolution
« Reply #25 on: August 17, 2016, 02:48:36 pm »
So why do you even need the microchip compiler?  Isn't there a vanilla gcc that supports MIPS that should work fine when combined with the includes and linker maps and such from the microchip free version?

I thought that also, and that was my plan.  But I couldn't find even a downloadable GCC for MIPS.  So, I built GCC for MIPS from GCC sources; not a trivial task I may say.  But when I added the linker script and include files from XC32 and built my test application, it did nothing after flashing it to the PIC32 (a PIC32MX170F256 by the way).  No big deal, I thought, probably there was a problem with either the linker script or the include file.  Have you seen any of them?  They are not the average linker script or include file you'll find with other processors like the STM32 or LPC8xx, or even AVRs.  They are long and complex files where obfuscation looks like one of the goals!  Anyhow, after trying for many hours, I decided to give XC32 a try and got my test application worked right away.  So where is the problem with GCC for MIPS?  I don't know.  I may try GCC for MIPS again in the future when I have more time available...
Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 
The following users thanked this post: evb149

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: PIC32 evolution
« Reply #26 on: August 17, 2016, 02:57:34 pm »
'Lots of people, which whom I agree, had questioned the morality of such charges. '

What's morally questionable to charge for ones labor? I hope none of the people above are working for free.

Philosophically, I think it is morally questionable for people to project their morality onto others.

So, Microchip business is to sell compilers?  What is questionable to me is to charge for other people labor, which is what Microchip is doing.
Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 
The following users thanked this post: evb149

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: PIC32 evolution
« Reply #27 on: August 17, 2016, 02:57:50 pm »
'Why would I want to spend money and time on PIC32 model XYZ today because there is some gem of a feature that ARM C-M doesn't give me?'

To me, the answer is none, other than learning. I tend tobthink the pic32 is on borrowed time, and investing in it is a mistake.

Not a mistake if you ever end up working with them commercially. Microchip's stock control and silicon availability is a huge advantage over just about everyone else and is often enough to sway clients who need long term availability and bonded stock.
And their programming service.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: evb149

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: PIC32 evolution
« Reply #28 on: August 17, 2016, 03:00:46 pm »
Strongly biasing your decision to use ARM rather than MIPS because ARM has a significantly larger number of vendors doesn't hold a lot of water.
I was mainly referring to the various vendor-proprietary cores you run into now and again.

Quote
If you think there's much portability between ARMs from different vendors you're in for a rude awakening, the way vendors differentiate themselves is by what value they add on to the part, and that should usually be the primary decision maker, far more so than whether it's MIPS or ARM.
Everything except the peripherals is transferable knowledge. That includes the architecture, the core peripherals, the compiler, the debugger... That is not insignificant.
 
The following users thanked this post: evb149

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: PIC32 evolution
« Reply #29 on: August 17, 2016, 03:12:45 pm »
But I couldn't find even a downloadable GCC for MIPS.
If you need a precompiled toolchain, there's eg. ImgTec's own or Sourcery CodeBench. Building GCC from source isn't that difficult, it just takes time (and disk space).
EDIT: Also the chipKIT compiler, which is basically a recompiled version of XC32.

Quote
They are long and complex files where obfuscation looks like one of the goals!
The MIPS architecture adds a lot of complexity (eg. the KSEG0/1/USEG mappings, the external interrupt controller).

Quote
What is questionable to me is to charge for other people labor, which is what Microchip is doing.
Then you are in direct opposition with the Free Software Foundation.
« Last Edit: August 17, 2016, 03:23:57 pm by andersm »
 
The following users thanked this post: evb149

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PIC32 evolution
« Reply #30 on: August 17, 2016, 03:32:24 pm »
'Microchip business is to sell compilers?  '

They are in the business of making money for their shareholders.

If giving free compilers out does it, great. If charging for their compilers, great too. Thats their business and none of my business, unless I'm a microchip shareholder, to dictate.


'What is questionable to me is to charge for other people labor, which is what Microchip is doing.'

Why would that matter to you? Especially if the people whose work goes into the microchip compiler hasn't raised any objection?

For example, the trees I planted in my backyard makes the environment better, which you enjoy freely. Does that give someone the right objecting to your enjoyment of life?

We are all bystanders in this whole thing and we have no standing in projecting our moral values onto others.

If anything, it is unethical for us to do so.
================================
https://dannyelectronics.wordpress.com/
 
The following users thanked this post: evb149

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: PIC32 evolution
« Reply #31 on: August 17, 2016, 03:36:18 pm »
Strongly biasing your decision to use ARM rather than MIPS because ARM has a significantly larger number of vendors doesn't hold a lot of water.
I was mainly referring to the various vendor-proprietary cores you run into now and again.

Quote
If you think there's much portability between ARMs from different vendors you're in for a rude awakening, the way vendors differentiate themselves is by what value they add on to the part, and that should usually be the primary decision maker, far more so than whether it's MIPS or ARM.
Everything except the peripherals is transferable knowledge. That includes the architecture, the core peripherals, the compiler, the debugger... That is not insignificant.

I agree, it's not insignificant, but it's really pretty minor compared to whether a part is fit for purpose.

We mustn't forget that there are also quite key differences within ARM implementations even within the same vendors, such as cache, varying wait states for different memory, differing memory segmentations, differing and sometimes absurdly complex clock schemes, all of which I'd say you'll encounter before you care about whether it's ARM or MIPS. Even saying "ARM" is a very general term, when we are to consider M0/M3/M4/M7 as well as the Cortex A and Cortex R ARMs.

As an example, say I wanted an on-chip high speed (>10MSa/s) ADC the obvious first port of call might be NXP's LPC4370 ARM Cortex M4F. However, say I want multi channel simultaneous sampling, pretty much the only option is the PIC32MZ EF.

One other facet also sometimes overlooked in device choice is leveraging the existing skill set of your development personnel, and whether there is a reasonable pool of skilled individuals out there to deal with normal churn rate. The cost of re-skilling and purchasing new tools is commonly not to be sniffed at. That is also a key reason why I find some vendors' recent examples of pushing proprietary frameworks so baffling, they are placing a extra unnecessary barrier in the way of selling their devices.

So that's why, in my view, the choice of core should be a relatively minor consideration among many others when choosing a device.
 
The following users thanked this post: evb149

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: PIC32 evolution
« Reply #32 on: August 17, 2016, 03:47:31 pm »
Quote
What is questionable to me is to charge for other people labor, which is what Microchip is doing.
Then you are in direct opposition with the Free Software Foundation.
[/quote]

Fare enough.  If I paid for the 'pro' XC32 version, will I get both the source and the scripts to build it?
Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 
The following users thanked this post: evb149

Online Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1671
  • Country: us
Re: PIC32 evolution
« Reply #33 on: August 17, 2016, 03:50:01 pm »
- Hardware: PICKIT3. Not free, but quite affordable considering it can program almost every PIC out there. I think it's reasonable to get started with this, but take note that any programmer/debugger on ARM evaluation boards (like Silabs with JLINK onboard, ST discovery with STLink, etc. etc) will beat the crap out of a PICKIT3. PICKIT3 takes like 5-10 seconds to start a debug session, code stepping is slow, sometimes downright buggy (EEVblog did a rant about it half a year ago or something), etc. This for me is personally becoming more and more of a dealbreaker though, considering that I only use 16-bit and 32-bit PICs; both of which are increasingly less interesting considering so many ARM chips these days.

The ICD3 is a big improvement over the PICKit3. It downloads code much faster and stepping code is reasonably fast (although not nearly as fast as a Segger J-Link used with an ARM MCU). The downside is that the ICD3 costs $200. Compare that to NXP's LPC-LINK2, which costs $20 and is J-Link compatible and just as fast. The ST ST-LINK/V2 is also around $20 and almost as fast as a J-Link.
Complexity is the number-one enemy of high-quality code.
 
The following users thanked this post: evb149

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PIC32 evolution
« Reply #34 on: August 17, 2016, 04:03:01 pm »
'If I paid for the 'pro' XC32 version, will I get both the source and the scripts to build it?'

The source is freely downloadable, even if you don't pay.

I think the confusion comes from people's inability to understand the meaning of 'free' as in 'free software'.
« Last Edit: August 17, 2016, 04:04:33 pm by dannyf »
================================
https://dannyelectronics.wordpress.com/
 
The following users thanked this post: evb149

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 415
Re: PIC32 evolution
« Reply #35 on: August 17, 2016, 04:03:33 pm »
Newer versions of J-Link work with PIC32s too.  Mine does :), fully integrated with MPLABX, now debugging is fast enough to be usable :)
 
The following users thanked this post: evb149

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PIC32 evolution
« Reply #36 on: August 17, 2016, 04:06:58 pm »
Older programmers like oickit2 can be used to program pic32.
================================
https://dannyelectronics.wordpress.com/
 
The following users thanked this post: evb149

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: PIC32 evolution
« Reply #37 on: August 17, 2016, 04:28:15 pm »
'If I paid for the 'pro' XC32 version, will I get both the source and the scripts to build it?'

The source is freely downloadable, even if you don't pay.

I think the confusion comes from people's inability to understand the meaning of 'free' as in 'free software'.

Yes, the source code for XC32  is downloadable.  Have you tried to compile it?  Here, some help:

http://jubatian.com/articles/turning-on-optimizations-in-microchips-xc32/

There is where the problem lays.

Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 
The following users thanked this post: evb149

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: PIC32 evolution
« Reply #38 on: August 17, 2016, 04:33:44 pm »
If I paid for the 'pro' XC32 version, will I get both the source and the scripts to build it?
Anyone can download the source code, but if you really want to build from source then the chipKIT repositories have scripts for fully automating the process.
 
The following users thanked this post: evb149

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PIC32 evolution
« Reply #39 on: August 17, 2016, 04:59:24 pm »
'There is where the problem lays.'

So your objection to the microchip compiler is that it isn't free.

Then the objection becomes they charge for something built on free software.

Then the objection becomes it is downloadable only with the pro version.

Then the objection becomes that you cannot built it with optimization.

Two question:

1 what's your real objection? Pick one, anyone.
2. Why is it microchips fault that you cannot build their compiler?

Can I blame you for the 100f humid day I'm having now?
================================
https://dannyelectronics.wordpress.com/
 
The following users thanked this post: evb149

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: PIC32 evolution
« Reply #40 on: August 17, 2016, 05:13:11 pm »
If I paid for the 'pro' XC32 version, will I get both the source and the scripts to build it?
Anyone can download the source code, but if you really want to build from source then the chipKIT repositories have scripts for fully automating the process.

Link?
Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 
The following users thanked this post: evb149

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: PIC32 evolution
« Reply #41 on: August 17, 2016, 05:23:38 pm »
'There is where the problem lays.'

So your objection to the microchip compiler is that it isn't free.

Then the objection becomes they charge for something built on free software.

Then the objection becomes it is downloadable only with the pro version.

Then the objection becomes that you cannot built it with optimization.

Two question:

1 what's your real objection? Pick one, anyone.
2. Why is it microchips fault that you cannot build their compiler?

Can I blame you for the 100f humid day I'm having now?

Ok, I am wrong and your are right.  You win.  Now you go and paid 1500$ or whatever they charge to get the -mips16 option enabled with XC32.  An option that is part of GCC for MIPS for free, and programmed by someone else.  By the way I already built XC32 from source some time ago.


Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 
The following users thanked this post: evb149

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PIC32 evolution
« Reply #42 on: August 17, 2016, 05:34:38 pm »
'By the way I already built XC32 from source some time ago'

And why do you ask for the link to download the source and complain about being unable to build it?

I think you can publish your build so the whole community, even microchip, can benefit front it.

Doesn't GPL compell you to publish it?
================================
https://dannyelectronics.wordpress.com/
 
The following users thanked this post: evb149

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: PIC32 evolution
« Reply #43 on: August 17, 2016, 06:40:36 pm »
'By the way I already built XC32 from source some time ago'

And why do you ask for the link to download the source and complain about being unable to build it?

I think you can publish your build so the whole community, even microchip, can benefit front it.

Doesn't GPL compell you to publish it?

If I distribute the compiler, which I am not, then I am compelled to publish it.  The issue is that as soon as someone figures out how to build XC32, Microchip changes something and releases a new version for which the build is not compatible with the previous one.  The building scripts/instructions I have found are for XC32 version V1.40.  That is why I was asking for the link.  Are there any building scripts for XC32 version 1.42 available anywhere?  The script I used is from https://github.com/cepr/xc32.
Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 

Online Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1671
  • Country: us
Re: PIC32 evolution
« Reply #44 on: August 17, 2016, 08:24:55 pm »
I wonder why (presuming that it is not the case) Microchip have not come out with dev boards with J-LINK embedded programmers like many of the ARM vendors now have or something newer for PIC32 like the ST-LINKv2 / LPC-LINK2 sorts of options from other vendors.

They already do. Take a look at the PIC32 Starter Kit. No external debugger needed--just connect it to a PC using a USB cable and you're good to go. Surprisingly, single stepping code over this USB connection is a lot faster than using an ICD3 with other boards.
Complexity is the number-one enemy of high-quality code.
 
The following users thanked this post: evb149

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PIC32 evolution
« Reply #45 on: August 17, 2016, 09:29:09 pm »
' The issue is that as soon as someone figures out how to build XC32, Microchip changes something and releases a new version for which the build is not compatible with the previous one'

So microchip is bad because they failed to make your life peachy?

By that notion, my neighbor is bad because he didn't give his house to me for a song.

My bank is bad because they didn't pay me am interest of 1048 percent.

You are bad because you didn't send me all of your earning and then some.

:)

Have you ever thought about the possibility that microchip never existed just to make your life easier?

Having a more realistic view of who you are is in order, I am afraid.
================================
https://dannyelectronics.wordpress.com/
 

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: PIC32 evolution
« Reply #46 on: August 18, 2016, 12:28:23 am »
' The issue is that as soon as someone figures out how to build XC32, Microchip changes something and releases a new version for which the build is not compatible with the previous one'

So microchip is bad because they failed to make your life peachy?

By that notion, my neighbor is bad because he didn't give his house to me for a song.

My bank is bad because they didn't pay me am interest of 1048 percent.

You are bad because you didn't send me all of your earning and then some.

:)

Have you ever thought about the possibility that microchip never existed just to make your life easier?

Having a more realistic view of who you are is in order, I am afraid.

By any chance are you 14 years old?  You don't behave/write like an adult.
Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 
The following users thanked this post: Alex Eisenhut, newbrain

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: PIC32 evolution
« Reply #47 on: August 18, 2016, 04:48:44 am »
Take a look at the PIC32 Starter Kit. No external debugger needed--just connect it to a PC using a USB cable and you're good to go. Surprisingly, single stepping code over this USB connection is a lot faster than using an ICD3 with other boards.
The older starter kits had a different debugger, the newer ones (PIC32 Start Kit III onwards, IIRC) have an on-board PICKit 3.
 
The following users thanked this post: evb149

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
 
The following users thanked this post: jesuscf, evb149

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf