From e2b757384788a9843f2d252181f37a27c31fed8b Mon Sep 17 00:00:00 2001 From: Jamie Smith Date: Fri, 3 May 2024 19:45:18 -0700 Subject: [PATCH] Update for semihosting being an option --- CMakeLists.txt | 2 +- README.md | 2 +- mbed-os | 2 +- mbed_app.json | 8 -------- mbed_app.json5 | 11 +++++++++++ 5 files changed, 14 insertions(+), 11 deletions(-) delete mode 100644 mbed_app.json create mode 100644 mbed_app.json5 diff --git a/CMakeLists.txt b/CMakeLists.txt index 727a252..84e8d62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_policy(VERSION 3.19) # Initialize Mbed OS build system. # Note: This block must be before the include of app.cmake -set(MBED_APP_JSON_PATH mbed_app.json) +set(MBED_APP_JSON_PATH mbed_app.json5) include(mbed-os/tools/cmake/app.cmake) add_subdirectory(mbed-os) diff --git a/README.md b/README.md index b017262..254fd62 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This example is an extended version of the example code given in the [LocalFileS 1. Create or append to a file, "out.txt", on the local file system. The line "Hello World!" is added to the end. 2. Open out.txt for reading and print its contents. You should see a number of "Hello World!" messages equal to the number of times you've run the example. -3. Print all the files on the LocalFileSystem. You should see "out.txt" show up, plus any additional files you've added. +3. Print all the file names on the LocalFileSystem. You should see "out.txt" show up, plus any additional files you've added. After running the example, you should be able to see out.txt from the computer, with the correct contents. Note that you might have to unplug and replug the board before you can see it (seems to be some sort of bug in the interface). diff --git a/mbed-os b/mbed-os index 2d7f242..a40e819 160000 --- a/mbed-os +++ b/mbed-os @@ -1 +1 @@ -Subproject commit 2d7f24285093e0c5135e5518a4d8ed54ff33fd0f +Subproject commit a40e8198d06acc1119cdb15ad358ac49866d9b00 diff --git a/mbed_app.json b/mbed_app.json deleted file mode 100644 index 2c3adba..0000000 --- a/mbed_app.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "target_overrides": { - "*": { - "platform.stdio-baud-rate": 115200, - "platform.stdio-buffered-serial": 1 - } - } -} \ No newline at end of file diff --git a/mbed_app.json5 b/mbed_app.json5 new file mode 100644 index 0000000..6fa93e5 --- /dev/null +++ b/mbed_app.json5 @@ -0,0 +1,11 @@ +{ + "target_overrides": { + "*": { + "platform.stdio-baud-rate": 115200, + "platform.stdio-buffered-serial": 1, + + // Enable semihosting for Mbed, which is needed for LocalFileSystem + "target.semihosting-enabled": 1 + } + } +} \ No newline at end of file