Skip to content

Commit 1e1ba7f

Browse files
committed
change the USB port to HS
1 parent d47664b commit 1e1ba7f

File tree

447 files changed

+48228
-2195
lines changed

Some content is hidden

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

447 files changed

+48228
-2195
lines changed

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
2. 2019-01-18: The first version that can be compiled.
1212
3. 2019-01-21: Add simple support for STM32F407.
1313
4. 2019-01-24: Add USB serial device support.
14+
5. 2019-01-28: update mbed-os to commit id: daefce6bf496819b3a255357b3910cd1f2ae4bd0
1415

1516
# Development support #
1617

‎mbed/build/mbed-ignore.mk‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ MBED_IGNORE += $(MBED_SRC_ROOT)/features/frameworks/%
77
MBED_IGNORE += $(MBED_SRC_ROOT)/events/equeue/tests/%
88
MBED_IGNORE += $(MBED_SRC_ROOT)/features/unsupported/%
99
MBED_IGNORE += $(MBED_SRC_ROOT)/features/nanostack/%
10-
MBED_IGNORE += $(MBED_SRC_ROOT)/components/storage/%
10+
MBED_IGNORE += $(MBED_SRC_ROOT)/components/storage/blockdevice/COMPONENT_DATAFLASH%
11+
MBED_IGNORE += $(MBED_SRC_ROOT)/components/storage/blockdevice/COMPONENT_FLASHIAP%
12+
MBED_IGNORE += $(MBED_SRC_ROOT)/components/storage/blockdevice/COMPONENT_QSPIF%
13+
MBED_IGNORE += $(MBED_SRC_ROOT)/components/storage/blockdevice/COMPONENT_RSPIF%
14+
MBED_IGNORE += $(MBED_SRC_ROOT)/components/storage/blockdevice/COMPONENT_SPIF%
1115
MBED_IGNORE += $(MBED_SRC_ROOT)/tools/%
1216

1317
# Ignore a few more folders when building the single threaded mbed 2 library.

‎mbed/mbed-os/.travis.yml‎

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ matrix:
8585
- doxygen doxyfile_options 2>&1
8686
# Once Mbed OS has been fixed, enable the full test by replacing the top line with this:
8787
# - ( ! doxygen doxyfile_options 2>&1 | grep . )
88-
8988
# Assert that all binary libraries are named correctly
9089
# The strange command below asserts that there are exactly 0 libraries
9190
# that do not start with lib
@@ -106,12 +105,20 @@ matrix:
106105
install:
107106
# Install dependencies
108107
- sudo apt-get install gcc-arm-embedded
109-
- pip install -r requirements.txt
110-
- pip install pytest pylint hypothesis mock coverage coveralls
111-
# Print versions we use
112-
113108
- arm-none-eabi-gcc --version
109+
# Add additional dependencies specific for testing
114110
- python --version
111+
- |-
112+
tr -d ' ' >> requirements.txt <<< "
113+
mock==2.0.0
114+
pytest==3.3.0
115+
pylint>=1.9,<2
116+
hypothesis>=3,<4
117+
coverage>=4.5,<5
118+
coveralls>=1.5,<2
119+
"
120+
# ... and install.
121+
- pip install -r requirements.txt
115122
- pip list --verbose
116123
script:
117124
# Run local testing on tools
@@ -122,7 +129,27 @@ matrix:
122129
after_success:
123130
# Coverage for tools
124131
- coveralls
125-
# Report success since we have overridden default behaviour
132+
# Report success since we have overridden default behavior
133+
- bash -c "$STATUS" success "Local $NAME testing has passed"
134+
135+
- env:
136+
- NAME=doxy-spellcheck
137+
138+
install:
139+
- sudo apt-get install aspell
140+
141+
script:
142+
# Run local testing on header file doxy
143+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh drivers
144+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform
145+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events
146+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos
147+
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh features/netsocket
148+
149+
after_success:
150+
# Coverage for tools
151+
- coveralls
152+
# Report success since we have overridden default behavior
126153
- bash -c "$STATUS" success "Local $NAME testing has passed"
127154

