Commit Graph

1576 Commits

Author SHA1 Message Date
Kevin O'Connor 5fb1c76c0e samd21: Fix description of bootloader offset
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-08 19:56:43 -04:00
Kevin O'Connor 71063fe500 docs: Warn about possible pin conflicts in benchmarks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-08 13:52:08 -04:00
Kevin O'Connor cbf019a468 docs: It's difficult to estimate real-world usage from the benchmarks
Remove the prediction on real-world usage as it's not really practical
to make a prediction.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-08 13:39:29 -04:00
Kevin O'Connor fbec3ebb63 docs: Add benchmarking details to docs/Debugging.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-08 13:28:08 -04:00
Florian Heilmann 64e6d85898 sam4e8e: Add the SAM4e8e port
This can be flashed to e.g. the duet wifi using bossac. It requires a
later version as is currently included in the klipper repo (1.8
vs. 1.2). Comms are currently via UART0 only, USB serial is still TBD

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2018-08-08 10:44:49 -04:00
Florian Heilmann d15c106288 lib: Add SAM4E CMSIS HAL
Obtained from Atmel.SAM4E_DFP.1.1.57.atpack

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2018-08-08 10:44:38 -04:00
Kevin O'Connor f067d0cc78 samd21: Minor fixes to usbserial
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-08 10:43:57 -04:00
Kevin O'Connor 2eaf3510ab test: Add SAMD21 compile test case
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-07 00:14:16 -04:00
Kevin O'Connor a5d27c55e1 docs: Update perf benchmarks with SAMD21 results
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-07 00:03:42 -04:00
Kevin O'Connor 0daf19c003 samd21: Add support for USB
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-07 00:03:41 -04:00
Kevin O'Connor cf2393efc8 samd21: Add support for gpio pins
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-07 00:03:21 -04:00
Kevin O'Connor 74cf4dc9e0 samd21: Initial support for SAMD21 micro-controllers
Add initial support for the Atmel SAMD21 micro-controllers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-07 00:03:18 -04:00
Kevin O'Connor 71db5fbe31 lib: Update samd21 code with local changes
A minor change is necessary to work with GCC's -flto and to work with
common bootloaders.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-07 00:02:44 -04:00
Kevin O'Connor 5633e6c249 lib: Add Atmel SAMD21 cmsis headers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-06 23:36:05 -04:00
Kevin O'Connor 50142cc1b3 armcm_irq: Enhance clear_active_irq() so it works on cortex-m0
Minor rework of the assembler so that it does not require thumb-2
instructions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-06 23:36:05 -04:00
Kevin O'Connor 635a199a47 usb_cdc: Allow USB endpoint ids to be board specific
It's common for boards to have restrictions on the type of each
endpoint.  So, make it possible for the board to select the endpoint
ids for each endpoint.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-06 23:36:05 -04:00
Kevin O'Connor f4910e119a lpc176x: Use common cmsis-core files
No need to include separate cmsis files from the mbed project - the
standard CMSIS_5 files work fine.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-06 23:36:05 -04:00
Kevin O'Connor 742048a08d lib: Remove the (now unused) cmsis-sam3x8e directory
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-06 23:36:05 -04:00
Kevin O'Connor e1146c04fd sam3x8e: Use SAM3X CMSIS files instead of arduino CMSIS files
Update the sam3x8e port use the most recent SAM3X CMSIS files from
Atmel.  The Atmel files appear to have a more consistent license and
it is unclear if there were Arduino specific changes in the CMSIS
files obtained from the Arduino repo.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-06 23:36:05 -04:00
Kevin O'Connor 8572cae9a0 lib: Modify SAM3X CMSIS files to work with GCC's lto feature
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-06 23:36:05 -04:00
Kevin O'Connor dd240f6471 lib: Add Atmel SAM3X CMSIS files
Add most recent SAM3X CMSIS files from Atmel.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-06 23:36:05 -04:00
Kevin O'Connor 454a873cb8 lib: Add CMSIS_5 files
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-06 23:36:05 -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 7783767c35 klippy: Move tracking of accessed config items into _read_config() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-03 18:54:23 -04:00
Kevin O'Connor cd24d61515 docs: Minor change to wording of junction speeds
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-03 15:48:07 -04:00
Kevin O'Connor 1fefd695de docs: Note square corner velocity in lookahead description
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-03 15:43:46 -04:00
Kevin O'Connor 43179d7b6c config: Minor changes to example-extras.cfg documentation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-03 13:00:40 -04:00
Kevin O'Connor 82738955d2 virtual_sdcard: Check if other events need to run after each file read
Periodically check if other events need to run - this prevents the
virtual_sdcard processing from starving other events.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-02 20:27:34 -04:00
Kevin O'Connor f2d232ef77 force_move: Provide defaults for SET_KINEMATIC_POSITION parameters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-02 08:58:18 -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 09a64d24f1 docs: Remove the Todo.md file
The Todo.md file has gotten stale, and it is no longer an effective
mechanism for tracking changes.  Remove it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 12:51:01 -04:00
Kevin O'Connor c0c892d524 force_move: Add support for FORCE_MOVE command
Add initial support for commands that will forcibly move a stepper
(without updating the kinematic classes with the new position).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 12:44:07 -04:00
Kevin O'Connor a434341aa9 force_move: Simplify STEPPER_BUZZ code
Separate the setup and movement parts of cmd_STEPPER_BUZZ() into their
own functions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 11:45:18 -04:00
Kevin O'Connor 2c5eba44ee force_move: Rename stepper_buzz.py to force_move.py
This is in preparation for extending the ability to make manual moves.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 11:15:51 -04:00
Kevin O'Connor 13ccb1a46f mcu: Minor whitespace changes
Wrap lines at 80 columns.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 10:54:31 -04:00
Kevin O'Connor 98580ac1c2 adc_temperature: Minor whitespace changes
Wrap lines at 80 columns.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 10:51:48 -04:00
Kevin O'Connor 334a839123 stepper: Minor whitespace changes
Wrap lines at 80 columns.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 10:18:10 -04:00
Kevin O'Connor 273a98d39a pins: Explicitly pass can_invert and can_pullup to lookup_pin()
Don't pass pin_type to lookup_pin() - instead, if a pin can be
inverted or can have a pullup, then the caller must explicitly specify
that when calling lookup_pin().  This simplifies the code for the
cases where it is not valid to invert or pullup.

