Skip to content

Commit

Permalink
build simulator by default, tweak development.md to explain to use ma…
Browse files Browse the repository at this point in the history
…ke build and then make
  • Loading branch information
pellcorp committed Feb 21, 2024
1 parent e755e58 commit d7fe0a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
24 changes: 11 additions & 13 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repository contains the Guppy Screen source code and all its external depen

Dependencies:
- [lvgl](https://github.com/lvgl/lvgl)
An embeded graphics library
An embedded graphics library
- [libhv](https://github.com/ithewei/libhv)
A network library
- [spdlog](https://github.com/gabime/spdlog)
Expand Down Expand Up @@ -52,30 +52,28 @@ Clone the guppyscreen repo (and submodules) and apply a couple of patches locall
### Mipsel (Ingenic X2000E) - specific to the K1 SoC
Building for the K1/Max

1. `unset SIMULATION && export CROSS_COMPILE=mips-linux-gnu-`
2. `make wpaclean && make wpaclient`
3. `make libhvclean && make libhv.a`
4. `make spdlogclean && make libspdlog.a`
5. `make clean && make -j$(nproc)`
1. `export CROSS_COMPILE=mips-linux-gnu-`
2. `make clean && make -j$(nproc) build`

After an initial `make build`, you can make changes to src guppy files and then use `make` to compile the files that need compiling.

The executable is ./build/bin/guppyscreen

### x86_64 (Intel/AMD)
Building and running Guppy Screen on your local machine speeds up development. Changes can tested on the local machine before rebuilding for the other architectures.
Building and running Guppy Screen on your local machine speeds up development. Changes can be tested on the local machine before rebuilding for the other architectures.

1. `unset CROSS_COMPILE`
2. `make clean && make -j$(nproc) build`

1. `unset CROSS_COMPILE && export SIMULATION=1`
2. `make wpaclean && make wpaclient`
3. `make libhvclean && make libhv.a`
4. `make spdlogclean && make libspdlog.a`
5. `make clean && make -j$(nproc)`
After an initial `make build`, you can make changes to src guppy files and then use `make` to compile the files that need compiling.

The executable is ./build/bin/guppyscreen

### Simulation
Guppy Screen default configurations (guppyconfig.json) is configured for the K1/Max. In order to run it remotely as a simulator build, a few thing needs to be setup.
The following attributes need to be configured in `build/bin/guppyconfig.json`

1. `log_path` - Absolute path to `guppyscreen.log`. Directory must exists locally.
1. `log_path` - Absolute path to `guppyscreen.log`. Directory must exist locally.
2. `thumbnail_path` - Absolute path to a local directory for storing gcode thumbnails.
3. `moonraker_host` - Moonraker IP address
4. `moonraker_port` - Moonraker Port
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ ifdef EVDEV_CALIBRATE
DEFINES += -D EVDEV_CALIBRATE
endif

ifdef SIMULATION
# SIMULATION is enabled by default, need CROSS_COMPILE variable to do MIPS build
ifndef CROSS_COMPILE
DEFINES += -D LV_BUILD_TEST=0 -D SIMULATOR
LDLIBS += -lSDL2
endif
Expand Down

0 comments on commit d7fe0a7

Please sign in to comment.