128155
# - <<: *tools-pytest
@@ -144,9 +171,12 @@ matrix:
144171
export PATH=$PWD/bin:$PATH;
145172
cd -
146173
- astyle --version
174+
# Fetch remaining information needed for branch comparison
175+
- git fetch --all --unshallow --tags
176+
- git fetch origin "${TRAVIS_BRANCH}"
147177
script:
148178
- >-
149-
git diff --name-only --diff-filter=d HEAD..${TRAVIS_BRANCH} \
179+
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
150180
| ( grep '.\(c\|cpp\|h\|hpp\)$' || true ) \
151181
| ( fgrep -v -f .astyleignore || true ) \
152182
| while read file; do astyle -n --options=.astylerc "${file}"; done
@@ -272,9 +302,18 @@ matrix:
272302
- env:
273303
- NAME=licence_check
274304
script:
275-
- echo 'Checking that there is no GPL licence text in code'
276-
- ! git grep -q --ignore-case "gnu general public";
277-
- ! git grep -q --ignore-case "gnu library general public";
305+
- >-
306+
! grep --recursive --max-count=100 --ignore-case --exclude .travis.yml \
307+
"gnu general\|gnu lesser\|lesser general\|public license"
308+
309+
- env:
310+
- NAME=include_check
311+
script:
312+
- echo 'Checking that there are no '#include "mbed.h"' in code where it should not be'
313+
- |
314+
! git grep '^#include\s["'"']mbed.h['"'"]$' -- '*.c' '*.h' '*.cpp' '*.hpp' \
315+
':!*platform_mbed.h' ':!*TESTS/*' ':!TEST_APPS/' ':!UNITTESTS/' \
316+
':!*tests/*' ':!*targets/*' ':!*TARGET_*' ':!*unsupported/*'
278317
279318
- env:
280319
- NAME=psa-autogen

‎mbed/mbed-os/CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
Mbed OS is an open-source, device software platform for the Internet of Things. Contributions are an important part of the platform, and our goal is to make it as simple as possible to become a contributor.
44

