Allow the application start address to be configurable from "make
menuconfig".
Add a build check to verify the final binary can fit within the
configured size.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Some boards require an initial gpio state in order to start USB. Port
the initial_pins capability from Klipper to provide that support.
This also synchronizes scripts/buildcommands.py with the latest code
from Klipper.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add the sched.c code and associated DECL_INIT(), DECL_TASK() macros so
that it is easier to import low-level Klipper code into the CanBoot
repo.
These additional code wrappers do not increase the overall binary size
as gcc does a good job of inlining the wrappers and removing unused
code during the compile process.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
There is a severe corner case where two mcus could potentially be
assigned the same canbus_id and thus flash commands could go to the
wrong mcu. Add a get_canbus_id command to attempt to prevent this.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use Klipper's nodeid to canbus_id scheme (canbus_id = nodeid * 2 +
0x100). Instead, use a nodeid offset of 128 to avoid collisions with
Klipper.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It is possible that a user will flash the bootloader before
ever having flashed Klipper. In this case they would be
unable to supply a UUID.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>