Skip to content

Commit 08df7ac

Browse files
Add initial Mbed CE support for Ambiq Apollo3 (#469)
* Upgrade Ambiq Apollo3 linker script * Add PYOCD, fix conflict between RAM and RAM vectors that was making boot fail * Add pre-sync delay, fixing inability for greentea to work on Ambiq Apollo3 * Start on sync predelay option * Tests passing on Artemis! There was some missing undocumented lp ticker behavior, I added docs and tests for it. * Add J-Link * Typo * Fix some CI issues
1 parent 7b11671 commit 08df7ac

File tree

33 files changed

+364
-1512
lines changed

33 files changed

+364
-1512
lines changed

connectivity/drivers/ble/FEATURE_BLE/TARGET_Ambiq_Micro/hal/apollo3/hci_drv_apollo3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ HciDrvRadioBoot(bool bColdBoot)
511511
CRITICAL_PRINT("INTEN: %d\n", BLEIF->INTEN_b.BLECSSTAT);
512512
CRITICAL_PRINT("INTENREG: %d\n", BLEIF->INTEN);
513513

514-
NVIC_SetVector(BLE_IRQn, HciDrvIntService);
514+
NVIC_SetVector(BLE_IRQn, (uint32_t)HciDrvIntService);
515515
NVIC_EnableIRQ(BLE_IRQn);
516516

517517
//

extern/greentea-client/mbed_lib.json5

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
// Config file for Mbed's Greentea unit test runner
3+
"name": "greentea-client",
4+
5+
// Config options
6+
"config": {
7+
"sync-predelay": {
8+
"help": "Wait this amount of time (in floating point seconds) after opening the serial port before sending sync.",
9+
"value": null
10+
},
11+
},
12+
13+
// Per-target overrides
14+
"target_overrides": {
15+
"AMA3B1KK": {
16+
// These boards have the serial port DTR line tied to the MCU reset, so the MCU will restart when
17+
// the serial port is opened. It appears that if there is serial port activity within 200ms of opening the port
18+
// (see here https://github.com/sparkfun/Apollo3_Uploader_SVL/blob/fc89de7f8163fe755021ca88e779e2963209e5a6/bootloader/src/main.c#L330)
19+
// the MCU will get stuck in the bootloader and not boot. Based on testing, we need to wait about 300ms
20+
// for the MCU to fully boot and be ready to accept the sync word.
21+
"sync-predelay": 0.3
22+
}
23+
}
24+
}

features/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
# List of all features libraries available.
55
add_library(mbed-fpga-ci-test-shield INTERFACE)
66
add_library(mbed-client-cli INTERFACE)
7-
add_library(mbed-unity STATIC EXCLUDE_FROM_ALL)
8-
add_library(mbed-utest STATIC EXCLUDE_FROM_ALL)
97

108
add_subdirectory(frameworks/COMPONENT_FPGA_CI_TEST_SHIELD)
119
add_subdirectory(frameworks/mbed-client-cli)
12-
add_subdirectory(frameworks/unity)
13-
add_subdirectory(frameworks/utest)
14-
add_subdirectory(frameworks/mbed-greentea-io)
1510
add_subdirectory(frameworks/cy_rtos_rtx_adapter)
11+
12+
if(MBED_ENABLE_TESTING)
13+
add_library(mbed-unity STATIC EXCLUDE_FROM_ALL)
14+
add_library(mbed-utest STATIC EXCLUDE_FROM_ALL)
15+
add_subdirectory(frameworks/unity)
16+
add_subdirectory(frameworks/utest)
17+
add_subdirectory(frameworks/mbed-greentea-io)
18+
endif()

features/deprecated_warnings/FEATURE_LWIP/feature_lwip_is_deprecated.c

Lines changed: 0 additions & 27 deletions
This file was deleted.

features/deprecated_warnings/FEATURE_NANOSTACK/feature_nanostack_is_deprecated.c

Lines changed: 0 additions & 27 deletions
This file was deleted.

features/frameworks/greentea-client/CMakeLists.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

features/frameworks/greentea-client/README.md

Lines changed: 0 additions & 94 deletions
This file was deleted.

features/frameworks/greentea-client/greentea-client/greentea_metrics.h

Lines changed: 0 additions & 40 deletions
This file was deleted.

features/frameworks/greentea-client/greentea-client/test_env.h

Lines changed: 0 additions & 129 deletions
This file was deleted.

features/frameworks/greentea-client/mbed_lib.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)