Commit Graph

256 Commits

Author SHA1 Message Date
Lasse Dalegaard a7b01857f5 flash_usb: use sudo for rp2040 flashing
The rp2040 can be flashed without sudo when using udev rules to give the
user permission, but in a standard configuration sudo is required.

Here we make it possible for flash_usb to use sudo for the rp2040
target, and make it the default when using `make flash` for the rp2040.
As for other targets, one can set `NOSUDO=1` to not call through sudo.

Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
2022-01-31 11:10:02 -05:00
adelyser b414fc4975
spi_flash: Add btt-skr-bx-se to the board types (#4951)
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
2022-01-29 13:32:48 -05:00
Lasse Dalegaard 7c0559c6e6 rp2040: add make flash support
This adds `make flash` support for the rp2040 target. Flashing is
performed using a custom `rp2040_flash` tool that uses the PICOBOOT
protocol. Root is not required.

The user specifies the serial device of the rp2040 they wish to flash as
the device. This device is reset into bootsel mode and `rp2040_flash`
is invoked on the original USB device path.

If the device is already in bootloader mode, the user can specify
'first' as `FLASH_DEVICE` which will simply invoke `rp2040_flash` with
no bus/address options.

Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
2022-01-06 17:32:54 -05:00
Dmitry Butyugin 309b8e030f scripts: Migrated shaper calibration scripts to Python3
Also updated instructions to install python3-numpy and
python3-matplotlib Python packages.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-12-30 18:14:53 -05:00
Kevin O'Connor f0b20f0bdf spi_flash: Add btt-skr-mini-e3-v3 board definition
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-12-23 22:15:26 -05:00
Kevin O'Connor 8b2da0d353 motan: Fix comment copy-and-paste error in readlog.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-12-01 20:09:25 -05:00
Justin Schuh cfff897480 spi_flash: Better fallback on MCU protocol change
Support a set of known past config responses.

Signed-off-by: Justin Schuh <code@justinschuh.com>
2021-11-09 20:15:46 -05:00
Justin Schuh 76bfc3237a spi_flash: Fix MCU handshake protocol
Update config response string to match new version from d4aee4f.

Signed-off-by: Justin Schuh <code@justinschuh.com>
2021-11-08 20:07:38 -05:00
Kevin O'Connor dd98884bb4 buildcommands: Use regular str() types for input on Python2
Avoid using unicode() types on Python2 as it can lead to subtle
errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-31 13:52:31 -04:00
Dmitry Butyugin d5a7a7f00f input_shaper: Define input shapers in a single place in Python code
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-10-26 16:14:50 -04:00
Kevin O'Connor 5c10001bc5 motan: Minor change to corexy analyzer label
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-16 22:18:51 -04:00
Kevin O'Connor cf3b7d290c motan: Add an analyzer to integrate accelerometer input
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-16 22:18:51 -04:00
Kevin O'Connor 466198c0f4 motan: Add support for graphing stepper motor phase and microstep position
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-16 22:18:51 -04:00
Kevin O'Connor 03021ae722 motan: Show data filename in graph title
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-16 22:18:45 -04:00
Kevin O'Connor c56c34fa1c configfile: Use Python2's ConfigParser when running on Python2
The backport of Python3's configparser causes issues when there is
unicode characters in the config file.  To avoid introducing new
errors, go back to using the Python2 version of ConfigParser when
running on Python2.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-09 19:37:48 -04:00
Kevin O'Connor 1a4d655a18 spi_flash: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-07 20:05:15 -04:00
Kevin O'Connor cc63fd51b2 scripts: Use backport of a recent Python3 configparser on Python2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-04 15:10:46 -04:00
Kevin O'Connor 41d42a07bf klippy: Add a build import test tool
Add a test case to verify that every optional module successfully
loads on both Python2 and Python3.  This is intended to catch syntax
and module imports that are not compatible between Python versions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-04 14:36:08 -04:00
Kevin O'Connor b743a64685 scripts: Update klippy build tests to verify on both Python2 and Python3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-04 14:36:08 -04:00
Kevin O'Connor 1717263b5a buildcommands: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:28:27 -04:00
Kevin O'Connor 9ce07921c4 test_klippy: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:22:13 -04:00
Kevin O'Connor cc2a313c10 klippy-requirements: Update dependencies to support Python 3.9+
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:07:48 -04:00
Kevin O'Connor c543b00aa6 motan: Improve handling of errors during data subscriptions
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-26 12:24:40 -04:00
Kevin O'Connor 59bd51d207 avrsim: Change default speed to 16Mhz and default baud to 250K
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-16 20:11:42 -04:00
Vladimir Serov 4b5d1c85c0
update_chitu: generating update uuid based on file hash (#4663)
This makes update_chitu a pure function: same file in — same file out.
That's something I need to make Nix builds for firmware itself reproducible.

Signed-off-by: Vladimir Serov <me@cab404.ru>
2021-09-15 18:31:47 -04:00
Kevin O'Connor f11acd8065 motan: Add support for dumping and analyzing adxl345 data
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:26:39 -04:00
Kevin O'Connor 15035ed226 motan: Add corexy forward kinematics analyzer
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:12:11 -04:00
Kevin O'Connor 5e968db355 motan: Add support for graphing arbitrary get_status fields
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:12:11 -04:00
Kevin O'Connor 1e4041a96b motan: Pass dataset parameters in parenthesis
Replace names like "trapq:toolhead:x" with "trapq(toolhead,x)".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:12:01 -04:00
Kevin O'Connor d759b4e532 motan_graph: Fix legend when using matplotlib twinx
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-24 10:19:23 -04:00
Kevin O'Connor 7aa2c11b3a data_logger: Flush the initial index file when all queries complete
This should avoid zero byte index files for small captures.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-24 10:19:12 -04:00
Kevin O'Connor d57daa2354 readlog: Support queue_step smoothing
Logically "smooth" each step in a queue_step sequence over a small
time period.  This smoothing makes it easier for the analysis tools to
extract high-level trends from the data.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-22 12:22:11 -04:00
Kevin O'Connor 42080751d7 motan_graph: Initial support for graphing data log
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-22 12:22:11 -04:00
Kevin O'Connor 171a73e380 data_logger: Add tool for bulk logging of data via the API server
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-22 11:10:19 -04:00
Kevin O'Connor 1bc4f90fb0 flash-linux: Fix spelling error in message
Reported by @stefanfoulis.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-17 13:25:19 -04:00
Kevin O'Connor 4d5c619b8e scripts: Update graphing scripts to work with either python2 or python3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-02 12:44:05 -04:00
Kevin O'Connor 994f388b5c check_whitespace: Also check txt, css, html, yaml, and yml files for errors
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-07-27 13:37:48 -04:00
Justin Schuh 121052ad39 spi_flash: Support firmware dictionary validation
Updates firmware validation to use a dictionary if provided (or found
when updating from the default out/ directory).

Validation without a dictionary still checks the following (in order):
1. Active firmware's raw dictionary changed after update
2. Checksum of firmware.cur matches expected

Signed-off-by: Justin Schuh <code@justinschuh.com>
2021-07-20 18:05:05 -04:00
Justin Schuh bb801905be spi_flash: Make SD updates more tolerant of flaky boards
Validation passes if either of the following succeeds (in order):
1. Active firmware's raw dictionary changed after update
2. Checksum of firmware.cur matches expected

Additionally, deletes firmware.bin if found after update succeeds.

Signed-off-by: Justin Schuh <code@justinschuh.com>
2021-07-20 18:05:05 -04:00
henrikssn 430578957f
stm32: Add support for STM32F072 (used in the TurboCAN board) (#4412)
* Add menuconfig option for stm32f072
* Add support for internal temp of stm32f072
* Share the temperature calculation logic between stm32f0x2 MCUs

Signed-off-by: Erik Henriksson <erikhenrikssn@gmail.com>
2021-06-27 20:35:34 -04:00
Wilhelm Schuster 5fb5b3afe1 spi_flash: Add board definitions for Fysetc S6 and Spider
Signed-off-by: Wilhelm Schuster <ws@rot13.io>
2021-05-03 14:36:18 -04:00
Kevin O'Connor d1946fb6ed graphstats: Support graphing multiple heaters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-29 15:53:28 -04:00
Kevin O'Connor 947ffe706d buildcommands: Don't attach hostname and build date to version on a clean build
Most builds will be direclty from git - removing the hostname and
build date should permit reproducible binaries in that common case.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-22 11:39:25 -04:00
Kevin O'Connor 3d37362d6e buildcommands: Call irq_poll() after last task function
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-21 19:36:49 -04:00
Dmitry Butyugin 165d2fc228 resonance_tester: Fixed multi-point resonance testing
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-04-07 19:05:23 -04:00
Kevin O'Connor 964e3cc456 klippy-requirements: Update Jinja2 to 2.11.3
There was a security fix in Jinja2 v2.11.3 - it does not impact
Klipper, but there is no harm in updating.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-25 11:05:27 -04:00
Dmitry Butyugin 2d8945dc1c graph_accelerometer: Support axis-level comparison of adxl345 data
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-03-20 13:24:43 -04:00
Dmitry Butyugin db4a254ece calibrate_shaper: Use fixed 5 Hz steps for minor ticks in the charts
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-03-20 13:24:43 -04:00
Dmitry Butyugin 73a39370ad shaper_calibrate: Estimate max_accel to avoid excessive smoothing
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-03-20 13:24:43 -04:00
Kevin O'Connor 5e0503f643 canbus_query: Add tool to query CANBUS uuid
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-13 11:29:41 -05:00