create github worklfow to build all firmware variants (all SKU default emulations)

This commit is contained in:
freepdk 2022-04-13 12:31:17 +02:00
parent 89fa3220bb
commit eac797a790
7 changed files with 92 additions and 31 deletions

23
.github/auto_build.sh vendored Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
set -x
build_sku () {
SKU=$1
make clean all DMO_SKU=${SKU}
cp build/freedmo.bin freedmo-default-sku-${SKU}.bin
}
build_sku S0722430
build_sku S0722550
build_sku S0722400
build_sku 1744907
build_sku 30857
build_sku 30336
DATE=$(date +'%Y%m%d')
GIT=$(git describe --tags --abbrev=0)
zip -9 "freedmo-firmware-all-${DATE}-${GIT}.zip" freedmo-default-sku-*.bin
exit 0

42
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: 'build'
on:
push:
branches:
- '*'
- 'feature/**'
workflow_dispatch:
jobs:
job-firmware:
name: 'build firmware'
runs-on: ubuntu-20.04
steps:
- name: 'checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'install packages'
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi
- name: 'compile firmware'
run: bash ./.github/auto_build.sh
- name: 'release assets'
if: startsWith( github.ref, 'refs/tags/releases/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: freedmo-firmware-all-*.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true

View File

@ -1,12 +0,0 @@
This is the complete firmware file.
You can write it to STM32F103 bluepill board with
- SWD upload using JLink2 and ST JLink Utility
or
- Serial upload using UART adapter and ST FlashLoader Demonstrator
This is the same procedure as uploading a USB bootloader:
https://www.electronicshub.org/how-to-upload-stm32f103c8t6-usb-bootloader
just select the "freedmo.bin" in "Download from file" (2)

Binary file not shown.

View File

@ -1,8 +1,8 @@
GCC_PATH = ./gcc-arm-none-eabi-10.3-2021.07/bin
#GCC_PATH = ./gcc-arm-none-eabi-10.3-2021.07/bin
BUILD_DIR = build
TARGET = freedmo
#DEBUG = 1
OPT = -Os
OPT = -std=c99 -Wall -Os -DDMO_SKU_$(DMO_SKU)
######################################
# source

View File

@ -2,6 +2,8 @@
Endless freedom for D.MO 550 series label writer printer.
[![Release](https://img.shields.io/github/release/free-dmo/free-dmo-stm32.svg?maxAge=60)](https://github.com/free-dmo/free-dmo-stm32/releases/latest) <== Click here to download
## Wiring
Components needed:
@ -51,8 +53,9 @@ Option 2: Install required ARM toolchain GNU Arm Embedded Toolchain from ARM:
Option 3: Use the precompiled firmware
* a precompiled firmware binary is available in the `COMPILED_FIRMWARE` folder
* a precompiled firmware binaries are available here: [Download](https://github.com/free-dmo/free-dmo-stm32/releases/latest)
You can choose one of the firmwares which has a default SKU for emulation (used when no real RFID tag is present)
## Download the firmware to the STM32F103 bluepill board
@ -107,9 +110,9 @@ You can choose from the list of included label data by selecting the SKU: <br/>
file: `Src/main.c`
~~~ C
#define DMO_SKU S0722430 // 54 x 101 mm, 220 pcs.
//#define DMO_SKU S0722550 // 19 x 51 mm, 500 pcs.
//#define DMO_SKU S0722400 // 36 x 89 mm, 50 pcs.
#define DMO_SKU_S0722430 // 54 x 101 mm, 220 pcs.
//#define DMO_SKU_S0722550 // 19 x 51 mm, 500 pcs.
//#define DMO_SKU_S0722400 // 36 x 89 mm, 50 pcs.
~~~
Happy printing... 😈

View File

@ -50,12 +50,12 @@ static void MX_I2C2_Init(void);
//
//choose between one of the dumped SKU (roll types) for emulation
#define DMO_SKU S0722430 // 54 mm x 101 mm / 2.125 in x 4 in / 220 pcs.
//#define DMO_SKU S0722550 // 19 mm x 51 mm / 0.75 in x 2 in / 500 pcs.
//#define DMO_SKU S0722400 // 36 mm x 89 mm / 1.4 in x 3.5 in / 50 pcs.
//#define DMO_SKU 1744907 // 102 mm x 152 mm / 4 in x 6 in / 220 pcs.
//#define DMO_SKU 30857 // 57 mm x 104 mm / 2.25 in x 4 in / 250 pcs.
//#define DMO_SKU 30336 // 25 mm x 51 mm / 1 in x 2.125 in / 500 pcs.
//#define DMO_SKU_S0722430 // 54 mm x 101 mm / 2.125 in x 4 in / 220 pcs.
//#define DMO_SKU_S0722550 // 19 mm x 51 mm / 0.75 in x 2 in / 500 pcs.
//#define DMO_SKU_S0722400 // 36 mm x 89 mm / 1.4 in x 3.5 in / 50 pcs.
//#define DMO_SKU_1744907 // 102 mm x 152 mm / 4 in x 6 in / 220 pcs.
//#define DMO_SKU_30857 // 57 mm x 104 mm / 2.25 in x 4 in / 250 pcs.
//#define DMO_SKU_30336 // 25 mm x 51 mm / 1 in x 2.125 in / 500 pcs.
//choose one of the dumped original tags for UID + signature emulation. It does not have to match the dumped data
#define SLIX2_TAG_EMU 1
@ -91,7 +91,7 @@ static const uint8_t DMO_TAG_SLIX2_SYSINFO[SLIX2_SYSINFO_LEN] = {0x0F,0xED,0
static const uint8_t DMO_TAG_SLIX2_SIGNATURE[SLIX2_SIGNATURE_LEN] = {0xAC,0xD4,0x3D,0x48,0xA8,0xDF,0xD5,0xC4,0x07,0xB7,0xEC,0x76,0xE9,0x79,0xBF,0xDA,0x70,0x44,0xDB,0x28,0xCB,0x80,0x6F,0xDD,0x0C,0x06,0x14,0x0E,0x50,0xF8,0x87,0x61};
#endif
#if DMO_SKU == S0722430
#if defined (DMO_SKU_S0722430)
static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //S0722430 54 x 101 mm, 220 pcs.
0x03,0x0A,0x82,0xED,0x86,0x39,0x61,0xD2,0x03,0x14,0x1E,0x32,0xB6,0xCA,0x00,0x3C,0x27,0xB3,0x98,0xBA,0x53,0x30,0x37,0x32,0x32,0x34,0x33,0x30,0x00,0x00,0x00,0x00,0x00,0xFF,0x04,0x01,0x01,0x00,0x00,0x00,
0x22,0x04,0x1E,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0xF0,0x03,0x1C,0x02,0x00,0x00,0x00,0x00,0x46,0x02,0xDC,0x00,0x78,0x2D,0x16,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@ -102,7 +102,8 @@ static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //S
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0xFF,0x00,0x01
};
#elif DMO_SKU == S0722550
#endif
#if defined (DMO_SKU_S0722550)
static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //S0722550 19 x 51 mm, 500 pcs.
0x03,0x0A,0x82,0xED,0x86,0x39,0x61,0xD2,0x03,0x14,0x1E,0x32,0xB6,0xCA,0x00,0x3C,0xEE,0x0D,0xBF,0xDF,0x53,0x30,0x37,0x32,0x32,0x35,0x35,0x30,0x00,0x00,0x00,0x00,0x00,0xFF,0x06,0x01,0x01,0x00,0x00,0x00,
0x29,0x02,0x1E,0x00,0x25,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0xFC,0x01,0x17,0x01,0x00,0x00,0x00,0x00,0x37,0x01,0xF4,0x01,0xF5,0x35,0x32,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@ -113,7 +114,8 @@ static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //S
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD9,0xFD,0x00,0x01
};
#elif DMO_SKU == S0722400
#endif
#if defined (DMO_SKU_S0722400)
static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //S0722400 36 x 89 mm, 50 pcs.
0x03,0x0A,0x82,0xED,0x86,0x39,0x61,0xD2,0x03,0x14,0x1E,0x32,0xB6,0xCA,0x00,0x3C,0x36,0x42,0x0C,0x33,0x53,0x30,0x37,0x32,0x32,0x34,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0xFF,0x04,0x01,0x01,0x00,0x00,0x00,
0xA3,0x03,0x1E,0x00,0x26,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x76,0x03,0x65,0x01,0x00,0x00,0x00,0x00,0x85,0x01,0x34,0x00,0x75,0x09,0x05,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@ -124,7 +126,8 @@ static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //S
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0xFF,0x00,0x01
};
#elif DMO_SKU == 1744907
#endif
#if defined (DMO_SKU_1744907)
static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //1744907 102 x 152 mm, 220 pcs.
0x03,0x0A,0x82,0xED,0x86,0x39,0x61,0xD2,0x03,0x14,0x1E,0x32,0xB6,0xCA,0x00,0x3C,0x86,0x50,0xB6,0x72,0x31,0x37,0x34,0x34,0x39,0x30,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x24,0x01,0x01,0x00,0x00,0x00,
0x73,0x06,0x1E,0x00,0x26,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x3A,0x06,0x14,0x04,0x00,0x00,0x00,0x00,0x33,0x04,0xDC,0x00,0xF1,0x46,0x16,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@ -135,7 +138,8 @@ static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //1
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0xFF,0x00,0x01
};
#elif DMO_SKU == 30857
#endif
#if defined (DMO_SKU_30857)
static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //30857 57 x 104 mm, 250 pcs.
0x03,0x0A,0x82,0xED,0x86,0x39,0x61,0xD2,0x03,0x14,0x1E,0x32,0xB6,0xCA,0x00,0x3C,0x06,0x2C,0xC7,0xF8,0x33,0x30,0x38,0x35,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x24,0x01,0x01,0x00,0x00,0x00,
0x22,0x04,0x1E,0x00,0x23,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0xF8,0x03,0x4C,0x02,0x00,0x00,0x00,0x00,0x6B,0x02,0xFA,0x00,0xAE,0x33,0x19,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@ -146,7 +150,8 @@ static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //3
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xED,0xFE,0x00,0x01
};
elif DMO_SKU == 30336
#endif
#if defined (DMO_SKU_30336)
static const uint8_t DMO_TAG_SLIX2_BLOCKS[SLIX2_BLOCKS*sizeof(uint32_t)] = { //30336 25 x 51 mm, 500 pcs.
0x03,0x0A,0x82,0xED,0x86,0x39,0x61,0xD2,0x03,0x14,0x1E,0x32,0xB6,0xCA,0x00,0x3C,0x8D,0xBA,0x04,0x96,0x33,0x30,0x33,0x33,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x24,0x01,0x01,0x00,0x00,0x00,
0x6B,0x02,0x1E,0x00,0x48,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x1C,0x02,0xFE,0x00,0x00,0x00,0x00,0x00,0x37,0x01,0xF4,0x01,0x73,0x3C,0x32,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,