Official firmware for the OpenAstroTracker.
MIT License
Official firmware for the OpenAstroTracker. Other important resources can be found here.
See the Changelog for details about what versions made what changes.
See .clang-format
file. A GitHub action is run on every PR to make sure that the code complies with the formatting guidelines.
clang-format
version 12. Note: not all distributions default to version 12
sudo apt install clang-format-12
sudo pacman -S clang
bash -c 'shopt -s nullglob globstar;GLOBIGNORE=./src/libs/TimerInterrupt/*; for i in ./{.,src/**,unit_tests,boards/**}/*.{c,cpp,h,hpp}; do clang-format -i $i; done'
This is an open source project and everyone is welcome to contribute. We will be following these rules while reviewing your pull request:
Even if Arduino IDE is supported, we highly recommend using VSCode with PlatformIO for development. It allows automatic dependency management, powerful IDE, debugging, automatic build flags definition and more.
⚠️ Debugging is only supported on mega2560 platforms at the moment!
For this example we will be using the ramps
environment, but you can use any derived environment as well
You may need to set
debug_port
in yourplatformio.ini
, platformio says it will auto-detect the port but it doesn't seem to be working at the moment
Start a gdb shell debugging the current firmware:
pio run -e ramps -t clean # Clean the environment
piodebuggdb -e ramps # Initialize a debug session.
# This will build the firmware in debug mode, and then initialize a remote gdb session
# You may have visual debug capabilities in your IDE if it has platformio integration as well
When using avr-stub
as a debug interface, it requires 2 things:
Serial
are disabled in a debug build (Serial1
, Serial2
etc are ok)WInterrupts.c
) to disable the ISR registration. The implementation of this is in pre_script_patch_debug.py
, which should happen automagicallyNote that while avr-stub is in RAM mode, the firmware will run very slowly and timing-related functions might not work correctly
Debugging is still a bit flakey, so you may need to try multiple times in order to get a solid debugging session.
More information is available in the avr-stub documentation