Commit Graph

278 Commits

Author SHA1 Message Date
Kevin O'Connor 61fa7e82d9 travis-install: Minor change to virtualenv command-line arguments
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 13:27:27 -04:00
Kevin O'Connor 81865b5940 install-octopi: Use "virtualenv -p python2" to ensure python2 is selected
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 13:19:55 -04:00
Kevin O'Connor 12529ef6cd update_chitu: Rename script and minor changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 13:11:34 -04:00
Cabia Rangris 15853da28c
config: Added TronXY X5SA support (#3265)
Added printer-tronxy-x5sa-v6 config.
Added "chitu" bootloader option to stm32 Kconfig.
Added chitu_crypt.

Signed-off-by: Vladimir Serov <me@cab404.ru>
2020-08-30 12:59:28 -04:00
Kevin O'Connor 2a27093f69 graph_temp_sensor: Add tool to graph ADC resolution of temperature sensors
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-17 12:37:43 -04:00
Kevin O'Connor ebc79a1ee8 whconsole: Add utility for testing the "webhooks" interface
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:25 -04:00
Kevin O'Connor 4a35d7e8bd update_mks_robin: Remove unnecessary imports
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-24 11:02:15 -04:00
Dmitry Butyugin bc488c2161
scripts: scripts to simulate input_shaper response and toolhead movement (#3063)
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-07-19 20:23:02 -04:00
Arksine 342a230984 scripts: add executable permissions to klipper-mcu-start.sh
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-05 20:48:12 -04:00
Lucio Tarantino 35bbd989e4
docs: LinuxMCU doc & script (#2956)
Signed-off-by: Lucio Tarantino <lucio.tarantino@gmail.com>
2020-06-12 20:32:12 -04:00
BlackStump bceb8ddee2
scripts: Permission fix for debian-install (#2936)
Signed-off-by: Trevor Wilson <altocoey@hotmail.com>
2020-05-31 19:05:46 -04:00
Arksine ab87af90a3 stm32f4: Add support for HID bootloader
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-05-28 14:44:51 -04:00
Arksine 380ba2a618 scripts: add libusb-1.0 to install scripts
The hid-flash tool depends on libusb-1.0-0-dev

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-05-28 14:44:51 -04:00
Arksine 05efccc874 stm32f1: Add support for HID Bootloader
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-05-28 14:44:51 -04:00
kiwigod bf367ad2b6 scripts: add arch linux install script
Automate installation for Arch Linux based systems

Signed-off-by: Arjun Sardjoe Missier <amissier@pm.me>
2020-05-28 14:40:04 -04:00
Georgios Karnas 393f37dbfc
avrsim: update avrsim pty attr (#2343)
Signed-off-by: Georgios Karnas <kargeor@gmail.com>
2020-05-05 17:57:42 -04:00
sillyfrog 0342c50033
scripts: Update Docker file for current Klipper version (#2666)
Signed-off-by: Trent Davis <tgh@sillyfrog.com>
2020-04-02 20:19:26 -04:00
Kevin O'Connor 302cd38217 update_mks_robin: Add script to update firmware for MKS Robin bootloader
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-24 10:30:02 -04:00
Kevin O'Connor 0e37f8c9b3 graph_extruder: Internal updates to graph calculation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-18 12:38:45 -05:00
Kevin O'Connor b3a180ea77 graph_extruder: Add in older pa algorithms for reference
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-03 16:42:57 -05:00
Kevin O'Connor 264aac5856 scripts: Revert virtualenv workarounds
Revert "scripts: Disable "virtualenv setuptools" in install-octopi.sh script"
This reverts commit 5fc92ff6b7.

Revert "scripts: Install "virtualenv setuptools==44.0.0" in install-octopi.sh"
This reverts commit 730c7cfc20.

The online setuptools repository was fixed upstream, so it is no
longer necessary to implement a local virtualenv workaround.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-25 10:34:24 -05:00
Kevin O'Connor 730c7cfc20 scripts: Install "virtualenv setuptools==44.0.0" in install-octopi.sh
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-12 18:22:14 -05:00
Kevin O'Connor 5fc92ff6b7 scripts: Disable "virtualenv setuptools" in install-octopi.sh script
The default setuptools installed by virtaulenv has dropped support for
python2.  Explicitly remove it from the installation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-12 16:51:49 -05:00
Kevin O'Connor dabffcc22c kin_extruder: Convert pressure advance to use "weighted average"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-20 12:21:58 -05:00
BlackStump 7532e4ccea scripts: Replicape pru update start scripts (#2277)
Signed-off-by: Trevor Wilson <altocoey@hotmail.com>
2019-12-18 12:11:40 -05:00
Kevin O'Connor 1d05a34cd7 docs: Update Kinematics.md document with "smooth pressure advance"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-13 17:52:51 -05:00
Kevin O'Connor 064804b688 graphstats: Fix matplotlib import error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-10 10:18:31 -05:00
Kevin O'Connor 1a69f38e6e flash_usb: Pass -t $CONFIG_MCU to flash_usb on all targets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 18:48:00 -04:00
Kevin O'Connor 538d6ac3a2 flash_usb: Use "-s" option to specify flash offset on atsamd
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 18:33:00 -04:00
Kevin O'Connor c694da3753 flash_usb: Change dfu-util to reset the board after a flash on stm32f4
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 18:06:32 -04:00
Kevin O'Connor 4b4e309e1b flash_usb: Inform user to manually reset after stm32f4 flash
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 17:46:18 -04:00
Kevin O'Connor 5131ec5eb0 stm32: Add support for flashing over usb on stm32f042
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 17:11:04 -04:00
Kevin O'Connor 5da6a62759 stm32f4: Add support for flashing over USB
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 13:24:59 -04:00
nhchiu 9cd6273d52 scripts: Use current username in install-ubuntu-18.04.sh
Set KLIPPER_USER to $USER instead of "octoprint".

Signed-off-by: Nathan Chiu <nhchiu2009@gmail.com>
2019-10-23 14:54:31 -04:00
Kevin O'Connor 8f5c15d4dc buildcommands: Match DECL_X names to the actual C macro names
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-22 13:26:30 -04:00
Kevin O'Connor ff7be3e026 ctr: Encode negative integers in normal hex notation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-22 13:06:44 -04:00
Kevin O'Connor 7d014933ce command: Allow count parameter of DECL_ENUMERATION_RANGE() to be an expression
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-22 12:22:51 -04:00
Kevin O'Connor e59d875256 ctr: Encode integers in hex
Replace the custom encoding with a hex encoding.  This makes it a
little easier to inspect the CTR conversions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-22 11:08:51 -04:00
Kevin O'Connor 69fc1e63b4 Makefile: Translate null characters to newline characters in ctr requests
Store the CTR requests in compile_time_request.txt with the null
characters removed.  This makes it slightly easier to inspect the CTR
conversions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-22 10:35:26 -04:00
Kevin O'Connor 2a2cf1f536 armcm_boot: Add generic code for early board init on armcm machines
Add basic ARM Cortex-M C init code and build linker scripts to
src/generic/ code.  This can be used to simplify the various ARM board
code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-22 09:58:58 -04:00
Kevin O'Connor ec3d865b51 stm32f4: Add support for USB on stm32f103
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-05 11:25:40 -04:00
Kevin O'Connor 17bd595b15 check_whitespace: Warn on trailing tabs in Makefiles
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-21 21:49:37 -04:00
Kevin O'Connor ced5e35f0c scripts: Minor improvement to feedback from travis-install.sh
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-10 10:38:47 -04:00
Kevin O'Connor 4bb0b6defd check_whitespace: Add script to run whitespace checks
Allow users to run the "travis ci" whitespace check directly from the
command-line.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-23 17:44:48 -04:00
Alan Lord a613045287 scripts: Update klippy-requirements.txt (#1744)
Signed-off-by: Alan Lord <alanslists@gmail.com>
2019-06-21 13:32:54 -04:00
Kevin O'Connor 8cce3cc8e7 graphstats: Add support for interactive graphs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-19 21:12:26 -04:00
Kevin O'Connor 1a8bd750fc logextract: Update for absolutecoord -> absolute_coord change
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-05-31 11:13:22 -04:00
Kevin O'Connor 7c3ee0f1e9 scripts: Use /tmp/klippy.log in install-ubuntu-18.04.sh
Use /tmp/klippy.log in the install script - all the documentation
currently uses that file location.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-05-20 20:01:06 -04:00
Kevin O'Connor 41ce7cdf1c klippy-requirements: Update Jinja2 version
There's a security bulletin for Jinja2 v2.10 (CVE-2019-10906).  This
wont impact Klipper, but best to upgrade the package requirements to
avoid getting security alerts.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-04-14 11:20:04 -04:00
Kevin O'Connor 486c07c190 gcode_macro: Evaluate macros using Jinja2 template engine
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-04-04 18:35:23 -04:00
Kevin O'Connor 890a5ea6bb scripts: Update klippy-requirements.txt to latest version of packages
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-04-04 18:35:23 -04:00
Kevin O'Connor 2a55e09ff8 scripts: Add a new klippy-requirements.txt file for virtualenv installs
Place all of the host software python requirements into a config file.
This makes it easier to update the python requirements without having
to update several installation scripts.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-04-01 22:20:21 -04:00
Kevin O'Connor 8b48de1be8 logextract: Add mcu annotation on send/receive shutdown reports
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-03-31 13:37:01 -04:00
Kevin O'Connor ea0f231343 flash_usb: Improve USB reconnect timing
Instead of waiting one second after entering bootloader mode, wait for
the device file to reappear.  This should make the flashing more
resilient to slight timing difference in the OS.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-03-17 22:31:31 -04:00
Kevin O'Connor 4a35f927fc initial_pins: Add ability to configure output pins at mcu startup
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-03-17 20:56:25 -04:00
Kevin O'Connor db6e2d4c9e msgproto: Convert static strings to a more generic enumeration system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-03-17 19:38:18 -04:00
Kevin O'Connor 7d73a35805 command: Support evaluating C expressions in DECL_CONSTANT()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-03-17 19:38:18 -04:00
Kevin O'Connor 7eda55e2b0 buildcommands: Use dictionaries to describe commands, responses, and output
Avoid transmitting lists of message ids for commands and responses -
gzip doesn't do a good job of compressing them.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-03-17 19:38:18 -04:00
Kevin O'Connor 4718f39b2f flash_usb: Run dfu-util via sudo
Default to running dfu-util via sudo as most machines will not have
the user setup with permissions to access the raw usb device.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-03-11 22:33:24 -04:00
Kevin O'Connor a5aede52cb flash_usb: Try to make the bossac atsam reboot logic more stable
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-03-10 15:06:41 -04:00
Kevin O'Connor 6ffbaa46c5 flash_usb: Add a helper script for flashing Klipper over USB
Add a script to help flash Klipper over USB.  This tool can instruct
Klipper to enter into bootloader mode and it can help track changes in
device name during that transition.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-03-08 22:22:41 -05:00
Kevin O'Connor 5dc487faf9 check_whitespace: Enforce an 80 column limit on source code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-27 14:33:17 -05:00
Kevin O'Connor 75b01be87e logextract: Wrap code to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-27 13:18:07 -05:00
Kevin O'Connor a6daa55484 checkstack: Wrap code to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-27 13:17:05 -05:00
Kevin O'Connor 060757764a avrsim: Wrap code to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-27 13:16:22 -05:00
Kevin O'Connor 72050e7352 buildcommands: Wrap code to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-27 13:15:48 -05:00
Kevin O'Connor 021264a6f5 kconfig: Remove Save and Load buttons from "make menuconfig"
These two options don't provide any value and it is causing confustion
with some users.  Remove the buttons.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-15 21:06:12 -05:00
Kevin O'Connor cb2ecc68d2 graphstats: Add option to graph temperatures from log
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-13 22:00:08 -05:00
AxMod3DPrint 0ba1f5109d scripts: Add BASH uninstall Script for RasPi
Signed-off-by: Ax Smith-Laffin (AxMod3dPrint) <ax@darknetweb.co.uk>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-10 10:15:29 -05:00
Nathan c9c8ae0499 Ubuntu 18.04 install script
Signed-off-by: Nathan Tsoi <nathan@vertile.com>
2019-01-10 09:38:15 -05:00
Kevin O'Connor 50e9c6738f scripts: Add a test case for Ubuntu 18.04 compiler error
Attempt to detect a bad build of Klipper and report an error.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-12-22 13:13:31 -05:00
Kevin O'Connor 7699304f9b graphstats: Change stats filter to use print_time instead of bytes_write=0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-26 17:37:04 -05:00
Kevin O'Connor 76f07979bb buildcommands: Make sure to not use 96 or more message ids
The mcu code assumes the encoder and parser id is always one byte.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-18 11:00:37 -05:00
Kevin O'Connor 150cae1d1f buildcommands: Remove unnecessary spaces from data dictionary
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-18 04:17:25 -05:00
Kevin O'Connor 9db0bec792 buildcommands: Detect duplicate strings when generating static string ids
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-18 03:13:31 -05:00
Kevin O'Connor b3e8429b54 buildcommands: Move data dictionary generation to its own class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-18 03:11:00 -05:00
Kevin O'Connor 95e4c2d617 buildcommands: Move version generation to its own class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-18 03:06:52 -05:00
Kevin O'Connor 9f420f71a5 buildcommands: Move command/response code generation to its own class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-18 03:06:52 -05:00
Kevin O'Connor 67a5cd0409 buildcommands: Move DECL_CONSTANT code to its own class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-18 03:06:52 -05:00
Kevin O'Connor 334507306b buildcommands: Move DECL_STATIC_STR code to its own class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-18 03:06:52 -05:00
Kevin O'Connor 9cb98a00fc buildcommands: Move DECL_CALLLIST code to its own class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-18 03:04:18 -05:00
lf a33792f07e util: Fix versioning when gitdir is absent (#809)
The gitdir previously could be absent and produce a version of "" in
spite of checks for it. Fixed.

Parent directories with shlex-interpreted characters in their names
could be misinterpreted. Removed shlex parsing.

Packagers may want to remove the git history to slim down the package
size, so add an option for using a file 'version' in the klippy
directory to set version without using git.

Signed-Off-By: Lucas Fink <software@lfcode.ca>
2018-10-27 10:44:38 -04:00
Kevin O'Connor 363bcfb233 logextract: Make sure config files end with a newline
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-24 16:02:03 -04:00
Kevin O'Connor 8eb1110aa8 logextract: Fix handling of clock reports at end of line
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-08 10:34:07 -04:00
Kevin O'Connor 47b6144ff6 logextract: Add support for extracting recent g-code from a shutdown
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-28 12:24:39 -04:00
Kevin O'Connor 6b4e44011c test: Make white space error report more pronounced
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-27 13:21:15 -04:00
Kevin O'Connor daf4d237c0 scripts: No longer require bossa-cli in install-octopi.sh
Now that there is a local copy of bossac in the lib directory, there's
no reason to require a system version of it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-27 08:54:43 -04:00
sillyfrog ed011b5f25 dockerfile: Add a basic reference Dockerfile (#488)
Dockerfile: Add a basic reference Dockerfile

This is a sample of how to get Klipper running in Docker, because of the
virtual serial port, the user will have to modify things to include
something to send the GCode. I have included a link to my repo which has
OctoPrint up and running as an example.

Signed-off-by: Trent Davis <tgh@sillyfrog.com>
2018-08-06 13:11:01 -04:00
Kevin O'Connor c5ecb37b4e test: Minor update to travis-build.sh mcu_compile start notifier
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-01 14:05:31 -04:00
Kevin O'Connor ac5e207241 check_whitespace: Minor simplification of control char check
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-27 12:55:41 -04:00
Kevin O'Connor 7c7de85f01 test: Extend white space check to verify files are valid utf-8
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 16:16:05 -04:00
Kevin O'Connor 649d7c54f0 travis-build: Narrow portions of test run with "set +x"
No need to include all the test preparation in the verbose output - as
that can make the output more confusing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-08 09:29:13 -04:00
Kevin O'Connor 32175bc66a test: Minor comment update in travis-build.sh
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-05 15:19:37 -04:00
Kevin O'Connor bbd3f18178 test: Clean up travis-ci build output
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-05 11:49:10 -04:00
Kevin O'Connor bae094eac3 test: Expand whitespace checks to test files and test compile configs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-01 10:52:30 -04:00
Kevin O'Connor 58b77e783f test: Expand whitespace checks to *.lds files
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-01 09:50:42 -04:00
Kevin O'Connor 997719af13 test: Fix typo in whitespace check - there is no src/lib/ directory
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-01 09:46:07 -04:00
Kevin O'Connor f767bee8ff test: Expand whitespace checks to docs/ and test/ directories
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-01 09:42:09 -04:00
Kevin O'Connor 0cbfcfd3d1 test_klippy: Add option to not remove temporary files
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-30 12:31:49 -04:00
Kevin O'Connor cc6b416660 test: Add support for testing klippy with multi-mcu configs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-29 13:52:23 -04:00
Kevin O'Connor cda08a844a test: Add a build test case for the PRU
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-28 17:01:12 -04:00
Kevin O'Connor 6aba3c552b build: Build pru gcc in travis-ci scripts and then cache it for later use
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-28 17:01:11 -04:00
Kevin O'Connor 52ab93be6d build: Collect travis build files travis build specific directories
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-28 15:03:41 -04:00
Kevin O'Connor 154397b92c test: Add a whitespace check to the travis build
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-28 13:02:55 -04:00
pyr0ball 995367bd52 scripts: Add installation script for CentOS (#367)
The purpose of this PR is to add an installation script to klipper for use on Centos. Several packages names are different from debian based installs, and the system service is handled via systemd rather than LSB.

Signed-off-by: Alan Weinstock <pyroballpcs@gmail.com>
2018-06-19 15:57:21 -04:00
Kevin O'Connor d887a403ff test: Try to cache gcc arm download during travis-ci builds
The gcc arm download sometimes fails - try to cache it within the
travis-ci system to prevent that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-18 13:19:12 -04:00
Kevin O'Connor 711a69396f test_klippy: Default to only showing log information on an error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-17 11:48:06 -04:00
Kevin O'Connor c89983fd96 scripts: Add additional explicit dependencies to install-octopi.sh
Add virtualenv, build-essential, gcc-arm-none-eabi, and
binutils-arm-none-eabi packages - just in case they aren't already
installed.  Reported by @AxMod3DPrint.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-17 10:49:06 -04:00
Kevin O'Connor 6841f0b5a8 test_klippy: Use verbose output when running klippy
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-17 09:55:30 -04:00
Kevin O'Connor eb801631b9 test: Add basic klippy regression tests
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-16 16:20:49 -04:00
Kevin O'Connor 064212a191 logextract: Detect clock field even if it is last field on line
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-13 22:32:41 -04:00
Kevin O'Connor 5f640699b7 scripts: Add python-dev dependency to install-octopi.sh
The python-dev package is usually already installed, but there's no
harm in stating it explicitly.  Reported by @yschroeder.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-09 19:12:52 -04:00
Kevin O'Connor bf301a977e graphstats: Make check for stats prefixes more robust
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-23 18:19:50 -04:00
Kevin O'Connor 35f3f6506b scripts: Add stm32flash to octopi-install.sh package list
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-12 13:58:30 -04:00
Kevin O'Connor 7579b9671b stepstats: Add documentation clarification
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-23 10:51:11 -04:00
Kevin O'Connor 656cb2c417 build: Use git describe --always
Add --always flag to "git describe" command to get a build identifier
even if one checks out the repo with a depth parameter that prunes out
the last tagged version.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-26 21:50:05 -05:00
Kevin O'Connor 7733e1d832 test: Add travis_fold markers to build output
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-26 15:21:39 -05:00
Kevin O'Connor 28d70eaf0c test: Update travis build to include a basic klippy host test
Move the travis installation steps from the travis-build.sh script to
a new script (scripts/travis-install.sh).  Move the travis-build.sh
script to the scripts/ directory as well.

The data dictionaries built in the compile tests are useful during
host software testing, so run all the compile tests sequentially in a
single VM and save the data dictionaries after each build.  Also,
build all the config files found in the test/configs/ directory.

Create the python virtualenv environment during the install phase and
invoke the klippy.py host software in the build phase to perform a
basic host software sanity check.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-26 14:58:49 -05:00
Kevin O'Connor e99c0f53f8 graphstats: Support selecting an mcu to graph from the command-line
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-19 23:12:14 -05:00
Kevin O'Connor 97f7735c6a graphstats: Set size on frequency graph
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-18 20:42:28 -05:00
Kevin O'Connor 8121a4a29f avrsim: Rework pacing mechanism
Rework the pacing mechanism to make it more stable.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-05 11:38:13 -05:00
Kevin O'Connor d1c209c689 graphstats: Fix multi-mcu parsing with reordered stats
The mcu stats (that contain a prefix) may occur before some other
stats - make sure to only apply the stats prefix to those stats that
need it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-03 18:43:52 -05:00
Kevin O'Connor 47bb8b7cc2 graphstats: Fix for print_stall detection
The print_stall logic could cause large portions of the graph to show
up as 100% host utilized.  Rework the logic to avoid that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-28 10:50:52 -05:00
Kevin O'Connor 33893ece1d logextract: Fix error in config file name print
Fix typo causing an error during the printing of the config file name.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-28 10:50:43 -05:00
Kevin O'Connor 3d26bf6635 logextract: Better handle the case of a missing config section
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-21 15:56:13 -05:00
Kevin O'Connor 6770aa96c9 graphstats: Use alpha transparency when plotting the stats
Use an alpha transparency on each of the stats, so that it is possible
to see how the values overlap.

Also, always enable the "awake time" stat - just use a lower alpha
transparency for it.

Also, explicitly set the graph size as some version of matplotlib have
a different default.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-14 10:46:48 -05:00
Kevin O'Connor 896c31fd05 graphstats: Fix filtering of normal buffer_time runoff stats
Update the mechanism to filter out cases where buffer_time is below
MAXBUFFER so that it works with the statistics currently generated.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-14 10:16:16 -05:00
Kevin O'Connor d3eda337a9 logextract: Fix parsing of "is_shutdown" messages
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-12 16:44:21 -05:00
Kevin O'Connor 00ea3934ee logextract: Add support for extracting shutdown info on multiple mcus
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-02 21:48:25 -05:00
Kevin O'Connor cf4c31cb88 graphstats: Add support for generating a graph of mcu frequency
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-30 18:29:58 -05:00
Kevin O'Connor f10bd5726d graphstats: Use a smaller font in the graph legend
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-30 18:27:44 -05:00
Kevin O'Connor 7db6fa7bfc graphstats: Fix case where an Xwindows display may not be available
Matplotlib will try to open a display by default - tell it not to do
that so that it can run in batch mode on headless machines.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-30 18:26:49 -05:00
Kevin O'Connor b05eb1e8e3 logextract: Fix handling of messages with retransmits
Properly handle the case where the original sequence number of a
message is not known.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-29 15:25:39 -05:00
Kevin O'Connor d778ae1846 build: Add gcc and binutils version to mcu data dictionary
Store the gcc and binutils versions used in the compilation of the
firmware in the firmware data dictionary.  Forward that information to
the log so it is available during debugging.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-21 20:32:10 -05:00
Kevin O'Connor 0e0780a460 logextract: Update file comment
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-18 12:14:10 -05:00
Kevin O'Connor add528532e logextract: Rename extractconfig.py to logextract.py and add shutdown parsing
Add initial support for extracting out shutdown information from a
klippy.log file.  The shutdown dump will be reordered into the
sequence that they occurred, and timestamps/sequence numbers in the
mcu message dump will be expanded.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-16 20:21:34 -05:00
Kevin O'Connor ef09ac5a7f extractconfig: Add helper script that extracts config files from a log
Add a helper script that can read a klippy.log file and extract the
printer.cfg files from it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 21:23:24 -05:00
Kevin O'Connor 8463a83324 graphstats: Fix graphing script
Update the graphstats.py graphing script so that it works with recent
stats changes - the stats can now contain groups that end with a ':'
and the print_time is no longer reset to zero on a new print.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-10-29 20:36:33 -04:00
Kevin O'Connor eaacb928fc pru: Force load the ADC module during PRU startup
Make sure the ADC module gets loaded during startup - it's normally
loaded by the cape manager eeprom, but there's no harm in requesting
it explicitly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-10-18 13:23:10 -04:00
Kevin O'Connor afac81c161 pru: Update start script to always unbind the PRU before binding it
It appears some versions of Debian will load the PRU with firmware on
boot, so make sure to always deactivate the PRU before attempting to
activate it with new firmware.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-10-05 13:50:12 -04:00
Kevin O'Connor 5a85c1667a pru: Update installation and flash scripts
Update the scripts used to install and "flash" the pru
micro-controller code.  Also, add a "flash" script for the linux
micro-controller code.  This makes it easier to install Klipper on a
Beaglebone board that uses a Replicape.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-09-20 12:55:28 -04:00
Kevin O'Connor 5583b050a0 graphstats: Increase maximum expected task duration
Now that tasks are only run when needed it's common for there to be a
larger variation in task execution time.  When graphing load, consider
a 99-percentile task duration of 2.5ms to be 100% loaded (up from
1ms).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-08-09 19:12:27 -04:00
Kevin O'Connor 19090bdd5b graphstats: Fix so that older files (predating mcu_awake) still work
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-07-21 14:19:59 -04:00
Kevin O'Connor c4b8d3ea8b graphstats: Support graphing "mcu_awake" statistic
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-07-19 14:14:01 -04:00
Kevin O'Connor 2d173f51b1 pru: Add documentation and install scripts for running on the PRU
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-07-05 14:21:32 -04:00
Kevin O'Connor b32ba3727b pru: Add support for "make flash" rule
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-07-05 12:50:54 -04:00
Kevin O'Connor 09140a51d5 sched: Pass shutdown reason code via longjmp() parameter
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-07-04 12:49:58 -04:00
Kevin O'Connor 0ac518040b msgproto: Export static_strings from mcu to host as a dictionary
Export the static strings as a dictionary instead of as a list.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-07-02 14:11:10 -04:00
Kevin O'Connor c1bd628ce5 command: Directly call command_sendf() for ack/nak messages
Don't use the sendf() macro for ack and nak messages - directly call
the command_sendf() code instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-29 13:33:59 -04:00
Kevin O'Connor 1ae78d08e9 command: Encode MESSAGE_MIN in command_parser->max_size
Add the message minimum into the stored constant so it does not need
to be added at run-time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-29 13:33:58 -04:00