Skip to content

Commit 62a585d

Browse files
committed
Merge branch 'master' of https://github.com/mbedmicro/mbed
Conflicts: workspace_tools/tests.py
2 parents e1cd545 + 7a1d25e commit 62a585d

File tree

307 files changed

+42596
-10783
lines changed

Some content is hidden

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

307 files changed

+42596
-10783
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ NXP:
3030
* [mbed LPC11U24](http://developer.mbed.org/platforms/mbed-LPC11U24/) (Cortex-M0)
3131
* [EA LPC11U35](http://developer.mbed.org/platforms/EA-LPC11U35/) (Cortex-M0)
3232
* mbed LPC2368 (ARM7TDMI-S)
33+
* LPC2460 (ARM7TDMI-S)
3334
* LPC810 (Cortex-M0+)
3435
* [LPC812](http://developer.mbed.org/platforms/NXP-LPC800-MAX/) (Cortex-M0+)
3536
* [EA LPC4088](http://developer.mbed.org/platforms/EA-LPC4088/) (Cortex-M4F)
@@ -85,6 +86,13 @@ Nordic:
8586
Renesas:
8687
* [RZ-A1H](http://developer.mbed.org/platforms/Renesas-GR-PEACH/) (Cortex-A9)
8788

89+
Silicon Labs:
90+
* [EFM32 Zero Gecko] (https://developer.mbed.org/platforms/EFM32-Zero-Gecko/) (Cortex-M0+)
91+
* [EFM32 Happy Gecko] (https://developer.mbed.org/platforms/EFM32-Happy-Gecko/) (Cortex-M0+)
92+
* [EFM32 Leopard Gecko] (https://developer.mbed.org/platforms/EFM32-Leopard-Gecko/) (Cortex-M3)
93+
* [EFM32 Giant Gecko] (https://developer.mbed.org/platforms/EFM32-Giant-Gecko/) (Cortex-M3)
94+
* [EFM32 Wonder Gecko] (https://developer.mbed.org/platforms/EFM32-Wonder-Gecko/) (Cortex-M4)
95+
8896

8997
Supported Toolchains and IDEs
9098
-----------------------------

docs/BUILDING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Build successes:
236236
Above command will build mbed SDK for [LPC1768](http://developer.mbed.org/platforms/mbed-LPC1768/) platform using ARM compiler.
237237

238238
Let's have a look at directory structure under ```mbed/build/```. We can see for ```LPC1768``` new directory ```TARGET_LPC1768``` was created. This directory contains all build primitives.
239-
Directory ```mbed/TARGET_LPC1768/TOOLCHAIN_ARM_STD/``` conteins mbed SDK library ```mbed.ar```. This directory structure also stores all needed headers which you should use with ```mbed.ar``` when building your own software.
239+
Directory ```mbed/TARGET_LPC1768/TOOLCHAIN_ARM_STD/``` contains mbed SDK library ```mbed.ar```. This directory structure also stores all needed headers which you should use with ```mbed.ar``` when building your own software.
240240
```
241241
$ tree ./mbed/build/
242242
Folder PATH listing
@@ -406,14 +406,14 @@ C:\Work\mbed\libraries\mbed\targets\cmsis\TARGET_NXP\TARGET_LPC176X\TOOLCHAIN_GC
406406
...
407407
```
408408

409-
## CppUCheck analysis
409+
## CppCheck analysis
410410
[Cppcheck](http://cppcheck.sourceforge.net/) is a static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. The goal is to detect only real errors in the code (i.e. have zero false positives).
411411

412412
Prerequisites:
413413
* Please install ```CppCheck``` on your system before you want to use it with build scripts.
414414
* You should also add Cppcheck to your system path.
415415

416-
```build.py``` script supports switching between compilation and building and just static code analysis testing. You can use switch ```--cppcheck``` to perform CppCheck static code analysis.
416+
```build.py``` script supports switching between compilation, building and just static code analysis testing. You can use switch ```--cppcheck``` to perform CppCheck static code analysis.
417417

418418
* When you are using --cppcheck switch all macros, toolchain dependencies etc. are preserved so you are sure you are checking exactly the same code you would compile for your application.
419419

@@ -427,8 +427,8 @@ $ python build.py -t uARM -m NUCLEO_F334R8 --cppcheck
427427
```
428428

429429
# make.py script
430-
```make.pt``` is a ```mbed/workspace_tools/``` script used to build tests (we call them sometimes 'programs') one by one manually. Script allows you to flash board with test and execute it. This is deprecated functionality and will not be described here. Instead please use ```singletest.py``` file to build mbed SDK, tests and run automation for test cases included in ```mbedmicro/mbed```.
431-
Note: ```make.py``` script depends on existing already built mked SDK and library sources so you need to pre-build mbed SDK and for example RTOS library to link 'program' (test) with mebd SDK and RTOS library. To pre-build mbed SDK please use ```build.py``` script.
430+
```make.py``` is a ```mbed/workspace_tools/``` script used to build tests (we call them sometimes 'programs') one by one manually. This script allows you to flash board, execute and test it. However, this script is deprecated and will not be described here. Instead please use ```singletest.py``` file to build mbed SDK, tests and run automation for test cases included in ```mbedmicro/mbed```.
431+
Note: ```make.py``` script depends on existing already built mbed SDK and library sources so you need to pre-build mbed SDK and other libraries (such as RTOS library) to link 'program' (test) with mbed SDK and RTOS library. To pre-build mbed SDK please use ```build.py``` script.
432432

433433
Just for sake of example please see few ways to use ```make.py``` together with Freedom K64F board.
434434

libraries/USBDevice/USBDevice/USBEndpoints.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef enum {
3737
} EP_STATUS;
3838

3939
/* Include configuration for specific target */
40-
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC4088_DM)
40+
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC2460) || defined(TARGET_LPC4088_DM)
4141
#include "USBEndpoints_LPC17_LPC23.h"
4242
#elif defined(TARGET_LPC11UXX) || defined(TARGET_LPC1347) || defined (TARGET_LPC11U6X) || defined (TARGET_LPC1549)
4343
#include "USBEndpoints_LPC11U.h"

libraries/USBDevice/USBDevice/USBEndpoints_Maxim.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585
#define EPINT_IN (EP4IN)
8686
#define EPINT_OUT_callback EP3_OUT_callback
8787
#define EPINT_IN_callback EP4_IN_callback
88+
/* Isochronous endpoints */
89+
/* NOT SUPPORTED - use invalid endpoint number to prevent built errors */
90+
#define EPISO_OUT (EP0OUT)
91+
#define EPISO_IN (EP0IN)
8892

8993
#define MAX_PACKET_SIZE_EPBULK (64)
9094
#define MAX_PACKET_SIZE_EPINT (64)

libraries/USBDevice/USBDevice/USBHAL_LPC17.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1717
*/
1818

19-
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
19+
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC2460)
2020

2121
#include "USBHAL.h"
2222

libraries/USBDevice/USBDevice/USBHAL_STM32F4.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ USBHAL::USBHAL(void) {
4848
// Enable power and clocking
4949
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
5050

51-
#if defined(TARGET_STM32F407VG) || defined(TARGET_STM32F401RE) || defined(TARGET_STM32F411RE)
51+
#if defined(TARGET_STM32F407VG) || defined(TARGET_STM32F401RE) || defined(TARGET_STM32F411RE) || defined(TARGET_STM32F429ZI)
5252
pin_function(PA_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF10_OTG_FS));
5353
pin_function(PA_9, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLDOWN, GPIO_AF10_OTG_FS));
5454
pin_function(PA_10, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS));

libraries/USBHost/USBHost/USBHALHost_LPC17.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
#if defined(TARGET_LPC1768)
17+
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2460)
1818

1919
#include "mbed.h"
2020
#include "USBHALHost.h"

libraries/mbed/api/SPI.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,21 @@ namespace mbed {
4545
*
4646
* #include "mbed.h"
4747
*
48+
* // hardware ssel (where applicable)
49+
* //SPI device(p5, p6, p7, p8); // mosi, miso, sclk, ssel
50+
*
51+
* // software ssel
4852
* SPI device(p5, p6, p7); // mosi, miso, sclk
53+
* DigitalOut cs(p8); // ssel
4954
*
5055
* int main() {
56+
* // hardware ssel (where applicable)
57+
* //int response = device.write(0xFF);
58+
*
59+
* // software ssel
60+
* cs = 0;
5161
* int response = device.write(0xFF);
62+
* cs = 1;
5263
* }
5364
* @endcode
5465
*/
@@ -57,17 +68,15 @@ class SPI {
5768
public:
5869

5970
/** Create a SPI master connected to the specified pins
60-
*
61-
* Pin Options:
62-
* (5, 6, 7) or (11, 12, 13)
6371
*
6472
* mosi or miso can be specfied as NC if not used
6573
*
6674
* @param mosi SPI Master Out, Slave In pin
6775
* @param miso SPI Master In, Slave Out pin
6876
* @param sclk SPI Clock pin
77+
* @param ssel SPI chip select pin
6978
*/
70-
SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused=NC);
79+
SPI(PinName mosi, PinName miso, PinName sclk, PinName ssel=NC);
7180

7281
/** Configure the data transmission format
7382
*

libraries/mbed/api/SPISlave.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,13 @@ class SPISlave {
5353
public:
5454

5555
/** Create a SPI slave connected to the specified pins
56-
*
57-
* Pin Options:
58-
* (5, 6, 7i, 8) or (11, 12, 13, 14)
5956
*
6057
* mosi or miso can be specfied as NC if not used
6158
*
6259
* @param mosi SPI Master Out, Slave In pin
6360
* @param miso SPI Master In, Slave Out pin
6461
* @param sclk SPI Clock pin
6562
* @param ssel SPI chip select pin
66-
* @param name (optional) A string to identify the object
6763
*/
6864
SPISlave(PinName mosi, PinName miso, PinName sclk, PinName ssel);
6965

libraries/mbed/api/Ticker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Ticker : public TimerEvent {
6060
Ticker() : TimerEvent() {
6161
}
6262

63-
Ticker(const ticker_data_t *const data) : TimerEvent(data) {
63+
Ticker(const ticker_data_t *data) : TimerEvent(data) {
6464
}
6565

6666
/** Attach a function to be called by the Ticker, specifiying the interval in seconds

libraries/mbed/api/Timer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Timer {
4646

4747
public:
4848
Timer();
49-
Timer(const ticker_data_t *const data);
49+
Timer(const ticker_data_t *data);
5050

5151
/** Start the timer
5252
*/
@@ -83,7 +83,7 @@ class Timer {
8383
int _running; // whether the timer is running
8484
unsigned int _start; // the start time of the latest slice
8585
int _time; // any accumulated time from previous slices
86-
const ticker_data_t *const _ticker_data;
86+
const ticker_data_t *_ticker_data;
8787
};
8888

8989
} // namespace mbed

libraries/mbed/api/TimerEvent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class TimerEvent {
4747

4848
ticker_event_t event;
4949

50-
const ticker_data_t *const _ticker_data;
50+
const ticker_data_t *_ticker_data;
5151
};
5252

5353
} // namespace mbed

libraries/mbed/api/mbed.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#ifndef MBED_H
1717
#define MBED_H
1818

19-
#define MBED_LIBRARY_VERSION 98
19+
#define MBED_LIBRARY_VERSION 100
2020

2121
#include "platform.h"
2222

libraries/mbed/common/SPI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace mbed {
2323
CircularBuffer<Transaction<SPI>, TRANSACTION_QUEUE_SIZE_SPI> SPI::_transaction_buffer;
2424
#endif
2525

26-
SPI::SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused) :
26+
SPI::SPI(PinName mosi, PinName miso, PinName sclk, PinName ssel) :
2727
_spi(),
2828
#if DEVICE_SPI_ASYNCH
2929
_irq(this),
@@ -32,7 +32,7 @@ SPI::SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused) :
3232
_bits(8),
3333
_mode(0),
3434
_hz(1000000) {
35-
spi_init(&_spi, mosi, miso, sclk, NC);
35+
spi_init(&_spi, mosi, miso, sclk, ssel);
3636
spi_format(&_spi, _bits, _mode, 0);
3737
spi_frequency(&_spi, _hz);
3838
}

libraries/mbed/common/Timer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Timer::Timer() : _running(), _start(), _time(), _ticker_data(get_us_ticker_data(
2323
reset();
2424
}
2525

26-
Timer::Timer(const ticker_data_t *const data) : _running(), _start(), _time(), _ticker_data(data) {
26+
Timer::Timer(const ticker_data_t *data) : _running(), _start(), _time(), _ticker_data(data) {
2727
reset();
2828
}
2929

libraries/mbed/targets/cmsis/TARGET_Maxim/TARGET_MAX32600/system_max32600.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void SystemInit(void)
115115
{
116116
set_pwr_regs();
117117

118-
// enable instruction cache
118+
// Enable instruction cache
119119
ICC_Enable();
120120

121121
low_level_init();
@@ -135,9 +135,16 @@ void SystemInit(void)
135135
MXC_F_PWRMAN_PWR_RST_CTRL_IO_ACTIVE |
136136
MXC_F_PWRMAN_PWR_RST_CTRL_PULLUPS_ENABLED);
137137

138+
// Clear the first boot flag. Use low_level_init() if special handling is required.
139+
MXC_PWRSEQ->reg0 &= ~MXC_F_PWRSEQ_REG0_PWR_FIRST_BOOT;
140+
141+
// Enable the regulator
138142
MXC_PWRSEQ->reg0 |= MXC_F_PWRSEQ_REG0_PWR_CHZYEN_RUN;
139143

140-
// set systick to the RTC input 32.768kHz clock, not system clock; this is needed to keep JTAG alive during sleep
144+
// Mask all wakeups
145+
MXC_PWRSEQ->msk_flags = 0xFFFFFFFF;
146+
147+
// Set systick to the RTC input 32.768kHz clock, not system clock; this is needed to keep JTAG alive during sleep
141148
MXC_CLKMAN->clk_ctrl |= MXC_F_CLKMAN_CLK_CTRL_RTOS_MODE;
142149

143150
SystemCoreClockUpdate();

libraries/mbed/targets/cmsis/TARGET_Maxim/TARGET_MAX32610/system_max32610.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void SystemInit(void)
118118
// Turn off PADX
119119
MXC_IOMAN->padx_control = 0x00000441;
120120

121-
// enable instruction cache
121+
// Enable instruction cache
122122
ICC_Enable();
123123

124124
low_level_init();
@@ -138,9 +138,16 @@ void SystemInit(void)
138138
MXC_F_PWRMAN_PWR_RST_CTRL_IO_ACTIVE |
139139
MXC_F_PWRMAN_PWR_RST_CTRL_PULLUPS_ENABLED);
140140

141+
// Clear the first boot flag. Use low_level_init() if special handling is required.
142+
MXC_PWRSEQ->reg0 &= ~MXC_F_PWRSEQ_REG0_PWR_FIRST_BOOT;
143+
144+
// Enable the regulator
141145
MXC_PWRSEQ->reg0 |= MXC_F_PWRSEQ_REG0_PWR_CHZYEN_RUN;
142146

143-
// set systick to the RTC input 32.768kHz clock, not system clock; this is needed to keep JTAG alive during sleep
147+
// Mask all wakeups
148+
MXC_PWRSEQ->msk_flags = 0xFFFFFFFF;
149+
150+
// Set systick to the RTC input 32.768kHz clock, not system clock; this is needed to keep JTAG alive during sleep
144151
MXC_CLKMAN->clk_ctrl |= MXC_F_CLKMAN_CLK_CTRL_RTOS_MODE;
145152

146153
SystemCoreClockUpdate();

0 commit comments

Comments
 (0)