Skip to content

cpu: Add PIC32MX Support#6092

Merged
jnohlgard merged 3 commits intoRIOT-OS:masterfrom
neiljay:pr/add_mips_pic32mx
Mar 30, 2017
Merged

cpu: Add PIC32MX Support#6092
jnohlgard merged 3 commits intoRIOT-OS:masterfrom
neiljay:pr/add_mips_pic32mx

Conversation

@neiljay
Copy link
Contributor

@neiljay neiljay commented Nov 9, 2016

This PR is dependant on #6060 and #6066.

Add support for PIC32 MX devices which use a MIPS M4K core.

This PR adds basic support for Microchip PIC32MX devices, including
bootstrapping the device, the build system produces a hex image loadable via
MPLAB-IPE. It has been tested on a MikroE Clicker board.

NOTE: This port requires the use of the GCC based MIPS Codescape SDK toolchain
available here:

https://community.imgtec.com/developers/mips/tools/codescape-mips-sdk/download-codescape-mips-sdk-essentials/

You cannot use Microchip's MPLAB / Harmony tools to build this port.

The port has been tested with the following examples:
hello-world
ipc_pingpong
timer_periodic_wakeup
riot_and_cpp

Note this is a re-work of #5885 with review comments addressed but now broken down into 3 separate PR's of which this is the third (and final).

@miri64 miri64 added Platform: MIPS Platform: This PR/issue effects MIPS-based platforms Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Nov 10, 2016
@miri64 miri64 added this to the Release 2017.01 milestone Nov 10, 2016
@OlegHahm OlegHahm added the State: waiting for other PR State: The PR requires another PR to be merged first label Nov 21, 2016
@OlegHahm
Copy link
Member

We have received the PICkit3, but I'm still struggling to flash the device from Linux. Not sure which tool I need to install and the flash target also doesn't seem to be defined.

@neiljay
Copy link
Contributor Author

neiljay commented Nov 21, 2016

You need MPLAB-IPE:

http://www.microchip.com/mplabx-ide-linux-installer

http://microchip.wikidot.com/ipe:installation

I have stopping using MPLAB though and I'm using this instead (written
by a college of mine):

https://github.com/sergev/pic32prog

The only issue with this, is you have to reflash the firmware on the
pickit-3 to scripting mode, which can only be done with a windows app
(it only has to be done once though):

http://ww1.microchip.com/downloads/en/DeviceDoc/PICkit3%20Programmer%20Application%20v3.10.zip

Neil

On 11/21/16 16:16, Oleg Hahm wrote:

We have received the PICkit3, but I'm still struggling to flash the
device from Linux. Not sure which tool I need to install and the |flash|
target also doesn't seem to be defined.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#6092 (comment), or
mute the thread
https://github.com/notifications/unsubscribe-auth/AUEU6hY9jCfv80hr8whZYguerWiC8ssqks5rAcPlgaJpZM4KtZ6Y.

@OlegHahm
Copy link
Member

Thanks for the super fast response. I'm currently following this guide: http://www.electropepper.org/blog/item/linux-terminal-only-pic-programming

If this doesn't work, I will try to see if I can find a Windows computer.

@neiljay
Copy link
Contributor Author

neiljay commented Nov 21, 2016

You could try pickle if you have a Ci40 as well:

https://docs.creatordev.io/clicker/guides/quick-start-guide/#programming-a-6lowpan-clicker

Some more help here:

https://docs.creatordev.io/wifire/guides/wifire-programming/

Neil

On 11/21/16 16:27, Oleg Hahm wrote:

Thanks for the super fast response. I'm currently following this guide:
http://www.electropepper.org/blog/item/linux-terminal-only-pic-programming

If this doesn't work, I will try to see if I can find a Windows computer.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#6092 (comment), or
mute the thread
https://github.com/notifications/unsubscribe-auth/AUEU6osguHxTepe__7rEI_eD34Yy_yKBks5rAcaDgaJpZM4KtZ6Y.

@OlegHahm
Copy link
Member

Couldn't get the Clicker to get programmed, but at least the Wifire. Maybe I connected the pins wrong.

@neiljay
Copy link
Contributor Author

neiljay commented Nov 21, 2016

My board has resistor links on the back to select between ICSP (pickit)
and mProg (some MikroE standard), J3,J4,J5. Send me a picture of your
board so I can check against mine.

On 11/21/16 17:39, Oleg Hahm wrote:

Couldn't get the Clicker to get programmed, but at least the Wifire.
Maybe I connected the pins wrong.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#6092 (comment), or
mute the thread
https://github.com/notifications/unsubscribe-auth/AUEU6vpX8T9gEzHye2QpnM0IQzTGLdRFks5rAddTgaJpZM4KtZ6Y.

@OlegHahm
Copy link
Member

OlegHahm commented Dec 8, 2016

Will try to come back to this next week.

@kYc0o
Copy link
Contributor