5-
To encourage productive collaboration, as well as robust, consistent and maintainable code, we have a set of guidelines for [contributing to Mbed OS](https://os.mbed.com/docs/latest/reference/contributing.html).
5+
To encourage productive collaboration, as well as robust, consistent and maintainable code, we have a set of guidelines for [contributing to Mbed OS](https://os.mbed.com/docs/mbed-os/latest/contributing/index.html).

‎mbed/mbed-os/TESTS/host_tests/crash_reporting.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_steps(self):
6060
wait_after_reset = wait_after_reset if wait_after_reset is not None else DEFAULT_CYCLE_PERIOD
6161

6262
#Wait 2 seconds for system to init
63-
time.sleep(2.0)
63+
time.sleep(7.0)
6464
#self.send_kv(MSG_KEY_SYNC, MSG_VALUE_DUMMY)
6565
self.send_kv(MSG_KEY_DEVICE_ERROR, MSG_VALUE_DUMMY)
6666
time.sleep(5.0)

‎mbed/mbed-os/TESTS/mbed_drivers/flashiap/main.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ void flashiap_cross_sector_program_test()
128128
agg_size += sector_size;
129129
address -= sector_size;
130130
}
131+
utest_printf("ROM ends at 0x%lx, test starts at 0x%lx\n", FLASHIAP_APP_ROM_END_ADDR, address);
131132
TEST_SKIP_UNLESS_MESSAGE(address >= FLASHIAP_APP_ROM_END_ADDR, "Test skipped. Test region overlaps code.");
132133
ret = flash_device.erase(address, agg_size);
133134
TEST_ASSERT_EQUAL_INT32(0, ret);
@@ -184,6 +185,7 @@ void flashiap_program_error_test()
184185
TEST_ASSERT_TRUE(address != 0UL);
185186

186187
// unaligned address
188+
utest_printf("ROM ends at 0x%lx, test starts at 0x%lx\n", FLASHIAP_APP_ROM_END_ADDR, address);
187189
TEST_SKIP_UNLESS_MESSAGE(address >= FLASHIAP_APP_ROM_END_ADDR, "Test skipped. Test region overlaps code.");
188190
ret = flash_device.erase(address + 1, sector_size);
189191
TEST_ASSERT_EQUAL_INT32(-1, ret);
@@ -220,6 +222,9 @@ void flashiap_timing_test()
220222
utest_printf("\nFlash timing:\n");
221223
uint32_t sector_size = flash_device.get_sector_size(end_address - 1UL);
222224
uint32_t base_address = end_address - sector_size;
225+
utest_printf("ROM ends at 0x%lx, test starts at 0x%lx\n", FLASHIAP_APP_ROM_END_ADDR, base_address);
226+
TEST_SKIP_UNLESS_MESSAGE(base_address >= FLASHIAP_APP_ROM_END_ADDR, "Test skipped. Test region overlaps code.");
227+
223228
timer.start();
224229
for (num_write_sizes = 0; num_write_sizes < max_write_sizes; num_write_sizes++) {
225230
if (write_size > sector_size) {

‎mbed/mbed-os/TESTS/mbed_hal/flash/functional_tests/main.cpp‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ void flash_erase_sector_test()
175175
uint32_t last_sector_size = flash_get_sector_size(&test_flash, addr_after_last - 1);
176176
uint32_t last_sector = addr_after_last - last_sector_size;
177177
TEST_ASSERT_EQUAL_INT32(0, last_sector % last_sector_size);
178+
179+
utest_printf("ROM ends at 0x%lx, test starts at 0x%lx\n", FLASHIAP_APP_ROM_END_ADDR, last_sector);
180+
TEST_SKIP_UNLESS_MESSAGE(last_sector >= FLASHIAP_APP_ROM_END_ADDR, "Test skipped. Test region overlaps code.");
181+
178182
ret = flash_erase_sector(&test_flash, last_sector);
179183
TEST_ASSERT_EQUAL_INT32(0, ret);
180184

@@ -201,6 +205,9 @@ void flash_program_page_test()
201205

202206
// sector size might not be same as page size
203207
uint32_t erase_sector_boundary = ALIGN_DOWN(address, flash_get_sector_size(&test_flash, address));
208+
utest_printf("ROM ends at 0x%lx, test starts at 0x%lx\n", FLASHIAP_APP_ROM_END_ADDR, erase_sector_boundary);
209+
TEST_SKIP_UNLESS_MESSAGE(erase_sector_boundary >= FLASHIAP_APP_ROM_END_ADDR, "Test skipped. Test region overlaps code.");
210+
204211
ret = flash_erase_sector(&test_flash, erase_sector_boundary);
205212
TEST_ASSERT_EQUAL_INT32(0, ret);
206213

‎mbed/mbed-os/TESTS/mbed_platform/crash_reporting/main.cpp‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,17 @@ void test_crash_reporting()
5353

5454
// Report readiness
5555
greentea_send_kv(MSG_KEY_DEVICE_READY, MSG_VALUE_DUMMY);
56+
printf("\nMessage sent: %s\n", MSG_KEY_DEVICE_READY);
5657

5758
static char _key[MSG_KEY_LEN + 1] = { };
5859
static char _value[MSG_VALUE_LEN + 1] = { };
5960

61+
printf("\nWaiting for crash inject error message: %s\n", MSG_KEY_DEVICE_ERROR);
6062
greentea_parse_kv(_key, _value, MSG_KEY_LEN, MSG_VALUE_LEN);
63+
printf("\nCrash inject error message received\n");
64+
6165
if (strcmp(_key, MSG_KEY_DEVICE_ERROR) == 0) {
66+
printf("\nForcing error\n");
6267
MBED_ERROR1(MBED_ERROR_OUT_OF_MEMORY, "Executing crash reporting test.", 0xDEADBAD);
6368
TEST_ASSERT_MESSAGE(0, "crash_reporting() error call failed.");
6469
}
@@ -67,7 +72,7 @@ void test_crash_reporting()
6772

6873
int main(void)
6974
{
70-
GREENTEA_SETUP(30, "crash_reporting");
75+
GREENTEA_SETUP(40, "crash_reporting");
7176
test_crash_reporting();
7277
GREENTEA_TESTSUITE_RESULT(0);
7378

‎mbed/mbed-os/TESTS/mbedmicro-rtos-mbed/systimer/main.cpp‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,10 @@ void test_handler_called_once(void)
245245
int32_t sem_slots = st.sem_wait(0);
246246
TEST_ASSERT_EQUAL_INT32(0, sem_slots);
247247

248-
sem_slots = st.sem_wait(osWaitForever);
248+
// Wait in a busy loop to prevent entering sleep or deepsleep modes.
249+
while (sem_slots != 1) {
250+
sem_slots = st.sem_wait(0);
251+
}
249252
us_timestamp_t t2 = st.get_time();
250253
TEST_ASSERT_EQUAL_INT32(1, sem_slots);
251254
TEST_ASSERT_EQUAL_UINT32(1, st.get_tick());

‎mbed/mbed-os/TESTS/netsocket/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ content at minimum:
243243
"help" : "Port of echo server",
244244
"value" : "7"
245245
}
246+
"echo-server-discard-port" : {
247+
"help" : "Discard port of echo server",
248+
"value" : "9"
249+
}
246250
}
247251
}
248252
```

0 commit comments

Comments
 (0)