Skip to content

Commit

Permalink
Comments and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmicro committed Sep 11, 2022
1 parent 63e7554 commit 57e29bb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
36 changes: 17 additions & 19 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $ pio run -e pico32_GPS_EDITION -t upload

Depending on the watch model.

## Debugging(CLI)
## Debugging (CLI)

If you want to print out the log for debugging, following command:

Expand Down Expand Up @@ -106,24 +106,6 @@ The OS itself can be executed as a regular program on your machine. This saves y

This also implies some limitations what you can do with the emulator, as we had to hack and reimplement some of the Arduino-specific libraries and their (conflicting) simplifications. This also means, that it maybe necessary to extend those extensions down the road as we (likely) missed that one specific function you try to use... :wink:

## With Docker

If a library is restricted, you can test it using a docker.(Maybe Ubuntu 20.04)
Proceed with a typical docker installation.

Showing an application running in a docker as a host requires several actions.

Host PC (Ubuntu 20.04)
```
$ xhost +
$ xauth list # Copy the result of the command.
$ docker run --net=host -e DISPLAY -v /tmp/.X11-unix -d --name OSW -p 22:22 -it --privileged ubuntu:22.04
```

Docker
```
$ xauth add <'xauth list' command result>
```
### Build (cmake)
The emulator can be build using the `CMakeLists.txt` file - you may need to install additional libraries to be able to use it.

Expand All @@ -137,3 +119,19 @@ $ ./emulator.run
```

You also may extend the `cmake`-command with `-DCMAKE_BUILD_TYPE=Release` to get an even faster and smaller binary.

### With Docker
If a library is unavailable, you can still use the emulator using docker (e.g. on Ubuntu 20.04 SDL2 is too old). Proceed with a typical docker installation. Showing an application running in docker requires some additional steps:

#### Host PC
*Tested on Ubuntu 20.04.*
```bash
$ xhost +
$ xauth list # Copy the result of the command.
$ docker run --net=host -e DISPLAY -v /tmp/.X11-unix -d --name OSW -p 22:22 -it --privileged ubuntu:22.04
```

#### Docker
```bash
$ xauth add <'xauth list' command result>
```
2 changes: 1 addition & 1 deletion emulator/include/Preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Preferences {

inline size_t getBytesLength(const char* key) {
return std::filesystem::file_size(this->getBytesPath(key));
}
};
private:
std::string name;
std::filesystem::path path;
Expand Down

0 comments on commit 57e29bb

Please sign in to comment.