forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ARMmbed#8644 from ARMmbed/release-candidate
Release candidate for mbed-os-5.10.3
- Loading branch information
Showing
372 changed files
with
108,479 additions
and
2,044 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,45 +1,5 @@ | ||
# Description | ||
This document is cheat sheet for everyone who wants to contribute to [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os) GitHub repository at GitHub. | ||
All changes in code base should originate from GitHub Issues and take advantage of existing GitHub flows. Goal is to attract contributors and allow them contribute to code and documentation at the same time. | ||
# Contributing to Mbed OS | ||
|
||
Guidelines from this document are created to help new and existing contributors understand process workflow and align to project rules before pull request is submitted. It explains how a participant should do things like format code, test fixes, and submit patches. | ||
Mbed OS is an open-source, device software platform for the Internet of Things. Contributions are an important part of the platform, and our goal is to make it as simple as possible to become a contributor. | ||
|
||
## Where to get more information? | ||
You can read more on our [documentation page](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/cont/contributing/). | ||
|
||
# How to contribute | ||
We really appreciate your contributions! We are Open Source project and we need your help. We want to keep it as easy as possible to contribute changes that get things working in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. | ||
|
||
Before a pull request will be merged, the [mbed Contributor Agreement](http://developer.mbed.org/contributor_agreement/) must be signed. | ||
|
||
You can pick up existing [mbed-os GitHub Issue](https://github.com/ARMmbed/mbed-os/issues) and solve it or implement new feature you find important, attractive or just necessary. We will review your proposal via pull request mechanism, give you comments and merge your changes if we decide your contribution satisfy criteria such as quality. | ||
|
||
# Enhancements vs Bugs | ||
Enhancements are: | ||
* New features implementation. | ||
* Code refactoring. | ||
* Coding rules, coding styles improvements. | ||
* Code comments improvement. | ||
* Documentation work. | ||
|
||
Bugs are: | ||
* Issues rose internally or externally by [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os) users. | ||
* Internally (within mbed team) created issues from Continuous Integration pipeline and build servers. | ||
* Issues detected using automation tools such as compilers, sanitizers, static code analysis tools etc. | ||
|
||
# Gate Keeper role | ||
Gate Keeper is a person responsible for GitHub process workflow execution and is responsible for repository / project code base. Gate Keeper is also responsible for code (pull request) quality stamp and approves or rejects code changes in project’s code base. | ||
|
||
Gate Keepers will review your pull request code, give you comments in pull request comment section and in the end if everything goes well merge your pull request to one of our branches (most probably default ```master``` branch). | ||
|
||
Please be patient, digest Gate Keeper's feedback and respond promptly :) | ||
|
||
# mbed SDK porting | ||
* For more information regarding mbed SDK porting please refer to [mbed SDK porting](http://developer.mbed.org/handbook/mbed-SDK-porting) handbook. | ||
* Before starting the mbed SDK porting, you might want to familiarize with the [mbed SDK library internals](http://developer.mbed.org/handbook/mbed-library-internals) first. | ||
|
||
# Glossary | ||
* Gate Keeper – persons responsible for overall code-base quality of [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os) project. | ||
* Enhancement – New feature deployment, code refactoring actions or existing code improvements. | ||
* Bugfix – Issues originated from GitHub Issues pool, raised internally within mbed classic team or issues from automated code validators like linters, static code analysis tools etc. | ||
* Mbed classic – mbed SDK 2.0 located in GitHub at [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os). | ||
To encourage productive collaboration, as well as robust, consistent and maintainable code, we have a set of guidelines for contributing to Mbed OS. Please see: [contributing guidelines](https://os.mbed.com/docs/latest/reference/contributing.html). |
This file contains 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
118 changes: 118 additions & 0 deletions
118
TESTS/mbed_hal/qspi/flash_configs/Freescale/K82F/flash_config.h
This file contains 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,118 @@ | ||
/* mbed Microcontroller Library | ||
* Copyright (c) 2018-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_QSPI_FLASH_CONFIG_H | ||
#define MBED_QSPI_FLASH_CONFIG_H | ||
|
||
#include "../../MX25RXX35F_config.h" | ||
|
||
/* Fast mode not supported in MX25U3235F */ | ||
#undef FAST_MODE_ENABLE | ||
#undef FAST_MODE_DISABLE | ||
|
||
#ifdef QSPI_SECTOR_COUNT | ||
#undef QSPI_SECTOR_COUNT | ||
#define QSPI_SECTOR_COUNT 1024 // for MX25U3235F | ||
#endif | ||
|
||
/* The values for MX25U3235F are different, specify this here */ | ||
#undef QSPI_COMMON_MAX_FREQUENCY | ||
#undef QSPI_WRSR_MAX_TIME | ||
#undef QSPI_PAGE_PROG_MAX_TIME | ||
#undef QSPI_ERASE_SECTOR_MAX_TIME | ||
#undef QSPI_ERASE_BLOCK_32_MAX_TIME | ||
#undef QSPI_ERASE_BLOCK_64_MAX_TIME | ||
|
||
/* Implementation of these macros are slightly different for MX25U3235F */ | ||
#undef EXTENDED_SPI_ENABLE | ||
#undef EXTENDED_SPI_DISABLE | ||
|
||
/* Max frequency for basic rw operation in MX25U3235F */ | ||
#define QSPI_COMMON_MAX_FREQUENCY 54000000 | ||
|
||
/* WRSR operations max time [us] (datasheet max time + 15%) */ | ||
#define QSPI_WRSR_MAX_TIME 46000 // 40ms | ||
|
||
/* Write operations max time [us] (datasheet max time + 15%) */ | ||
#define QSPI_PAGE_PROG_MAX_TIME 3450 // 3ms | ||
|
||
/* erase operations max time [us] (datasheet max time + 15%) */ | ||
#define QSPI_ERASE_SECTOR_MAX_TIME 230000 // 200 ms | ||
#define QSPI_ERASE_BLOCK_32_MAX_TIME 1150000 // 1s | ||
#define QSPI_ERASE_BLOCK_64_MAX_TIME 2300000 // 2s | ||
|
||
#define EXTENDED_SPI_ENABLE() \ | ||
\ | ||
const int32_t reg_size = QSPI_STATUS_REG_SIZE; \ | ||
uint8_t reg_data[reg_size] = { 0 }; \ | ||
\ | ||
if (read_register(STATUS_REG, reg_data, \ | ||
QSPI_STATUS_REG_SIZE, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
if (write_enable(qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
reg_data[0] = STATUS_BIT_QE; \ | ||
if (write_register(QSPI_CMD_WRSR, reg_data, \ | ||
reg_size, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
WAIT_FOR(WRSR_MAX_TIME, qspi); \ | ||
\ | ||
memset(reg_data, 0, QSPI_STATUS_REG_SIZE); \ | ||
if (read_register(STATUS_REG, reg_data, \ | ||
QSPI_STATUS_REG_SIZE, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
return ((reg_data[0] & STATUS_BIT_QE) != 0 ? \ | ||
QSPI_STATUS_OK : QSPI_STATUS_ERROR) | ||
|
||
|
||
|
||
#define EXTENDED_SPI_DISABLE() \ | ||
\ | ||
const int32_t reg_size = QSPI_STATUS_REG_SIZE; \ | ||
uint8_t reg_data[reg_size] = { 0 }; \ | ||
\ | ||
if (read_register(STATUS_REG, reg_data, \ | ||
QSPI_STATUS_REG_SIZE, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
if (write_enable(qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
reg_data[0] &= ~(STATUS_BIT_QE); \ | ||
\ | ||
if (write_register(QSPI_CMD_WRSR, reg_data, \ | ||
reg_size, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
WAIT_FOR(WRSR_MAX_TIME, qspi); \ | ||
\ | ||
reg_data[0] = 0; \ | ||
if (read_register(STATUS_REG, reg_data, \ | ||
QSPI_STATUS_REG_SIZE, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
return ((reg_data[0] & STATUS_BIT_QE) == 0 ? \ | ||
QSPI_STATUS_OK : QSPI_STATUS_ERROR) | ||
|
||
#endif // MBED_QSPI_FLASH_CONFIG_H |
118 changes: 118 additions & 0 deletions
118
TESTS/mbed_hal/qspi/flash_configs/Freescale/KL82Z/flash_config.h
This file contains 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,118 @@ | ||
/* mbed Microcontroller Library | ||
* Copyright (c) 2018-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_QSPI_FLASH_CONFIG_H | ||
#define MBED_QSPI_FLASH_CONFIG_H | ||
|
||
#include "../../MX25RXX35F_config.h" | ||
|
||
/* Fast mode not supported in MX25L12845G */ | ||
#undef FAST_MODE_ENABLE | ||
#undef FAST_MODE_DISABLE | ||
|
||
#ifdef QSPI_SECTOR_COUNT | ||
#undef QSPI_SECTOR_COUNT | ||
#define QSPI_SECTOR_COUNT 4096 // for MX25L12845G | ||
#endif | ||
|
||
/* The values for MX25U3235F are different, specify this here */ | ||
#undef QSPI_COMMON_MAX_FREQUENCY | ||
#undef QSPI_WRSR_MAX_TIME | ||
#undef QSPI_PAGE_PROG_MAX_TIME | ||
#undef QSPI_ERASE_SECTOR_MAX_TIME | ||
#undef QSPI_ERASE_BLOCK_32_MAX_TIME | ||
#undef QSPI_ERASE_BLOCK_64_MAX_TIME | ||
|
||
/* Implementation of these macros are slightly different for MX25L12845G */ | ||
#undef EXTENDED_SPI_ENABLE | ||
#undef EXTENDED_SPI_DISABLE | ||
|
||
/* Max frequency for basic rw operation based on max bus frequency of 24MHz */ | ||
#define QSPI_COMMON_MAX_FREQUENCY 23000000 | ||
|
||
/* WRSR operations max time [us] (datasheet max time + 15%) */ | ||
#define QSPI_WRSR_MAX_TIME 46000 // 40ms | ||
|
||
/* Write operations max time [us] (datasheet max time + 15%) */ | ||
#define QSPI_PAGE_PROG_MAX_TIME 1000 // 0.75ms | ||
|
||
/* erase operations max time [us] (datasheet max time + 15%) */ | ||
#define QSPI_ERASE_SECTOR_MAX_TIME 460000 // 400 ms | ||
#define QSPI_ERASE_BLOCK_32_MAX_TIME 1150000 // 1s | ||
#define QSPI_ERASE_BLOCK_64_MAX_TIME 2300000 // 2s | ||
|
||
#define EXTENDED_SPI_ENABLE() \ | ||
\ | ||
const int32_t reg_size = QSPI_STATUS_REG_SIZE; \ | ||
uint8_t reg_data[reg_size] = { 0 }; \ | ||
\ | ||
if (read_register(STATUS_REG, reg_data, \ | ||
QSPI_STATUS_REG_SIZE, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
if (write_enable(qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
reg_data[0] = STATUS_BIT_QE; \ | ||
if (write_register(QSPI_CMD_WRSR, reg_data, \ | ||
reg_size, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
WAIT_FOR(WRSR_MAX_TIME, qspi); \ | ||
\ | ||
memset(reg_data, 0, QSPI_STATUS_REG_SIZE); \ | ||
if (read_register(STATUS_REG, reg_data, \ | ||
QSPI_STATUS_REG_SIZE, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
return ((reg_data[0] & STATUS_BIT_QE) != 0 ? \ | ||
QSPI_STATUS_OK : QSPI_STATUS_ERROR) | ||
|
||
|
||
|
||
#define EXTENDED_SPI_DISABLE() \ | ||
\ | ||
const int32_t reg_size = QSPI_STATUS_REG_SIZE; \ | ||
uint8_t reg_data[reg_size] = { 0 }; \ | ||
\ | ||
if (read_register(STATUS_REG, reg_data, \ | ||
QSPI_STATUS_REG_SIZE, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
if (write_enable(qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
reg_data[0] &= ~(STATUS_BIT_QE); \ | ||
\ | ||
if (write_register(QSPI_CMD_WRSR, reg_data, \ | ||
reg_size, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
WAIT_FOR(WRSR_MAX_TIME, qspi); \ | ||
\ | ||
reg_data[0] = 0; \ | ||
if (read_register(STATUS_REG, reg_data, \ | ||
QSPI_STATUS_REG_SIZE, qspi) != QSPI_STATUS_OK) { \ | ||
return QSPI_STATUS_ERROR; \ | ||
} \ | ||
\ | ||
return ((reg_data[0] & STATUS_BIT_QE) == 0 ? \ | ||
QSPI_STATUS_OK : QSPI_STATUS_ERROR) | ||
|
||
#endif // MBED_QSPI_FLASH_CONFIG_H |
This file contains 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
This file contains 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
Oops, something went wrong.