Commit Graph

64 Commits (7e2375deee99ea4fce092315a188b63266b979d6)

Author SHA1 Message Date
Alex Voinea 0e896cae85 Fix bootloader file generation 2022-11-15 10:43:34 +01:00
VintagePC 8ae82dd6b3 Build bootloader hex too 2022-11-11 16:28:39 +01:00
Alex Voinea c2601d9a34 Revert accidental change
Fix windows build
2022-10-20 12:31:12 +02:00
D.R.racer 44454fd8d9 Fix formatting 2022-10-20 12:09:42 +02:00
D.R.racer 0e427ae37c Disable -mrelax due to avr-gcc/linker bugs 2022-10-20 12:09:42 +02:00
Yuri D'Elia 9f39b373a9 build: Set -mrelax to remove trampolines while linking
Avr GCC automatically marks all indirect calls for trampoline generation
irregardless of the target.

This can be avoided by forcing -mshort-calls or using -mrelax that
removes the trampoline at link time (after the call location has been
proven to be reachable).

This saves 510 bytes on the current build (the trampolines section is
now empty as expected).
2022-10-17 17:22:21 +02:00
Yuri D'Elia 03e1757b0f cmake: Reformat 2022-10-10 15:19:58 +02:00
Yuri D'Elia d287ab2357 cmake: Full reproducibility support 2022-10-10 15:19:58 +02:00
Yuri D'Elia ea38115152 cmake: Generate correct inline source listings in asm output
Manually provide a source path prefix to objdump
2022-10-10 15:19:58 +02:00
Yuri D'Elia 74dfb27c20 cmake: Improve AVR target flags
- Filter C++-only flags correctly
- Split sections correctly at link time with LTO
- Remove uneeded linker flags
2022-10-10 15:19:58 +02:00
Yuri D'Elia c6b600d623 cmake: Strip prefix from debug info
Paves the way for some extra reproducibility.
2022-10-10 15:19:58 +02:00
Yuri D'Elia 38657f5d77 cmake: Improved way to set default compiler flags 2022-10-10 15:19:58 +02:00
vintagepc fdb2058d2b Fix test build 2022-08-11 10:26:42 +02:00
VintagePC 1bc5fdaec4 Fix filename passing to hex modifier 2022-07-27 17:04:52 +02:00
Yuri D'Elia d9355249a0 Enable LTO 2022-07-25 10:27:16 +02:00
Yuri D'Elia d34b79b087 Update standard to c++17 2022-07-25 10:27:16 +02:00
VintagePC 7418e3643e Add cmake code to prepend the Prusa Magic™ 2022-07-25 09:09:22 +02:00
Yuri D'Elia 1623f315af Ensure code doesn't overflow into the MMU bootloader
Take advantage of __TEXT_REGION_LENGTH__ in the avr5 linker script to
preset the effective available space in the flash.

This ensures we don't overflow into the bootloader.
2022-01-19 13:56:33 +01:00
Yuri D'Elia b3c53b8a85 Move linker script configuration inside into a single spot
Use a block comment to avoid cmake-format messing up the relevant
newlines
2022-01-19 13:56:33 +01:00
Alex Voinea 26fd53251b Checkpoint 2021-09-20 17:31:45 +02:00
Alex Voinea 21ad153941 Add compile options 2021-09-20 17:31:26 +02:00
Alex Voinea 44b160c2c1 Fix warnings 2021-09-20 17:31:26 +02:00
Alex Voinea c2411619dd Set LUFA F_USB 2021-09-20 17:31:26 +02:00
Yuri D'Elia 448edfd84b Add -fno-rtti to ensure no RTTI is generated
As for the MK3, we should never depend on RTTI in the FW
2021-08-24 16:16:34 +02:00
Yuri D'Elia 787c73ecff Merge remote-tracking branch 'upstream/main' into motion_wip 2021-07-12 10:25:06 +02:00
Alan Dragomirecký 332c740a8b Do not build the firmware target when crosscompiling 2021-07-12 09:09:21 +02:00
Alan Dragomirecký 5018c44489 Do not include the utils directory 2021-07-12 09:09:21 +02:00
Alan Dragomirecký 09819cb1aa Split the main CMakeLists.txt into more files within subdirectories 2021-07-12 09:09:21 +02:00
Alan Dragomirecký ed72b07e04 Remove `include` from header search paths 2021-07-12 09:09:21 +02:00
Alan Dragomirecký 99b847bf98 Remove the PRINTER cmake option and other irrelevant code 2021-07-12 09:09:21 +02:00
Yuri D'Elia d87db1ff76 Revised WIP for the Motion API
- Remove the combined PlanMove(a,b,c,rate) call. If we allow the units
  of the various motors to be changed at compile time, the unit of
  rate can vary between axes.
