Skip to content

Commit

Permalink
Update for semihosting being an option
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed May 4, 2024
1 parent ca120ed commit e2b7573
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

2 changes: 1 addition & 1 deletion mbed-os
Submodule mbed-os updated 3531 files
8 changes: 0 additions & 8 deletions mbed_app.json

This file was deleted.

11 changes: 11 additions & 0 deletions mbed_app.json5
Original file line number Diff line number Diff line change
@@ -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
}
}
}

0 comments on commit e2b7573

Please sign in to comment.