-
Notifications
You must be signed in to change notification settings - Fork 3k
Fastmodels support: add FVP_MPS2 targets to mbed os #6862
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
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2c88a83
FastModels: add a new parent platform ARM_FM
2e4a023
FastModels: add FVP_MPS2_M3 target support
ce2c21a
FastModels: add FVP_MPS2_M4 target support
67abec3
FastModels: add FVP_MPS2_M0 target support
1bf59cd
FastModels: add FVP_MPS2_M0P target support
76dc715
FastModels: add FVP_MPS2_M7 target support
953a735
FastModels: enable FVP_MPS2 targets for mbed os
aab82a7
reformat coding styles based on coding guidelines
bc03c20
update targets.json remove redundant extra_lables
f35ba49
remove empty lines and redundant variables
304b584
remove ethernet driver as it is not compatible
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,91 @@ | ||
/* mbed Microcontroller Library | ||
* Copyright (c) 2006-2018 ARM Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#ifndef MBED_PERIPHERALNAMES_H | ||
#define MBED_PERIPHERALNAMES_H | ||
|
||
#include "cmsis.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
typedef enum { | ||
UART_0 = (int)CMSDK_UART0_BASE, | ||
UART_1 = (int)CMSDK_UART1_BASE, | ||
UART_2 = (int)CMSDK_UART3_BASE, | ||
UART_3 = (int)CMSDK_UART4_BASE | ||
} UARTName; | ||
|
||
typedef enum { | ||
I2C_0 = (int)MPS2_TSC_I2C_BASE, | ||
I2C_1 = (int)MPS2_AAIC_I2C_BASE, | ||
I2C_2 = (int)MPS2_SHIELD0_I2C_BASE, | ||
I2C_3 = (int)MPS2_SHIELD1_I2C_BASE | ||
|
||
} I2CName; | ||
|
||
typedef enum { | ||
ADC0_0 = 0, | ||
ADC0_1, | ||
ADC0_2, | ||
ADC0_3, | ||
ADC0_4, | ||
ADC0_5, | ||
ADC0_6, | ||
ADC0_7, | ||
ADC0_8, | ||
ADC0_9, | ||
ADC0_10, | ||
ADC0_11 | ||
} ADCName; | ||
|
||
typedef enum { | ||
SPI_0 = (int)MPS2_SSP1_BASE, | ||
SPI_1 = (int)MPS2_SSP0_BASE, | ||
SPI_2 = (int)MPS2_SSP2_BASE, | ||
SPI_3 = (int)MPS2_SSP3_BASE, | ||
SPI_4 = (int)MPS2_SSP4_BASE | ||
} SPIName; | ||
|
||
typedef enum { | ||
PWM_1 = 0, | ||
PWM_2, | ||
PWM_3, | ||
PWM_4, | ||
PWM_5, | ||
PWM_6, | ||
PWM_7, | ||
PWM_8, | ||
PWM_9, | ||
PWM_10, | ||
PWM_11 | ||
} PWMName; | ||
|
||
#define STDIO_UART_TX USBTX | ||
#define STDIO_UART_RX USBRX | ||
#define STDIO_UART UART_0 | ||
|
||
#define MBED_UART0 USBTX, USBRX | ||
#define MBED_UART1 XB_TX, XB_RX | ||
#define MBED_UART2 SH0_TX, SH0_RX | ||
#define MBED_UART3 SH1_TX, SH1_RX | ||
#define MBED_UARTUSB USBTX, USBRX | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
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,243 @@ | ||
/* mbed Microcontroller Library | ||
* Copyright (c) 2006-2018 ARM Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#ifndef MBED_PINNAMES_H | ||
#define MBED_PINNAMES_H | ||
|
||
#include "cmsis.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
typedef enum { | ||
PIN_INPUT, | ||
PIN_OUTPUT | ||
} PinDirection; | ||
|
||
#define PORT_SHIFT 5 | ||
|
||
typedef enum { | ||
// MPS2 EXP Pin Names | ||
EXP0 = 0, | ||
EXP1 = 1, | ||
EXP2 = 2, | ||
EXP3 = 3, | ||
EXP4 = 4, | ||
EXP5 = 5, | ||
EXP6 = 6, | ||
EXP7 = 7, | ||
EXP8 = 8, | ||
EXP9 = 9, | ||
EXP10 = 10, | ||
EXP11 = 11, | ||
EXP12 = 12, | ||
EXP13 = 13, | ||
EXP14 = 14, | ||
EXP15 = 15, | ||
EXP16 = 16, | ||
EXP17 = 17, | ||
EXP18 = 18, | ||
EXP19 = 19, | ||
EXP20 = 20, | ||
EXP21 = 21, | ||
EXP22 = 22, | ||
EXP23 = 23, | ||
EXP24 = 24, | ||
EXP25 = 25, | ||
|
||
EXP26 = 26, | ||
EXP27 = 27, | ||
EXP28 = 28, | ||
EXP29 = 29, | ||
EXP30 = 30, | ||
EXP31 = 31, | ||
EXP32 = 32, | ||
EXP33 = 33, | ||
EXP34 = 34, | ||
EXP35 = 35, | ||
EXP36 = 36, | ||
EXP37 = 37, | ||
EXP38 = 38, | ||
EXP39 = 39, | ||
EXP40 = 40, | ||
EXP41 = 41, | ||
EXP42 = 42, | ||
EXP43 = 43, | ||
EXP44 = 44, | ||
EXP45 = 45, | ||
EXP46 = 46, | ||
EXP47 = 47, | ||
EXP48 = 48, | ||
EXP49 = 49, | ||
EXP50 = 50, | ||
EXP51 = 51, | ||
|
||
// Other mbed Pin Names | ||
|
||
//LEDs on mps2 | ||
//user leds | ||
USERLED1 = 100, | ||
USERLED2 = 101, | ||
//user switches | ||
USERSW1 = 110, | ||
USERSW2 = 111, | ||
|
||
//mcc leds | ||
LED1 = 200, | ||
LED2 = 201, | ||
LED3 = 202, | ||
LED4 = 203, | ||
LED5 = 204, | ||
LED6 = 205, | ||
LED7 = 206, | ||
LED8 = 207, | ||
|
||
//MCC Switches | ||
SW1 = 210, | ||
SW2 = 211, | ||
SW3 = 212, | ||
SW4 = 213, | ||
SW5 = 214, | ||
SW6 = 215, | ||
SW7 = 216, | ||
SW8 = 217, | ||
|
||
//MPS2 SPI header pins j21 | ||
MOSI_SPI = 300, | ||
MISO_SPI = 301, | ||
SCLK_SPI = 302, | ||
SSEL_SPI = 303, | ||
|
||
//MPS2 CLCD SPI | ||
CLCD_MOSI = 304, | ||
CLCD_MISO = 305, | ||
CLCD_SCLK = 306, | ||
CLCD_SSEL = 307, | ||
CLCD_RESET = 308, | ||
CLCD_RS = 309, | ||
CLCD_RD = 310, | ||
CLCD_BL_CTRL = 311, | ||
|
||
//MPS2 shield 0 SPI | ||
SHIELD_0_SPI_SCK = 320, | ||
SHIELD_0_SPI_MOSI = 321, | ||
SHIELD_0_SPI_MISO = 322, | ||
SHIELD_0_SPI_nCS = 323, | ||
|
||
//MPS2 shield 1 SPI | ||
SHIELD_1_SPI_SCK = 331, | ||
SHIELD_1_SPI_MOSI = 332, | ||
SHIELD_1_SPI_MISO = 333, | ||
SHIELD_1_SPI_nCS = 334, | ||
|
||
//MPS2 shield ADC SPI | ||
ADC_MOSI = 650, | ||
ADC_MISO = 651, | ||
ADC_SCLK = 652, | ||
ADC_SSEL = 653, | ||
|
||
//MPS2 Uart | ||
USBTX = 400, | ||
USBRX = 401, | ||
XB_TX = 402, | ||
XB_RX = 403, | ||
UART_TX2 = 404, | ||
UART_RX2 = 405, | ||
SH0_TX = 406, | ||
SH0_RX = 407, | ||
SH1_TX = 408, | ||
SH1_RX = 409, | ||
|
||
//MPS2 I2C touchscreen and audio | ||
TSC_SDA = 500, | ||
TSC_SCL = 501, | ||
AUD_SDA = 502, | ||
AUD_SCL = 503, | ||
|
||
//MPS2 I2C for shield | ||
SHIELD_0_SDA = 504, | ||
SHIELD_0_SCL = 505, | ||
SHIELD_1_SDA = 506, | ||
SHIELD_1_SCL = 507, | ||
|
||
//MPS2 shield Analog pins | ||
A0_0 = 600, | ||
A0_1 = 601, | ||
A0_2 = 602, | ||
A0_3 = 603, | ||
A0_4 = 604, | ||
A0_5 = 605, | ||
A1_0 = 606, | ||
A1_1 = 607, | ||
A1_2 = 608, | ||
A1_3 = 609, | ||
A1_4 = 610, | ||
A1_5 = 611, | ||
//MPS2 Shield Digital pins | ||
D0_0 = EXP0, | ||
D0_1 = EXP4, | ||
D0_2 = EXP2, | ||
D0_3 = EXP3, | ||
D0_4 = EXP1, | ||
D0_5 = EXP6, | ||
D0_6 = EXP7, | ||
D0_7 = EXP8, | ||
D0_8 = EXP9, | ||
D0_9 = EXP10, | ||
D0_10 = EXP12, | ||
D0_11 = EXP13, | ||
D0_12 = EXP14, | ||
D0_13 = EXP11, | ||
D0_14 = EXP15, | ||
D0_15 = EXP5, | ||
|
||
D1_0 = EXP26, | ||
D1_1 = EXP30, | ||
D1_2 = EXP28, | ||
D1_3 = EXP29, | ||
D1_4 = EXP27, | ||
D1_5 = EXP32, | ||
D1_6 = EXP33, | ||
D1_7 = EXP34, | ||
D1_8 = EXP35, | ||
D1_9 = EXP36, | ||
D1_10 = EXP38, | ||
D1_11 = EXP39, | ||
D1_12 = EXP40, | ||
D1_13 = EXP44, | ||
D1_14 = EXP41, | ||
D1_15 = EXP31, | ||
|
||
// Not connected | ||
NC = (int)0xFFFFFFFF, | ||
} PinName; | ||
|
||
|
||
typedef enum { | ||
PullUp = 2, | ||
PullDown = 1, | ||
PullNone = 0, | ||
Repeater = 3, | ||
OpenDrain = 4, | ||
PullDefault = PullDown | ||
} PinMode; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif | ||
|
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,31 @@ | ||
/* mbed Microcontroller Library | ||
* Copyright (c) 2006-2018 ARM Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#ifndef MBED_PORTNAMES_H | ||
#define MBED_PORTNAMES_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
typedef enum { | ||
Port0 = 0, | ||
Port1 = 1 | ||
} PortName; | ||
|
||
#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.
Inconsistent indentation levels