- Build PlanMove on top of the absolute PlanMoveTo.
- Add required stubs for TMC2130.
- Allow each axis mode to be set independently, since we have this
  feature for free anyway.
- Rework internals to use PulseGen data types and structs.
2021-07-07 16:59:39 +02:00
Yuri D'Elia e990b703e3 CMake: reformat 2021-07-07 16:59:04 +02:00
Yuri D'Elia 531f60ed27 Add modules::speed_table for acceleration lookup tables 2021-07-07 16:59:04 +02:00
D.R.racer 9a8038ccb6 Add user_input module and use it instead of raw buttons
Encapsulates buttons and commands coming from the communication
2021-06-30 07:39:31 +02:00
D.R.racer ede475c5a6 Introduce Timebase module, refactor timing code + unit tests 2021-06-21 10:22:17 +02:00
D.R.racer d6c9e58e66 Add global state hive
+ solve many TODO's in the code (active slot/extruder and filament loaded flag)
2021-06-16 06:43:20 +02:00
Yuri D'Elia 070552200a Use cmake's binutils paths for custom targets
Again, this fixes the build when multiple versions of binutils/avr
toolchains are avalable.
2021-06-14 07:36:17 +02:00
D.R.racer 9e4bd97968 Add empty EEPROM HAL implementation 2021-06-14 07:34:59 +02:00
D.R.racer dfb57bcae5 Add Load filament state machine
+ printer's fsensor (external) module
+ state machine for loading to bondtech
2021-06-14 07:34:59 +02:00
D.R.racer 7bfc1bad97 Cut filament prototype state machine 2021-06-14 07:34:59 +02:00
D.R.racer 05ff998c01 Lay out the other high-level commands/operations
- cut, eject, load filament, toolchange
- uncomment them in main.cpp
- their implementation is still empty
2021-06-14 07:34:59 +02:00
D.R.racer 5b4eb0cee3 Extract Unload filament into a separate file
+ cleanup the object structure
+ add no_command as the starting "operation" to simplify the rest of the command handling at runtime
2021-06-14 07:34:59 +02:00
D.R.racer 6f1624b718 Make logic prototype compilable 2021-06-14 07:34:59 +02:00
D.R.racer 019f74d6f2 Add debouncing for FINDA 2021-06-08 07:00:07 +02:00
D.R.racer c4b181e842 Update CMakeLists.txt 2021-06-08 07:00:07 +02:00
D.R.racer 3ef113cf6c Add basic motion API 2021-06-08 06:59:49 +02:00
D.R.racer 004db59da0 Add shift register interface and improve LED integration with it 2021-05-26 09:29:32 +02:00
D.R.racer 6cb072ce79 Rebase onto main + clean up the code a bit 2021-05-25 11:55:28 +02:00
D.R.racer fce2195558 Interface module for driving LEDs
+ start shaping up main.cpp
+ make the usage of namespaces and class names more consistent throughout the whole project
+ refactor related unit tests accordingly
2021-05-25 11:00:30 +02:00
D.R.racer ba8eacfe33 Buttons module implementation
A module representing a model of the 3 buttons
Includes a unit test project (empty at this stage)
2021-05-25 10:02:02 +02:00