Skip to content

Commit 05a57dc

Browse files
author
Jamie Smith
authored
Replace REDLINK upload method with LINKSERVER (#186)
* Replace REDLINK upload method with LINKSERVER * Fix sleep test failure on MIMXRT, fix failure to debug * Remove no longer needed XML files
1 parent 86723f7 commit 05a57dc

File tree

16 files changed

+119
-196
lines changed

16 files changed

+119
-196
lines changed

hal/tests/TESTS/mbed_hal/reset_reason/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ if(NOT "DEVICE_RESET_REASON=1" IN_LIST MBED_TARGET_DEFINITIONS)
55
set(TEST_SKIPPED "Reset Reason is not supported for this target")
66
endif()
77

8+
if("TARGET_MIMXRT105X" IN_LIST MBED_TARGET_DEFINITIONS)
9+
# This test causes this target to die. See https://github.com/mbed-ce/mbed-os/issues/83
10+
set(TEST_SKIPPED "Temporarily disabled for this target, see #83")
11+
endif()
12+
813
mbed_greentea_add_test(
914
TEST_NAME
1015
mbed-hal-reset-reason

hal/tests/TESTS/mbed_hal/rtc_reset/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if(NOT "DEVICE_RTC=1" IN_LIST MBED_TARGET_DEFINITIONS)
55
set(TEST_SKIPPED "RTC is not supported for this target")
66
endif()
77

8-
if(MBED_TARGET STREQUAL "MIMXRT1050_EVK")
8+
if("TARGET_MIMXRT105X" IN_LIST MBED_TARGET_DEFINITIONS)
99
# This test causes this target to die. See https://github.com/mbed-ce/mbed-os/issues/83
1010
set(TEST_SKIPPED "Temporarily disabled for this target, see #83")
1111
endif()

hal/tests/TESTS/mbed_hal/sleep/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ void deepsleep_high_speed_clocks_turned_off_test()
192192
/* High freqency ticker should be disabled in deep-sleep mode. We expect that time difference between
193193
* ticker reads before and after the sleep represents only code execution time between calls.
194194
* Since we went to sleep for about 20 ms check if time counted by high frequency timer does not
195-
* exceed 1 ms.
195+
* exceed the deep sleep enter/exit time.
196196
*/
197197
const unsigned int us_ticks_diff = (us_ticks_before_sleep <= us_ticks_after_sleep) ? (us_ticks_after_sleep - us_ticks_before_sleep) : (us_ticker_mask - us_ticks_before_sleep + us_ticks_after_sleep + 1);
198198

199-
TEST_ASSERT_UINT32_WITHIN(1000, 0, ticks_to_us(us_ticks_diff, us_ticker_freq));
199+
TEST_ASSERT_UINT32_WITHIN(DEEP_SLEEP_TOLERANCE_US, 0, ticks_to_us(us_ticks_diff, us_ticker_freq));
200200

201201
sprintf(info, "Delta ticks: %u, Ticker width: %u, Expected wake up tick: %" PRIu32 ", Actual wake up tick: %d\n",
202202
us_to_ticks(deepsleep_mode_delta_us, lp_ticker_freq), lp_ticker_width, wakeup_time, lp_ticks_after_sleep);

hal/tests/TESTS/mbed_hal/sleep/sleep_test_utils.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
*/
4646
#define SERIAL_FLUSH_TIME_MS 150
4747

48+
// Tolerance for extra sleep time in the deep sleep test.
49+
// This accounts for the time that the processor spends going to sleep and waking up.
50+
// The hal_deepsleep() docs specify this to be less than 10ms
51+
// Current leader is the MIMXRT105x, which takes almost 6ms to enter/exit deep sleep.
52+
#define DEEP_SLEEP_TOLERANCE_US 6000ULL
53+
4854
#define US_PER_S 1000000
4955

5056
unsigned int ticks_to_us(unsigned int ticks, unsigned int freq)

hal/tests/TESTS/mbed_hal/sleep_manager/main.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131

3232
#define SLEEP_DURATION_US 50000ULL
3333

34-
// Tolerance for extra sleep time in the deep sleep test.
35-
// This accounts for the time that the processor spends going to sleep and waking up.
36-
// The hal_deepsleep() docs specify this to be less than 10ms
37-
// Current leader is the MIMXRT105x, which takes almost 5ms to enter/exit deep sleep.
38-
#define DEEP_SLEEP_TOLERANCE_US 5000ULL
39-
4034
#define DEEP_SLEEP_TEST_CHECK_WAIT_US 2000
4135
// As sleep_manager_can_deep_sleep_test_check() is based on wait_ns
4236
// and wait_ns can be up to 40% slower, use a 50% delta here.

targets/upload_method_cfg/MIMXRT1050_EVK.cmake

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,8 @@ set(PYOCD_UPLOAD_ENABLED TRUE)
1717
set(PYOCD_TARGET_NAME mimxrt1050_hyperflash) # Note: change to "mimxrt1050_quadspi" if onboard QSPI flash is used
1818
set(PYOCD_CLOCK_SPEED 4000k)
1919

20-
# Config options for REDLINK
20+
# Config options for LINKSERVER
2121
# -------------------------------------------------------------
22-
set(REDLINK_UPLOAD_ENABLED TRUE)
23-
set(REDLINK_PART_NUMBER MIMXRT1052xxxxB)
24-
set(REDLINK_PART_XML_DIR ${CMAKE_CURRENT_LIST_DIR}/redlink_cfgs)
25-
set(REDLINK_CLOCK_SPEED 4000)
26-
set(REDLINK_CONNECT_ARGS
27-
--connectscript=RT1050_connect.scp
28-
--reset=
29-
--coreindex 0
30-
--cache disable
31-
--no-packed)
22+
set(LINKSERVER_UPLOAD_ENABLED TRUE)
23+
# note: might need to change the below to MIMXRT1052xxxxx:EVK-IMXRT1050 if you have an EVK rev A
24+
set(LINKSERVER_DEVICE MIMXRT1052xxxxB:EVKB-IMXRT1050)

targets/upload_method_cfg/MIMXRT1060_EVK.cmake

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,7 @@ set(PYOCD_UPLOAD_ENABLED TRUE)
2727
set(PYOCD_TARGET_NAME mimxrt1060) # Note: This seems to use QSPI. There does not seem to be a pyocd equivalent for hyperflash.
2828
set(PYOCD_CLOCK_SPEED 4000k)
2929

30-
# Config options for REDLINK
30+
# Config options for LINKSERVER
3131
# -------------------------------------------------------------
32-
set(REDLINK_UPLOAD_ENABLED TRUE)
33-
set(REDLINK_PART_NUMBER MIMXRT1062xxxxA)
34-
set(REDLINK_PART_XML_DIR ${CMAKE_CURRENT_LIST_DIR}/redlink_cfgs)
35-
set(REDLINK_CLOCK_SPEED 4000)
36-
set(REDLINK_CONNECT_ARGS
37-
--connectscript=RT1060_connect.scp
38-
--reset=
39-
--coreindex 0
40-
--cache disable
41-
--no-packed)
32+
set(LINKSERVER_UPLOAD_ENABLED TRUE)
33+
set(LINKSERVER_DEVICE MIMXRT1062xxxxx:MIMXRT1060-EVKB)

targets/upload_method_cfg/redlink_cfgs/MIMXRT1052xxxxB.xml

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

targets/upload_method_cfg/redlink_cfgs/MIMXRT1052xxxxB_part.xml

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

targets/upload_method_cfg/redlink_cfgs/MIMXRT1062xxxxA.xml

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

0 commit comments

Comments
 (0)