mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
a638f31bce
In order to use the RIOT bootloader (riotboot) a header needs to be created and placed before the firmware. This tool generates such a header with the expected information by the bootloader. Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
37 lines
797 B
C
37 lines
797 B
C
/*
|
|
* Copyright (C) 2017 Kaspar Schleiser <kaspar@schleiser.de>
|
|
* 2018 Inria
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License v2. See the file LICENSE for more details.
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Header generation tool for RIOT firmware images
|
|
*
|
|
* @author Francisco Acosta <francisco.acosta@inria.fr>
|
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
int genhdr(int argc, char *argv[]);
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
char *usage = "genhdr generate [args]";
|
|
|
|
if (argc < 2) {
|
|
goto usage;
|
|
}
|
|
else if (!strcmp(argv[1], "generate")) {
|
|
return genhdr(argc - 1, &argv[1]);
|
|
}
|
|
|
|
usage:
|
|
fprintf(stderr, "usage: %s\n", usage);
|
|
return 1;
|
|
}
|