-
Notifications
You must be signed in to change notification settings - Fork 2.1k
cpu: Add PIC32MZ support #6066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
cpu: Add PIC32MZ support #6066
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1838ca5
cpu: mips: Add EIC interrupt mode support.
241087f
cpu: mips-pic32mz: Add support for PIC32MZ devices
c4d28cb
boards: pic32-wifire: Add support for the Digilent WiFire board.
becfd63
sys: Extend MIPS temporary work around to all mips targets.
1113b58
examples: gnrc_border_router: Blacklist all mips boards.
0bafa33
examples: javascript: Blacklist pic32-wifire
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| MODULE = board | ||
| include $(RIOTBASE)/Makefile.base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Put defined MCU peripherals here (in alphabetical order) | ||
| FEATURES_PROVIDED += periph_timer | ||
| FEATURES_PROVIDED += periph_uart | ||
|
|
||
| # Various other features (if any) | ||
| FEATURES_PROVIDED += cpp | ||
|
|
||
| # The board MPU family (used for grouping by the CI system) | ||
| FEATURES_MCU_GROUP = mips32r2 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export CPU = mips_pic32mz | ||
| export CPU_MODEL=p32mz2048efg100 | ||
| export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include/ | ||
| export APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| /* | ||
| * Copyright(C) 2017, Imagination Technologies Limited and/or its | ||
| * affiliated group companies. | ||
| * | ||
| * 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. | ||
| * | ||
| */ | ||
|
|
||
| /** | ||
| * @defgroup boards_pic32-wifire Digilent PIC32 WiFire | ||
| * @ingroup boards | ||
| * @brief board configuration for the Digilent PIC32 WiFire | ||
| * @details | ||
| * See: | ||
| * http://store.digilentinc.com/chipkit-wi-fire-wifi-enabled-mz-microcontroller-board/ | ||
| * for more information on the board. | ||
| * | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief board configuration for the Digilent PIC32 WiFire | ||
| * | ||
| * @author Neil Jones <Neil.Jones@imgtec.com> | ||
| */ | ||
|
|
||
| #ifndef _BOARD_H_ | ||
| #define _BOARD_H_ | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| #include "vendor/p32mz2048efg100.h" | ||
|
|
||
| /** | ||
| * @brief Set how many increments of the count register per uS | ||
| * needed by the timer code. | ||
| */ | ||
| #define TICKS_PER_US (100) | ||
|
|
||
| /** | ||
| * @brief We are using an External Interrupt Controller (all pic32 devices use this mode) | ||
| */ | ||
| #define EIC_IRQ (1) | ||
|
|
||
| /** | ||
| * @brief Board level initialisation | ||
| */ | ||
| void board_init(void); | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| #endif /* _BOARD_H_ */ | ||
| /** @} */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| /* | ||
| * Copyright(C) 2016,2017, Imagination Technologies Limited and/or its | ||
| * affiliated group companies. | ||
| * | ||
| * 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. | ||
| * | ||
| */ | ||
|
|
||
| /** | ||
| * @defgroup boards_pic32-wifire Digilent PIC32 WiFire | ||
| * @ingroup boards | ||
| * @brief peripheral configuration for the Digilent PIC32 WiFire | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief peripheral configuration for the Digilent PIC32 WiFire | ||
| * | ||
| * @author Neil Jones <Neil.Jones@imgtec.com> | ||
| */ | ||
| #ifndef _PERIPH_CONF_H_ | ||
| #define _PERIPH_CONF_H_ | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| /** | ||
| * @brief The peripheral clock is required for the UART Baud rate calculation | ||
| * It is configured by the 'config' registers (see pic32_config_settings.c) | ||
| */ | ||
| #define PERIPHERAL_CLOCK (100000000) /* Hz */ | ||
|
|
||
| /** | ||
| * @brief Timer definitions | ||
| * @{ | ||
| */ | ||
| #define TIMER_NUMOF (1) | ||
| #define TIMER_0_CHANNELS (3) | ||
| /** @} */ | ||
|
|
||
| /** | ||
| * @brief UART Definitions | ||
| * There are 6 UARTS available on this CPU. | ||
| * We route debug via UART4 on this board, | ||
| * this is the UART connected to the FTDI USB <-> UART device. | ||
| * | ||
| * Note Microchip number the UARTS 1->4. | ||
| * @{ | ||
| */ | ||
| #define UART_NUMOF (6) | ||
| #define DEBUG_VIA_UART (4) | ||
| #define DEBUG_UART_BAUD (9600) | ||
| /** @} */ | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| #endif | ||
| /** @} */ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is periph_uart in FEATURES_PROVIDED if there is no UART available?
according to comment at https://github.com/RIOT-OS/RIOT/pull/6066/files#diff-8790a8833e3d374cd14889b9f0e69a2cR18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uart Tx is implemented but not the full UART API yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tweaked the comment when squashing see e2d7d36