Commit Graph

48 Commits (5bf3ceff146931d3e34c9d6196f100f9fc8f1e42)

Author SHA1 Message Date
Yuri D'Elia 5bf3ceff14 Add a custom linker script and boot section
Instead of using __TEXT_REGION_LENGTH__ define a custom script to
enforce the available space for the .text section. The script also
defines a custom .boot section at the appropriate location.

This section can be abused in debug builds to take advantage of the
extra space. To do so, the optional function "boot" is placed at the
beginning of the section and jumps back to zero, allowing code to
continue unaffected.
2022-01-23 01:28:22 +01: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
Alex Voinea 47528c3bca USART hal prototype 2021-05-24 12:32:10 +02:00
D.R.racer 6ebb281eda Update CMakeFiles.txt and temporarily fix compilation of unit tests 2021-05-18 08:58:23 +02:00
D.R.racer 30fbf6d870 Unit tests for decoding requests and responses
+errors on requests
2021-05-18 08:18:11 +02:00
D.R.racer 0633dea881 Protocol implementation
+ unit tests for encoding of messages

API still subject to minor changes
2021-05-18 08:18:11 +02:00
Alex Voinea 15c56f2a1c Add F_CPU 2021-05-17 19:09:49 +03:00
Alex Voinea dc9528b4ea SPI hal: Winning combo 2021-05-17 09:01:22 +03:00
Alex Voinea ac4fdd30ad spi hal checkpoint 2021-05-17 08:42:21 +03:00
Alex Voinea 1887576429 Fix formatting with cmake-format 2021-05-13 17:38:21 +02:00
Alex Voinea 79d9fcbd5f Disassemble elf file after build 2021-05-13 17:38:21 +02:00
Alex Voinea 12527d0e53 add cpu hal to build 2021-05-13 17:38:21 +02:00
Alex Voinea 25ca5a19a3 Switch to the correct AVR MCU 2021-05-13 17:38:21 +02:00
D.R.racer 7eb346a54d Add first unit test
+proof of concept of Catch2 builds working in our repo
2021-05-13 17:35:08 +02:00
D.R.racer 9e489e4a57 Set correct MCU ID + output HEX files 2021-04-19 07:03:47 +02:00
D.R.racer 257d0ec340 Prepare parts of the build system
extracted and slightly modified from Buddy-FW, still doesn't work
2021-04-19 07:03:47 +02:00