-
Notifications
You must be signed in to change notification settings - Fork 3k
Add ARM_MUSCA_A1 as a new target platform #8845
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
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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,48 @@ | ||
/* mbed Microcontroller Library | ||
* Copyright (c) 2006-2018 Arm Limited | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* 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 { | ||
PORTNUM_0 = 0 | ||
} PortName; | ||
|
||
typedef enum { | ||
UART_0 = 0, | ||
UART_1 | ||
} UARTName; | ||
|
||
#define STDIO_UART_TX UART1_TX | ||
#define STDIO_UART_RX UART1_RX | ||
#define STDIO_UART UART_1 | ||
|
||
#define USBTX STDIO_UART_TX | ||
#define USBRX STDIO_UART_RX | ||
|
||
#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,112 @@ | ||
/* mbed Microcontroller Library | ||
* Copyright (c) 2006-2018 Arm Limited | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* 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; | ||
|
||
typedef enum { | ||
PA0 = 0, | ||
PA1 = 1, | ||
PA2 = 2, | ||
PA3 = 3, | ||
PA4 = 4, | ||
PA5 = 5, | ||
PA6 = 6, | ||
PA7 = 7, | ||
PA8 = 8, | ||
PA9 = 9, | ||
PA10 = 10, | ||
PA11 = 11, | ||
PA12 = 12, | ||
PA13 = 13, | ||
PA14 = 14, | ||
PA15 = 15, | ||
PA16 = 16, | ||
PA17 = 17, | ||
PA18 = 18, | ||
PA19 = 19, | ||
PA20 = 20, | ||
PA21 = 21, | ||
PA22 = 22, | ||
PA23 = 23, | ||
PA24 = 24, | ||
PA25 = 25, | ||
|
||
/* Arduino Connector Namings */ | ||
D0 = PA0, | ||
D1 = PA1, | ||
D2 = PA2, | ||
D3 = PA3, | ||
D4 = PA4, | ||
D5 = PA5, | ||
D6 = PA6, | ||
D7 = PA7, | ||
D8 = PA8, | ||
D9 = PA9, | ||
D10 = PA10, | ||
D11 = PA11, | ||
D12 = PA12, | ||
D13 = PA13, | ||
D14 = PA14, | ||
D15 = PA15, | ||
|
||
/* UART pins */ | ||
UART0_RX = PA0, /* Alternate Function - 1 */ | ||
UART0_TX = PA1, /* Alternate Function - 1 */ | ||
UART1_RX = PA16, | ||
UART1_TX = PA17, | ||
|
||
LED1 = PA2, | ||
LED2 = PA3, | ||
LED3 = PA4, | ||
|
||
/* Not connected */ | ||
NC = -1u, | ||
} PinName; | ||
|
||
typedef enum { | ||
PRIMARY_FUNC = 0, | ||
ALTERNATE_FUNC_1 = 1, | ||
ALTERNATE_FUNC_2 = 2, | ||
ALTERNATE_FUNC_3 = 3 | ||
} PinFunction; | ||
|
||
typedef enum { | ||
PullNone = 0, | ||
PullUp, | ||
PullDown, | ||
PullDefault = PullNone | ||
} PinMode; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif | ||
|
63 changes: 63 additions & 0 deletions
63
targets/TARGET_ARM_SSG/TARGET_MUSCA_A1/TFM/TFM_API/audit_wrappers.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,63 @@ | ||
/* | ||
* Copyright (c) 2018, Arm Limited. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* | ||
*/ | ||
|
||
#ifndef __AUDIT_WRAPPERS_H__ | ||
#define __AUDIT_WRAPPERS_H__ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/*! | ||
* \struct audit_core_retrieve_input | ||
* | ||
* \brief Input structure for the audit_core_retrieve_record_wrapper function | ||
* | ||
*/ | ||
struct audit_core_retrieve_input { | ||
const uint32_t record_index; /*!< Index of the record to retrieve */ | ||
const uint32_t buffer_size; /*!< Size in bytes of the provided buffer */ | ||
const uint8_t *token; /*!< Must be set to NULL. Token used as a | ||
* challenge for encryption, to protect | ||
* against rollback attacks | ||
*/ | ||
const uint32_t token_size; /*!< Must be set to 0. Size in bytes of the | ||
* token used as challenge | ||
*/ | ||
}; | ||
|
||
/*! | ||
* \struct audit_core_retrieve_output | ||
* | ||
* \brief Output structure for the audit_core_retrieve_record_wrapper function | ||
* | ||
*/ | ||
struct audit_core_retrieve_output { | ||
uint8_t *buffer; /*!< Buffer used to store the retrieved record */ | ||
uint32_t *record_size; /*!< Size in bytes of the retrieved record */ | ||
}; | ||
|
||
/*! | ||
* \brief This function is a TF-M compatible wrapper for the | ||
* \ref audit_core_retrieve_record implemented in the Audit log | ||
* core functions | ||
* | ||
* \param[in] input_s Pointer to the structure containing input parameters | ||
* associated with \ref psa_audit_retrieve_record | ||
* \param[out] output_s Pointer to the structure containing output parameters | ||
* associated with \ref psa_audit_retrieve_record | ||
* | ||
*/ | ||
enum psa_audit_err audit_core_retrieve_record_wrapper( | ||
const struct audit_core_retrieve_input *input_s, | ||
struct audit_core_retrieve_output *output_s); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* __AUDIT_WRAPPERS_H__ */ |
57 changes: 57 additions & 0 deletions
57
targets/TARGET_ARM_SSG/TARGET_MUSCA_A1/TFM/TFM_API/crypto_psa_wrappers.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,57 @@ | ||
/* | ||
* Copyright (c) 2018, Arm Limited. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* | ||
*/ | ||
|
||
#ifndef __CRYPTO_PSA_WRAPPERS_H__ | ||
#define __CRYPTO_PSA_WRAPPERS_H__ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/*! | ||
* \struct psa_cipher_update_input | ||
* | ||
* \brief Input structure for the tfm_crypto_cipher_update_wrapper function | ||
* | ||
*/ | ||
struct psa_cipher_update_input { | ||
const uint8_t *input; /*!< Input data to the cipher */ | ||
size_t input_length; /*!< Size of the input data */ | ||
}; | ||
|
||
/*! | ||
* \struct psa_cipher_update_output | ||
* | ||
* \brief Output structure for the tfm_crypto_cipher_update_wrapper function | ||
* | ||
*/ | ||
struct psa_cipher_update_output { | ||
unsigned char *output; /*!< Buffer to hold the output data from the cipher*/ | ||
size_t output_size; /*!< Size of the output buffer */ | ||
size_t *output_length; /*!< Size of the output data from the cipher */ | ||
}; | ||
|
||
/*! | ||
* \brief This function is a TF-M compatible wrapper for the | ||
* \ref tfm_crypto_cipher_update implemented in the Crypto service | ||
* | ||
* \param[in] input_s Pointer to the structure containing input parameters | ||
* associated with \ref psa_cipher_update_input | ||
* \param[out] output_s Pointer to the structure containing output parameters | ||
* associated with \ref psa_cipher_update_output | ||
* | ||
*/ | ||
enum tfm_crypto_err_t tfm_crypto_cipher_update_wrapper( | ||
psa_cipher_operation_t *operation, | ||
struct psa_cipher_update_input *input_s, | ||
struct psa_cipher_update_output *output_s); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* __CRYPTO_PSA_WRAPPERS_H__ */ |
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.
@gaborkertesz : Can you add the pins brought out on the Arduino headers as well?
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.
in pinmap.c.
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.
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.
ARMC6: http://p.arm.com/?130
GCC: http://p.arm.com/?--g