Start working on bazel post for AVR
This commit is contained in:
parent
8d09a2b67a
commit
923ec1418a
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
|
"Bazel",
|
||||||
"microcontrollers"
|
"microcontrollers"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
layout: page
|
|
||||||
title: "Bringing the Bazel build system to 8-bit microcontrollers"
|
|
||||||
description: "My AVR software development workflow"
|
|
||||||
date: 2020-08-13 17:30:00
|
|
||||||
categories: avr embedded bazel
|
|
||||||
redirect_from:
|
|
||||||
- /post/68dk02l4/
|
|
||||||
- /68dk02l4/
|
|
||||||
---
|
|
||||||
|
|
||||||
The majority of my programming experience is in the following areas (in no particular order):
|
|
||||||
- Low level hardware programming
|
|
||||||
- The [NI Re-configurable I/O](https://www.ni.com/en-ca/shop/compactrio.html) based [Athena system](https://www.ni.com/en-us/shop/hardware/products/roborio-advanced-robotics-controller.html?skuId=65909)
|
|
||||||
- The [AVR](https://en.wikipedia.org/wiki/AVR_microcontrollers) based [ATmega32u4](https://www.microchip.com/wwwproducts/en/ATmega32u4)
|
|
||||||
- The [AVR](https://en.wikipedia.org/wiki/AVR_microcontrollers) based [ATmega328p](https://www.microchip.com/wwwproducts/en/ATmega328p)
|
|
||||||
- High level scripting
|
|
||||||
- Python
|
|
||||||
- JavaScript
|
|
||||||
- Control systems
|
|
||||||
- [Classical control theory](https://en.wikipedia.org/wiki/Classical_control_theory)
|
|
||||||
- [Modern control theory](https://en.wikipedia.org/wiki/Control_theory)
|
|
||||||
|
|
||||||
So far on my blog, I have covered each of these areas (and my mis-adventures) *except* AVR programming. Time to change that.
|
|
||||||
|
|
||||||
|
|
17
_drafts/2020-08-24-Bazel-and-AVR.md
Normal file
17
_drafts/2020-08-24-Bazel-and-AVR.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: "Compiling AVR-C code with a modern build system"
|
||||||
|
description: "Bringing Bazel to 8-bit microcontrollers"
|
||||||
|
date: 2020-08-24 9:30:00
|
||||||
|
categories: avr embedded bazel
|
||||||
|
redirect_from:
|
||||||
|
- /post/68dk02l4/
|
||||||
|
- /68dk02l4/
|
||||||
|
---
|
||||||
|
|
||||||
|
When writing software for an Arduino, or any other [AVR]()-based device, there are generally three main options. You can use the [Arduino IDE]() with [arduino-cli](), which is in my opinion, a clunky system that is great for high levels of abstraction and teaching people how to program, but lacks any kind of easy customization I am interested in. If you are looking for something more advanced (and works in your favorite IDE), you might look at [PlatformIO](). Finally, you can just program without any Hardware Abstraction Library at all, and use [avr-libc]() along with [avr-gcc]() and [avrdude]().
|
||||||
|
|
||||||
|
This final option is my favorite by far, as it both forces me to think about how the system I am building is actually working "behind the scenes", and lets me do everything exactly the way I want. Unfortunately, when working directly with the AVR system libraries, the only buildsystem / tool that is available (without a lot of extra work) is [Make](). As somebody who spends 90% of his time working with higher-level buildsystems like [Gradle]() and [Bazel](), I don't really like needing to deal with Makefiles, and manually handle dependency loading. This got me thinking. I have spent a lot of time working in Bazel, and cross-compiling for the armv7l platform via the [FRC Toolchain](https://launchpad.net/~wpilib/+archive/ubuntu/toolchain/). How hard can it be to add AVR Toolchain support to Bazel?
|
||||||
|
|
||||||
|
*The answer: Its pretty easy.*
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user