Artifacts – They’re useful for firmware too!

Old maps piled on top of each other

Artifacts. What should you save, and what should you leave? As I am currently working with Gitlab, I’ll be talking a bit about how Gitlab uses them, but it can still apply to other repository platforms!

What are artifacts?

The easy-to-click button to download your artifacts

Artifacts are files or directories that are a result of one of your CI/CD pipeline stages. They can be in the form of output files, configuration files, reports, or any other resource you may want to get out of the process. For example, you may have a pipeline job running a linting program and you would like to see the report. You can have that job allow you to view and download it!

Why do I need artifacts for firmware?

Most developers that use Continuous Integration (CI) are going to know artifacts fairly well, but with firmware, CI isn’t as widely used. There are a couple of reasons that you may want to incorporate artifacts. Here, I’ll tell you why I think you’re missing out if you think it isn’t useful for your firmware.

For analysis and debugging automatically

We’ve talked about this before in some of our blogs, but firmware and embedded development seem to have fallen a bit out of date as compared to web or Android/iOS dev. The tools used for these other fields can be useful for us too!

Hex files, binary files, any kinds of outputs your firmware can dream of, can be produced and analyzed through continuous integration. We mentioned viewing and downloading them, but you can also pass the artifacts from one job into others that do analysis for you! Your hex files can be automatically installed on the test rig or sent to the testing team! Your automatic documentation can be instantly uploaded to your help pages! It takes away the the clunkiness and time that may have become part of your daily routine. As engineers, our time is expensive, and any time we can save by not doing boring repetitive tasks is not only good for our sanity, but good for business.

https://images.unsplash.com/photo-1524678714210-9917a6c619c2?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&ixid=eyJhcHBfaWQiOjYzOTIxfQ

Not as widely supported

Once you start digging in a bit to get your firmware building through CI, you might quickly find that the tools and programs you are running don’t have direct support through your CI processes, but don’t worry! I’ll let you in on how we handle these issues using EmbedOps.

How we solved this on EmbedOps, and an option that initially may take a bit of time to get started, is to setup your own personal gitlab-runner. We have done this with AWS EC2 machines as well as with local machines. Using the gitlab-runner, you can setup the exact environment you have inevitably webbed together to generate output files and analyze them.

After you’ve taken the time to set it up, and set up your artifacts, you can grab those output files and have them thrown through linting programs or others your firmware desires! Now you will have more time to get other work done! (Or grab more coffee. I won’t judge.)

Surely, since you have become convinced to throw some artifacts into your continuous integration processes in with your firmware, here is a quick look into how to add them to a build stage in gitlab’s configuration yaml (gitlab-ci.yml):

build:
  stage: build
  script:
    - do some build things
  artifacts:
    name: ThatFileYouNeed
    paths:
      - PATH/TO/FILE.out

Now that you know that artifacts can help you too, you’ll probably want a little more information. Head over to gitlab’s documentation on job artifacts to learn everything about how they can save you time and bring your firmware process up to date.

If you want all of the benefits listed here and none of the hassle of setting them up or maintaining them, consider reaching out! At DojoFive, we have talented engineers on hand ready to help you with all aspects of your EmbedOps journey. We are always happy to help with interesting problems that need solving. You can reach out at any time on LinkedIn or through email!

Discover why Dojo Five EmbedOps is the embedded enterprise choice for build tool and test management.

Sign up to receive a free account to the EmbedOps platform and start building with confidence..

  • Connect a repo
  • Use Dev Containers with your Continuous Integration (CI) provider
  • Analyze memory usage
  • Integrate and visualize static analysis results
  • Perform Hardware-in-the-Loop (HIL) tests
  • Install the Command Line Interface for a developer-friendly experience

Subscribe to our Monthly Newsletter

Subscribe to our monthly newsletter for development insights delivered straight to your inbox.

Interested in learning more?

Best-in-class embedded firmware content, resources and best practices

Best Practices for IIoT Firmware

Connected sensors are becoming increasingly ubiquitous across all sectors, and industrial and scientific products are no different. This category is becoming known as the industrial internet of things, or IIoT. When designing an IIoT device, engineers must consider a range of criteria that may not apply to other product categories. Industrial products are expected to be reliable, rugged, and able to serve their purpose for an extended period of time. And the environment these products operate in is particularly intense,

Read More »
Automating Reliability Engineering with CVE Scanning & EmbedOps (Part 3)

Automating Reliability Engineering with CVE Scanning & EmbedOps, Part 3

Parts 1 and 2 of this series showed just how easy it is to automate unit testing and hardware-in-the-loop (HIL) testing with Dojo Five EmbedOps, a build integration and automation platform for commercial embedded and IoT device development teams. Both articles provided practical guides for using EmbedOps to quickly build the typical tests that a developer might conduct for a Bluetooth Low Energy (BLE)-enabled sensor, such as finding overflow bugs or verifying over-the-air (OTA) device firmware updates (DFUs). The aim

Read More »

Modern Embedded Firmware Development Practices in the Warehouse Automation Industry

In the fast-paced world of warehouse automation, the development of embedded firmware is a critical aspect that underpins the efficiency and functionality of automated systems. This blog explores the multifaceted realm of modern embedded firmware development, as well as the innovative testing practices that help identify and mitigate bugs early in the process, leading to cost savings and more robust systems. Modern Embedded Firmware Development in the Warehouse Automation Industry Embedded firmware development is the unsung hero of the warehouse

Read More »