Skip to content

Commit ec72ac0

Browse files
authored
Merge branch 'master' into STM_sha256_F439ZI
2 parents a27498c + e3e54e5 commit ec72ac0

File tree

326 files changed

+45959
-1435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+45959
-1435
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ script:
1313
# not start with lib
1414
- |
1515
find "(" -name "*.a" -or -name "*.ar" ")" -and -not -name "lib*" | tee BUILD/badlibs | sed -e "s/^/Bad library name found: /" && [ ! -s BUILD/badlibs ]
16+
# Assert that all assebler files are named correctly
17+
# The strange command below asserts that there are exactly 0 libraries that do
18+
# end with .s
19+
- |
20+
find -name "*.s" | tee BUILD/badasm | sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ]
1621
- make -C events/equeue test clean
1722
- PYTHONPATH=. python tools/test/config_test/config_test.py
1823
- PYTHONPATH=. python tools/test/build_api/build_api_test.py

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All changes in code base should originate from GitHub Issues and take advantage
55
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.
66

77
## Where to get more information?
8-
You can read more on our [documentation page](https://docs.mbed.com/).
8+
You can read more on our [documentation page](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/cont/contributing/).
99

1010
# How to contribute
1111
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.

cmsis/TOOLCHAIN_IAR/cmain.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
EXTERN exit
4747
EXTERN __iar_dynamic_initialization
4848
EXTERN mbed_sdk_init
49+
EXTERN mbed_main
4950
EXTERN SystemInit
5051

5152
THUMB
@@ -87,6 +88,10 @@ _call_main:
8788
FUNCALL __cmain, __iar_argc_argv
8889
BL __iar_argc_argv ; Maybe setup command line
8990

91+
MOVS r0,#0 ; No parameters
92+
FUNCALL __cmain, mbed_main
93+
BL mbed_main
94+
9095
FUNCALL __cmain, main
9196
BL main
9297
_main:

drivers/BusIn.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "platform/platform.h"
2020
#include "drivers/DigitalIn.h"
2121
#include "platform/PlatformMutex.h"
22+
#include "platform/NonCopyable.h"
2223

2324
namespace mbed {
2425
/** \addtogroup drivers */
@@ -28,7 +29,7 @@ namespace mbed {
2829
* @note Synchronization level: Thread safe
2930
* @ingroup drivers
3031
*/
31-
class BusIn {
32+
class BusIn : private NonCopyable<BusIn> {
3233

3334
public:
3435
/* Group: Configuration Methods */
@@ -115,12 +116,9 @@ class BusIn {
115116

116117
PlatformMutex _mutex;
117118

118-
/* disallow copy constructor and assignment operators */
119119
private:
120120
virtual void lock();
121121
virtual void unlock();
122-
BusIn(const BusIn&);
123-
BusIn & operator = (const BusIn&);
124122
};
125123

126124
} // namespace mbed

drivers/BusInOut.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "drivers/DigitalInOut.h"
2020
#include "platform/PlatformMutex.h"
21+
#include "platform/NonCopyable.h"
2122

2223
namespace mbed {
2324
/** \addtogroup drivers */
@@ -27,7 +28,7 @@ namespace mbed {
2728
* @note Synchronization level: Thread safe
2829
* @ingroup drivers
2930
*/
30-
class BusInOut {
31+
class BusInOut : private NonCopyable<BusInOut> {
3132

3233
public:
3334

@@ -135,11 +136,6 @@ class BusInOut {
135136
int _nc_mask;
136137

137138
PlatformMutex _mutex;
138-
139-
/* disallow copy constructor and assignment operators */
140-
private:
141-
BusInOut(const BusInOut&);
142-
BusInOut & operator = (const BusInOut&);
143139
};
144140

145141
} // namespace mbed

drivers/BusOut.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818

1919
#include "drivers/DigitalOut.h"
2020
#include "platform/PlatformMutex.h"
21+
#include "platform/NonCopyable.h"
2122

2223
namespace mbed {
2324
/** \addtogroup drivers */
2425

2526
/** A digital output bus, used for setting the state of a collection of pins
2627
* @ingroup drivers
2728
*/
28-
class BusOut {
29+
class BusOut : private NonCopyable<BusOut> {
2930

3031
public:
3132

@@ -119,11 +120,6 @@ class BusOut {
119120
int _nc_mask;
120121

121122
PlatformMutex _mutex;
122-
123-
/* disallow copy constructor and assignment operators */
124-
private:
125-
BusOut(const BusOut&);
126-
BusOut & operator = (const BusOut&);
127123
};
128124

129125
} // namespace mbed

drivers/CAN.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "hal/can_api.h"
2424
#include "platform/Callback.h"
2525
#include "platform/PlatformMutex.h"
26+
#include "platform/NonCopyable.h"
2627

2728
namespace mbed {
2829
/** \addtogroup drivers */
@@ -78,7 +79,7 @@ class CANMessage : public CAN_Message {
7879
/** A can bus client, used for communicating with can devices
7980
* @ingroup drivers
8081
*/
81-
class CAN {
82+
class CAN : private NonCopyable<CAN> {
8283

8384
public:
8485
/** Creates an CAN interface connected to specific pins.

drivers/Ethernet.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#define MBED_ETHERNET_H
1818

1919
#include "platform/platform.h"
20+
#include "platform/NonCopyable.h"
2021

2122
#if defined (DEVICE_ETHERNET) || defined(DOXYGEN_ONLY)
2223

@@ -54,7 +55,7 @@ namespace mbed {
5455
* @endcode
5556
* @ingroup drivers
5657
*/
57-
class Ethernet {
58+
class Ethernet : private NonCopyable<Ethernet> {
5859

5960
public:
6061

drivers/FlashIAP.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "flash_api.h"
2828
#include "platform/SingletonPtr.h"
2929
#include "platform/PlatformMutex.h"
30+
#include "platform/NonCopyable.h"
3031

3132
namespace mbed {
3233

@@ -37,7 +38,7 @@ namespace mbed {
3738
* @note Synchronization level: Thread safe
3839
* @ingroup drivers
3940
*/
40-
class FlashIAP {
41+
class FlashIAP : private NonCopyable<FlashIAP> {
4142
public:
4243
FlashIAP();
4344
~FlashIAP();

drivers/I2C.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "hal/i2c_api.h"
2424
#include "platform/SingletonPtr.h"
2525
#include "platform/PlatformMutex.h"
26+
#include "platform/NonCopyable.h"
2627

2728
#if DEVICE_I2C_ASYNCH
2829
#include "platform/CThunk.h"
@@ -53,7 +54,7 @@ namespace mbed {
5354
* @endcode
5455
* @ingroup drivers
5556
*/
56-
class I2C {
57+
class I2C : private NonCopyable<I2C> {
5758

5859
public:
5960
enum RxStatus {

drivers/InterruptIn.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "platform/Callback.h"
2626
#include "platform/mbed_critical.h"
2727
#include "platform/mbed_toolchain.h"
28+
#include "platform/NonCopyable.h"
2829

2930
namespace mbed {
3031
/** \addtogroup drivers */
@@ -56,7 +57,7 @@ namespace mbed {
5657
* @endcode
5758
* @ingroup drivers
5859
*/
59-
class InterruptIn {
60+
class InterruptIn : private NonCopyable<InterruptIn> {
6061

6162
public:
6263

drivers/InterruptManager.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "cmsis.h"
2020
#include "platform/CallChain.h"
2121
#include "platform/PlatformMutex.h"
22+
#include "platform/NonCopyable.h"
2223
#include <string.h>
2324

2425
namespace mbed {
@@ -53,7 +54,7 @@ namespace mbed {
5354
* @endcode
5455
* @ingroup drivers
5556
*/
56-
class InterruptManager {
57+
class InterruptManager : private NonCopyable<InterruptManager> {
5758
public:
5859
/** Get the instance of InterruptManager Class
5960
*
@@ -138,12 +139,6 @@ class InterruptManager {
138139
void lock();
139140
void unlock();
140141

141-
// We declare the copy contructor and the assignment operator, but we don't
142-
// implement them. This way, if someone tries to copy/assign our instance,
143-
// he will get an error at compile time.
144-
InterruptManager(const InterruptManager&);
145-
InterruptManager& operator =(const InterruptManager&);
146-
147142
template<typename T>
148143
pFunctionPointer_t add_common(T *tptr, void (T::*mptr)(void), IRQn_Type irq, bool front=false) {
149144
_mutex.lock();

drivers/LowPowerTicker.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "platform/platform.h"
2020
#include "drivers/Ticker.h"
21+
#include "platform/NonCopyable.h"
2122

2223
#if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY)
2324

@@ -31,7 +32,7 @@ namespace mbed {
3132
* @note Synchronization level: Interrupt safe
3233
* @ingroup drivers
3334
*/
34-
class LowPowerTicker : public Ticker {
35+
class LowPowerTicker : public Ticker, private NonCopyable<LowPowerTicker> {
3536

3637
public:
3738
LowPowerTicker() : Ticker(get_lp_ticker_data()) {

drivers/LowPowerTimeout.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#include "hal/lp_ticker_api.h"
2424
#include "drivers/LowPowerTicker.h"
25+
#include "platform/NonCopyable.h"
2526

2627
namespace mbed {
2728
/** \addtogroup drivers */
@@ -31,7 +32,7 @@ namespace mbed {
3132
* @note Synchronization level: Interrupt safe
3233
* @ingroup drivers
3334
*/
34-
class LowPowerTimeout : public LowPowerTicker {
35+
class LowPowerTimeout : public LowPowerTicker, private NonCopyable<LowPowerTimeout> {
3536

3637
private:
3738
virtual void handler(void) {

drivers/LowPowerTimer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "platform/platform.h"
2020
#include "drivers/Timer.h"
21+
#include "platform/NonCopyable.h"
2122

2223
#if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY)
2324

@@ -31,7 +32,7 @@ namespace mbed {
3132
* @note Synchronization level: Interrupt safe
3233
* @ingroup drivers
3334
*/
34-
class LowPowerTimer : public Timer {
35+
class LowPowerTimer : public Timer, private NonCopyable<LowPowerTimer> {
3536

3637
public:
3738
LowPowerTimer() : Timer(get_lp_ticker_data()) {

drivers/RawSerial.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#include "drivers/SerialBase.h"
2424
#include "hal/serial_api.h"
25+
#include "platform/NonCopyable.h"
2526

2627
namespace mbed {
2728
/** \addtogroup drivers */
@@ -49,7 +50,7 @@ namespace mbed {
4950
* @endcode
5051
* @ingroup drivers
5152
*/
52-
class RawSerial: public SerialBase {
53+
class RawSerial: public SerialBase, private NonCopyable<RawSerial> {
5354

5455
public:
5556
/** Create a RawSerial port, connected to the specified transmit and receive pins, with the specified baud.

drivers/SPI.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "platform/PlatformMutex.h"
2424
#include "hal/spi_api.h"
2525
#include "platform/SingletonPtr.h"
26+
#include "platform/NonCopyable.h"
2627

2728
#if DEVICE_SPI_ASYNCH
2829
#include "platform/CThunk.h"
@@ -72,7 +73,7 @@ namespace mbed {
7273
* @endcode
7374
* @ingroup drivers
7475
*/
75-
class SPI {
76+
class SPI : private NonCopyable<SPI> {
7677

7778
public:
7879

drivers/SPISlave.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#define MBED_SPISLAVE_H
1818

1919
#include "platform/platform.h"
20+
#include "platform/NonCopyable.h"
2021

2122
#if defined (DEVICE_SPISLAVE) || defined(DOXYGEN_ONLY)
2223

@@ -52,7 +53,7 @@ namespace mbed {
5253
* @endcode
5354
* @ingroup drivers
5455
*/
55-
class SPISlave {
56+
class SPISlave : private NonCopyable<SPISlave> {
5657

5758
public:
5859

drivers/Serial.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "SerialBase.h"
2525
#include "PlatformMutex.h"
2626
#include "serial_api.h"
27+
#include "platform/NonCopyable.h"
2728

2829
namespace mbed {
2930
/** \addtogroup drivers */
@@ -49,7 +50,7 @@ namespace mbed {
4950
* @endcode
5051
* @ingroup drivers
5152
*/
52-
class Serial : public SerialBase, public Stream {
53+
class Serial : public SerialBase, public Stream, private NonCopyable<Serial> {
5354

5455
public:
5556
#if DEVICE_SERIAL_ASYNCH

drivers/SerialBase.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "Callback.h"
2424
#include "serial_api.h"
2525
#include "mbed_toolchain.h"
26+
#include "platform/NonCopyable.h"
2627

2728
#if DEVICE_SERIAL_ASYNCH
2829
#include "CThunk.h"
@@ -38,7 +39,7 @@ namespace mbed {
3839
* @note Synchronization level: Set by subclass
3940
* @ingroup drivers
4041
*/
41-
class SerialBase {
42+
class SerialBase : private NonCopyable<SerialBase> {
4243

4344
public:
4445
/** Set the baud rate of the serial port

drivers/Ticker.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "drivers/TimerEvent.h"
2020
#include "platform/Callback.h"
2121
#include "platform/mbed_toolchain.h"
22+
#include "platform/NonCopyable.h"
2223

2324
namespace mbed {
2425
/** \addtogroup drivers */
@@ -59,7 +60,7 @@ namespace mbed {
5960
* @endcode
6061
* @ingroup drivers
6162
*/
62-
class Ticker : public TimerEvent {
63+
class Ticker : public TimerEvent, private NonCopyable<Ticker> {
6364

6465
public:
6566
Ticker() : TimerEvent() {

0 commit comments

Comments
 (0)