Explicitly pass the pin_type to setup_pin() and have ppins.setup_pin()
apply default pullup and invert flags.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 09:44:45 -04:00
Kevin O'Connor 7a9553b38a thermocouple: Minor fixes
Send the temperature before checking for an out of range error (that
makes it easier to debug).

The query_thermocouple clock parameter is unpredictable and a value of
zero can't be used to disable the query - use rest_ticks instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-25 09:06:50 -04:00
Kevin O'Connor 7d0f3649f3 spi_temperature: The query_thermocouple command is an init command
Make sure to use is_init=True when sending query_thermocouple -
otherwise, the config CRC is likely to mismatch on every connection.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 19:50:11 -04:00
Kevin O'Connor 63dffd9307 spi_temperature: Provide a default value for spi_speed
All of the Maxim chips support a 4Mhz spi transfer rate, so use that
as a default spi speed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 15:49:14 -04:00
Kevin O'Connor 5b124d59f2 spi_temperature: Remove spi_mode parameter
All of the Maxim chips can use SPI mode 1, so no need to configure it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 15:47:17 -04:00
Kevin O'Connor 70f765f62f spi_temperature: Don't raise error on a fault - invoke a shutdown
Raising an error from the background message reception thread isn't
well defined.  Instead, on a temperature fault, invoke a printer
shutdown.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 15:20:45 -04:00
Kevin O'Connor a084c38b41 spi_temperature: Eliminate get_configs() callback
Those chips that require an spi init sequence can generate the message
directly in the chip specific class.

Also, don't send an spi init message for chips that are read-only.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 15:20:38 -04:00
Kevin O'Connor c52c398ae8 spi_temperature: Eliminate self.chip_type variable
The chip type is now always unique in each class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 15:00:23 -04:00
Kevin O'Connor f168032901 spi_temperature: Eliminate check_faults() callback
The faults can be checked from the calc_temp() method.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 14:54:31 -04:00
Kevin O'Connor f20dd0c9be spi_temperature: Break up thermocouple code into individual classes
Break the Thermocouple() class into MAX31856(), MAX31855(), and
MAX6675() classes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 14:54:31 -04:00
Kevin O'Connor 7510efe827 spi_temperature: Use setup_minmax() to set the temperature range
Use setup_minmax() instead of directly reading the min/max temperature
from the config.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 14:12:00 -04:00