kYc0o commented Jan 18, 2017

Lately the weeks are getting looooooong...

@PeterKietzmann PeterKietzmann modified the milestones: Release 2017.01, Release 2017.04 Jan 26, 2017
@neiljay neiljay force-pushed the pr/add_mips_pic32mx branch 2 times, most recently from 2ea04a6 to 390ab20 Compare February 14, 2017 13:41
@neiljay
Copy link
Contributor Author

neiljay commented Feb 14, 2017

@kaspar030 @cgundogan

Hi there seems to be something odd going on with the CI system.
The pic32-wifire, pic32-clicker and mips-malta boards share common code, but the CI appears to trigger parallel builds of these boards in the same directory, from last run:

/opt/jenkins/workspace/RIOT_PR_PR-6092-SJA35D5NQ53ATHG7JEZVLUVZD4XF653KSXZJCQIBIKAGQUBXUZUA/jenkins_bin/

(used by mips-malta and pic32-clicker)

Which results in random build failures each time the CI is run.

@kaspar030 kaspar030 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 14, 2017
Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • minor nitpicks about the license header blocks
  • some possible code duplication

Looking forward to have "real" mips boards supported! ;)

@@ -0,0 +1,76 @@
/*
* Copyright 2016, Imagination Technologies Limited and/or its
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and in all other files: please use "Copyright (C) 2016 ...", for consistency.

* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a newline after each license block. (This file and some others)

@@ -0,0 +1,52 @@
/*
* Copyright 2016, Imagination Technologies Limited and/or its
* affiliated group companies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and other files: please add newline before license text.

@@ -0,0 +1,3 @@
MODULE = p32mz2048efg100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for MODULE if the name equals the folder name.

@@ -0,0 +1,69 @@
ifndef MIPS_ELF_ROOT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this file looks a lot like cpu/mips32r2_common/Makefile.include. Is it possible to share similarities?

@neiljay
Copy link
Contributor Author

neiljay commented Feb 14, 2017

@kaspar030 Should be easy to address these issues.

Can you remove the "waiting for other PR tag" now the common mips code is merged. Ta.

@kaspar030 kaspar030 removed the State: waiting for other PR State: The PR requires another PR to be merged first label Feb 14, 2017
@neiljay neiljay force-pushed the pr/add_mips_pic32mx branch 2 times, most recently from a13e366 to 1c827f3 Compare February 15, 2017 14:46
@neiljay
Copy link
Contributor Author

neiljay commented Feb 15, 2017

@kaspar030 If your happy with the copyright changes I'll squash those down.
Also see how the build fails in CI/Jenkins but works in Murdock. #6066 builds fine in Jenkins presumable as its just one board not 2 ??

@neiljay
Copy link
Contributor Author

neiljay commented Feb 21, 2017

@kaspar030 happy for me to squash these ?

@neiljay
Copy link
Contributor Author

neiljay commented Mar 29, 2017

Rebased, Squashed, Dependants merged, 3 ticks, time to merge I think ;-)

@jnohlgard
Copy link
Member

I see an ACK and three greens.
@neiljay is you intent to refactor the ldscripts in a follow up? (referring to #6092 (comment))

@jnohlgard jnohlgard merged commit 1a9b12f into RIOT-OS:master Mar 30, 2017
@neiljay
Copy link
Contributor Author

neiljay commented Mar 30, 2017 via email

@neiljay
Copy link
Contributor Author

neiljay commented Mar 30, 2017 via email

cladmi added a commit to cladmi/RIOT that referenced this pull request May 31, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jun 15, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jun 27, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jul 2, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jul 2, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jul 5, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jul 17, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jul 17, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Aug 16, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Aug 20, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Nov 19, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Dec 6, 2018
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jan 21, 2019
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Mar 6, 2019
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jun 3, 2019
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jun 17, 2019
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Jun 25, 2019
https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
jcarrano added a commit to jcarrano/RIOT that referenced this pull request Jul 3, 2019
Note: in contrast to mips-malta, these boards are still available for purchase.
      This means that if the issued listed below were to be fixed (and the boards
      maintained by a person versed in the architecture) then adding them back
      would be a valid possibility.

The pic32-clicker and pic32-wifire have severe issues affecting their usability,
maintainability and have no maintainer.

1. Usability
============

I doubt the current implementation of these board can be use for any serious
development.

This is a problem with MIPS-RIOT integration in general and was explained in the
PR removing mips-malta:

> a. Makes development & debugging way harder.
> b. It is impossible to run interactive tests.
>  b.1. Constrains the rest of the platforms by providing an incentive to not
>       make tests interactive.
> c. The lack of UART is a witness to the poor quality of the port.

This alone should have been enough reson not to merge this boards in the first place.

pic32-wifire is the least worse. At least it can be flashed from Linux, though it
is not an easy task. From dist/tools/pic32prog/doc.md

>It will require flashing a specific firmware on the PICkit3.
> As this can only be done from a Windows computer, that not many Linux users
> have, the following steps explain how to setup a Windows VirtualBox virtual
> machine and flash the PICkit3 from it.
>
> Informations come from this comment
>
> RIOT-OS#6092 (comment)

pic32-clicker HAS NO FLASHER and requires one to use MPLAB.

2. No maintainer
================

There is no (active) RIOT maintainer with deep knowledge of the boards and
platform. A quick search through the issues and PRs shows this.

3. Maintainability
==================

As a consequence of (1) and (2) many tests are not run in these boards. At the
same time, RIOT maintainers - especially those working on the build system - still
have to modify and migrate mips-foo boards.

The rest of the arguments here are the same as presented with the mips-malta
removal.
jcarrano added a commit to jcarrano/RIOT that referenced this pull request Jul 12, 2019
Note: in contrast to mips-malta, these boards are still available for purchase.
      This means that if the issued listed below were to be fixed (and the boards
      maintained by a person versed in the architecture) then adding them back
      would be a valid possibility.

The pic32-clicker and pic32-wifire have severe issues affecting their usability,
maintainability and have no maintainer.

1. Usability
============

I doubt the current implementation of these board can be use for any serious
development.

This is a problem with MIPS-RIOT integration in general and was explained in the
PR removing mips-malta:

> a. Makes development & debugging way harder.
> b. It is impossible to run interactive tests.
>  b.1. Constrains the rest of the platforms by providing an incentive to not
>       make tests interactive.
> c. The lack of UART is a witness to the poor quality of the port.

This alone should have been enough reson not to merge this boards in the first place.

pic32-wifire is the least worse. At least it can be flashed from Linux, though it
is not an easy task. From dist/tools/pic32prog/doc.md

>It will require flashing a specific firmware on the PICkit3.
> As this can only be done from a Windows computer, that not many Linux users
> have, the following steps explain how to setup a Windows VirtualBox virtual
> machine and flash the PICkit3 from it.
>
> Informations come from this comment
>
> RIOT-OS#6092 (comment)

pic32-clicker HAS NO FLASHER and requires one to use MPLAB.

2. No maintainer
================

There is no (active) RIOT maintainer with deep knowledge of the boards and
platform. A quick search through the issues and PRs shows this.

3. Maintainability
==================

As a consequence of (1) and (2) many tests are not run in these boards. At the
same time, RIOT maintainers - especially those working on the build system - still
have to modify and migrate mips-foo boards.

The rest of the arguments here are the same as presented with the mips-malta
removal.
jcarrano added a commit to jcarrano/RIOT that referenced this pull request Sep 2, 2019
Note: in contrast to mips-malta, these boards are still available for purchase.
      This means that if the issued listed below were to be fixed (and the boards
      maintained by a person versed in the architecture) then adding them back
      would be a valid possibility.

The pic32-clicker and pic32-wifire have severe issues affecting their usability,
maintainability and have no maintainer.

1. Usability
============

I doubt the current implementation of these board can be use for any serious
development.

This is a problem with MIPS-RIOT integration in general and was explained in the
PR removing mips-malta:

> a. Makes development & debugging way harder.
> b. It is impossible to run interactive tests.
>  b.1. Constrains the rest of the platforms by providing an incentive to not
>       make tests interactive.
> c. The lack of UART is a witness to the poor quality of the port.

This alone should have been enough reson not to merge this boards in the first place.

pic32-wifire is the least worse. At least it can be flashed from Linux, though it
is not an easy task. From dist/tools/pic32prog/doc.md

>It will require flashing a specific firmware on the PICkit3.
> As this can only be done from a Windows computer, that not many Linux users
> have, the following steps explain how to setup a Windows VirtualBox virtual
> machine and flash the PICkit3 from it.
>
> Informations come from this comment
>
> RIOT-OS#6092 (comment)

pic32-clicker HAS NO FLASHER and requires one to use MPLAB.

2. No maintainer
================

There is no (active) RIOT maintainer with deep knowledge of the boards and
platform. A quick search through the issues and PRs shows this.

3. Maintainability
==================

As a consequence of (1) and (2) many tests are not run in these boards. At the
same time, RIOT maintainers - especially those working on the build system - still
have to modify and migrate mips-foo boards.

The rest of the arguments here are the same as presented with the mips-malta
removal.
cladmi added a commit to cladmi/RIOT that referenced this pull request Sep 24, 2019
Define a RIOT_PIC32PROG to allow setting 'PIC32PROG' globally from environment.

https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
cladmi added a commit to cladmi/RIOT that referenced this pull request Sep 24, 2019
Define a RIOT_PIC32PROG to allow setting 'PIC32PROG' globally from environment.

https://github.com/sergev/pic32prog

For PICkit3 it requires having it with scripting mode firware.

Source
------

RIOT-OS#6092 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: MIPS Platform: This PR/issue effects MIPS-based platforms Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants