Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build simulator by default, tweak development.md to explain to use ma… #45

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading