pull/172/head
bcostm 2014-02-18 08:19:31 +01:00
commit 636114b4d1
12 changed files with 139 additions and 25 deletions

View File

@ -26,6 +26,7 @@ NXP:
* [LPC1768](http://mbed.org/platforms/mbed-LPC1768/) (Cortex-M3) * [LPC1768](http://mbed.org/platforms/mbed-LPC1768/) (Cortex-M3)
* [LPC1768](http://mbed.org/platforms/u-blox-C027/) (Cortex-M3) * [LPC1768](http://mbed.org/platforms/u-blox-C027/) (Cortex-M3)
* [LPC11U24](http://mbed.org/platforms/mbed-LPC11U24/) (Cortex-M0) * [LPC11U24](http://mbed.org/platforms/mbed-LPC11U24/) (Cortex-M0)
* [LPC11U35](http://mbed.org/platforms/EA-LPC11U35/) (Cortex-M0)
* LPC2368 (ARM7TDMI-S) * LPC2368 (ARM7TDMI-S)
* LPC810 (Cortex-M0+) * LPC810 (Cortex-M0+)
* [LPC812](http://mbed.org/platforms/NXP-LPC800-MAX/) (Cortex-M0+) * [LPC812](http://mbed.org/platforms/NXP-LPC800-MAX/) (Cortex-M0+)

View File

@ -36,7 +36,7 @@
#define TIM_MST_RCC RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE) #define TIM_MST_RCC RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE)
static int us_ticker_inited = 0; static int us_ticker_inited = 0;
static uint32_t SlaveCounter = 0; static volatile uint32_t SlaveCounter = 0;
static uint32_t oc_int_part = 0; static uint32_t oc_int_part = 0;
static uint16_t oc_rem_part = 0; static uint16_t oc_rem_part = 0;

View File

@ -36,7 +36,7 @@
#define TIM_MST_RCC RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE) #define TIM_MST_RCC RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE)
static int us_ticker_inited = 0; static int us_ticker_inited = 0;
static uint32_t SlaveCounter = 0; static volatile uint32_t SlaveCounter = 0;
static uint32_t oc_int_part = 0; static uint32_t oc_int_part = 0;
static uint16_t oc_rem_part = 0; static uint16_t oc_rem_part = 0;

View File

@ -39,7 +39,7 @@
static TIM_HandleTypeDef TimMasterHandle; static TIM_HandleTypeDef TimMasterHandle;
static int us_ticker_inited = 0; static int us_ticker_inited = 0;
static uint32_t SlaveCounter = 0; static volatile uint32_t SlaveCounter = 0;
static uint32_t oc_int_part = 0; static uint32_t oc_int_part = 0;
static uint16_t oc_rem_part = 0; static uint16_t oc_rem_part = 0;

View File

@ -35,7 +35,7 @@
#define TIM_MST_RCC RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM9, ENABLE) #define TIM_MST_RCC RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM9, ENABLE)
static int us_ticker_inited = 0; static int us_ticker_inited = 0;
static uint32_t SlaveCounter = 0; static volatile uint32_t SlaveCounter = 0;
static uint32_t oc_int_part = 0; static uint32_t oc_int_part = 0;
static uint16_t oc_rem_part = 0; static uint16_t oc_rem_part = 0;

View File

@ -0,0 +1,10 @@
#include "mbed.h"
DigitalOut out(p5);
int main() {
while (true) {
out = 1;
out = 0;
}
}

View File

@ -26,20 +26,25 @@ from workspace_tools.build_api import build_mbed_libs
from workspace_tools.targets import TARGET_MAP from workspace_tools.targets import TARGET_MAP
OFFICIAL_MBED_LIBRARY_BUILD = ( OFFICIAL_MBED_LIBRARY_BUILD = (
('KL25Z', ('ARM', 'GCC_ARM')), ('LPC11U24', ('ARM', 'uARM')),
('LPC11U24', ('ARM', 'uARM')), ('LPC1768', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')),
('LPC1768', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')), ('UBLOX_C027', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')),
('LPC2368', ('ARM',)), ('LPC2368', ('ARM',)),
('LPC812', ('uARM',)), ('LPC812', ('uARM',)),
('LPC1347', ('ARM',)), ('LPC1347', ('ARM',)),
('LPC4088', ('ARM', 'GCC_ARM', 'GCC_CR')), ('LPC4088', ('ARM', 'GCC_ARM', 'GCC_CR')),
('LPC1114', ('uARM',)), ('LPC1114', ('uARM',)),
('KL46Z', ('ARM', 'GCC_ARM')),
('LPC11U35_401', ('ARM', 'uARM')), ('LPC11U35_401', ('ARM', 'uARM')),
('NUCLEO_F103RB', ('ARM',)),
# ('NUCLEO_L152RE', ('ARM',)), ('KL25Z', ('ARM', 'GCC_ARM')),
# ('NUCLEO_F401RE', ('ARM',)), ('KL46Z', ('ARM', 'GCC_ARM')),
# ('NUCLEO_F030R8', ('ARM',)),
('NUCLEO_F103RB', ('ARM', 'uARM')),
('NUCLEO_L152RE', ('ARM', 'uARM')),
('NUCLEO_F401RE', ('ARM', 'uARM')),
('NUCLEO_F030R8', ('ARM', 'uARM')),
# ('NRF51822', ('ARM', )),
) )

View File

@ -6,6 +6,7 @@ Exporter Toolchain/Platform Support
<th></th> <th></th>
<th>Code Red</th> <th>Code Red</th>
<th>Code Sourcery</th> <th>Code Sourcery</th>
<th>CoIDE</th>
<th>DS-5</th> <th>DS-5</th>
<th>GCC ARM</th> <th>GCC ARM</th>
<th>IAR</th> <th>IAR</th>
@ -19,11 +20,13 @@ Exporter Toolchain/Platform Support
<td>&#10003;</td> <td>&#10003;</td>
<td>&#10003;</td> <td>&#10003;</td>
<td>&#10003;</td> <td>&#10003;</td>
<td>&#10003;</td>
</tr> </tr>
<tr> <tr>
<td>NXP LPC11U24</td> <td>NXP LPC11U24</td>
<td></td> <td></td>
<td></td> <td></td>
<td></td>
<td>&#10003;</td> <td>&#10003;</td>
<td></td> <td></td>
<td></td> <td></td>
@ -33,6 +36,7 @@ Exporter Toolchain/Platform Support
<td>NXP LPC812</td> <td>NXP LPC812</td>
<td></td> <td></td>
<td></td> <td></td>
<td></td>
<td>&#10003;</td> <td>&#10003;</td>
<td></td> <td></td>
<td></td> <td></td>
@ -43,6 +47,7 @@ Exporter Toolchain/Platform Support
<td>&#10003;</td> <td>&#10003;</td>
<td></td> <td></td>
<td></td> <td></td>
<td></td>
<td>&#10003;</td> <td>&#10003;</td>
<td></td> <td></td>
<td>&#10003;</td> <td>&#10003;</td>
@ -54,6 +59,7 @@ Exporter Toolchain/Platform Support
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td>
<td>&#10003;</td> <td>&#10003;</td>
</tr> </tr>
<tr> <tr>
@ -63,12 +69,34 @@ Exporter Toolchain/Platform Support
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td>
<td>&#10003;</td>
</tr>
<tr>
<td>Freescale KL05Z</td>
<td></td>
<td></td>
<td>&#10003;</td>
<td></td>
<td>&#10003;</td>
<td></td>
<td>&#10003;</td>
</tr>
<tr>
<td>Freescale KL20D5M</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>&#10003;</td> <td>&#10003;</td>
</tr> </tr>
<tr> <tr>
<td>Freescale KL25Z</td> <td>Freescale KL25Z</td>
<td></td> <td></td>
<td></td> <td></td>
<td>&#10003;</td>
<td></td> <td></td>
<td>&#10003;</td> <td>&#10003;</td>
<td></td> <td></td>
@ -79,8 +107,49 @@ Exporter Toolchain/Platform Support
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td>
<td>&#10003;</td> <td>&#10003;</td>
<td></td> <td></td>
<td>&#10003;</td> <td>&#10003;</td>
</tr> </tr>
<tr>
<td>ST Nucleo F030R8</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>&#10003;</td>
</tr>
<tr>
<td>ST Nucleo F103RB</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>&#10003;</td>
</tr>
<tr>
<td>ST Nucleo F401RE</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>&#10003;</td>
<td>&#10003;</td>
</tr>
<tr>
<td>ST Nucleo L152RE</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>&#10003;</td>
</tr>
</table> </table>

View File

@ -167,20 +167,30 @@ if __name__ == '__main__':
if options.disk: if options.disk:
# Simple copy to the mbed disk # Simple copy to the mbed disk
copy(bin, options.disk) copy(bin, options.disk)
if options.nrfjprog: if options.nrfjprog:
#Convert bin to Hex and Program nrf chip via jlink #Convert bin to Hex and Program nrf chip via jlink
call(["nrfjprog","-e","--program",bin.replace(".bin", ".hex"),"--verify","-p"]) call(["nrfjprog","-e","--program",bin.replace(".bin", ".hex"),"--verify"])
if options.serial: if options.serial:
# Import pyserial: https://pypi.python.org/pypi/pyserial # Import pyserial: https://pypi.python.org/pypi/pyserial
from serial import Serial from serial import Serial
sleep(target.program_cycle_s()) sleep(target.program_cycle_s())
serial = Serial(options.serial, timeout = 1) serial = Serial(options.serial, timeout = 1)
if options.baud: if options.baud:
serial.setBaudrate(options.baud) serial.setBaudrate(options.baud)
serial.flushInput() serial.flushInput()
serial.flushOutput() serial.flushOutput()
serial.sendBreak()
if options.nrfjprog:
call(["nrfjprog", "-r"])
elif mcu.startswith('NUCLEO'):
call(["ST-LINK_CLI.exe", "-Rst"])
else:
serial.sendBreak()
while True: while True:
c = serial.read(512) c = serial.read(512)

View File

@ -77,6 +77,8 @@ class LPC1768(Target):
class LPC11U24(Target): class LPC11U24(Target):
ONLINE_TOOLCHAIN = "uARM"
def __init__(self): def __init__(self):
Target.__init__(self) Target.__init__(self)
@ -151,6 +153,8 @@ class K20D5M(Target):
class LPC812(Target): class LPC812(Target):
ONLINE_TOOLCHAIN = "uARM"
def __init__(self): def __init__(self):
Target.__init__(self) Target.__init__(self)
@ -164,6 +168,8 @@ class LPC812(Target):
class LPC810(Target): class LPC810(Target):
ONLINE_TOOLCHAIN = "uARM"
def __init__(self): def __init__(self):
Target.__init__(self) Target.__init__(self)
@ -266,6 +272,7 @@ class STM32F407(Target):
class NUCLEO_F103RB(Target): class NUCLEO_F103RB(Target):
ONLINE_TOOLCHAIN = "uARM"
OUTPUT_NAMING = "8.3" OUTPUT_NAMING = "8.3"
def __init__(self): def __init__(self):
@ -279,6 +286,7 @@ class NUCLEO_F103RB(Target):
class NUCLEO_L152RE(Target): class NUCLEO_L152RE(Target):
ONLINE_TOOLCHAIN = "uARM"
OUTPUT_NAMING = "8.3" OUTPUT_NAMING = "8.3"
def __init__(self): def __init__(self):
@ -292,6 +300,7 @@ class NUCLEO_L152RE(Target):
class NUCLEO_F401RE(Target): class NUCLEO_F401RE(Target):
ONLINE_TOOLCHAIN = "uARM"
OUTPUT_NAMING = "8.3" OUTPUT_NAMING = "8.3"
def __init__(self): def __init__(self):
@ -305,6 +314,7 @@ class NUCLEO_F401RE(Target):
class NUCLEO_F030R8(Target): class NUCLEO_F030R8(Target):
ONLINE_TOOLCHAIN = "uARM"
OUTPUT_NAMING = "8.3" OUTPUT_NAMING = "8.3"
def __init__(self): def __init__(self):
@ -329,6 +339,8 @@ class LPC1347(Target):
class LPC1114(Target): class LPC1114(Target):
ONLINE_TOOLCHAIN = "uARM"
def __init__(self): def __init__(self):
Target.__init__(self) Target.__init__(self)
@ -351,6 +363,8 @@ class LPC11C24(Target):
class LPC11U35_401(Target): class LPC11U35_401(Target):
ONLINE_TOOLCHAIN = "uARM"
def __init__(self): def __init__(self):
Target.__init__(self) Target.__init__(self)
@ -367,18 +381,18 @@ class UBLOX_C027(Target):
self.core = "Cortex-M3" self.core = "Cortex-M3"
self.extra_labels = ['NXP', 'LPC176X', 'UBLOX_C027'] self.extra_labels = ['NXP', 'LPC176X']
self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"] self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"]
class NRF51822(Target): class NRF51822(Target):
OUTPUT_EXT = '.hex'
EXPECTED_SOFTDEVICE = 's110_nrf51822_6.0.0_softdevice.hex' EXPECTED_SOFTDEVICE = 's110_nrf51822_6.0.0_softdevice.hex'
UICR_START = 0x10001000 UICR_START = 0x10001000
APPCODE_OFFSET = 0x14000 APPCODE_OFFSET = 0x14000
OUTPUT_EXT = '.hex'
def __init__(self): def __init__(self):
Target.__init__(self) Target.__init__(self)

View File

@ -422,7 +422,12 @@ TESTS = [
"source_dir": join(TEST_DIR, "mbed", "pwm_led"), "source_dir": join(TEST_DIR, "mbed", "pwm_led"),
"dependencies": [MBED_LIBRARIES], "dependencies": [MBED_LIBRARIES],
}, },
{
"id": "MBED_32", "description": "Pin toggling",
"source_dir": join(TEST_DIR, "mbed", "pin_toggling"),
"dependencies": [MBED_LIBRARIES],
},
# CMSIS RTOS tests # CMSIS RTOS tests
{ {
"id": "CMSIS_RTOS_1", "description": "Basic", "id": "CMSIS_RTOS_1", "description": "Basic",

View File

@ -43,7 +43,7 @@ class ARM(mbedToolchain):
main_cc = join(ARM_BIN, "armcc") main_cc = join(ARM_BIN, "armcc")
common = ["-c", common = ["-c",
"--cpu=%s" % cpu, "--gnu", "--cpu=%s" % cpu, "--gnu",
"-Ospace", "--split_sections", "--apcs=interwork", "-O3", "-Otime", "--split_sections", "--apcs=interwork",
"--brief_diagnostics", "--restrict" "--brief_diagnostics", "--restrict"
] ]