Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MegaLinter #19

Merged
merged 11 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 80
max_line_length = 120
tab_width = 8
trim_trailing_whitespace = true

[*.yml;*.cmake;CMakeLists.txt]
[*.{cc,h,h.in}]
max_line_length = 80

[*.{html,man,so}]
max_line_length = 400

[*.{yaml,yml}]
indent_size = 2
tab_width = 2

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: CI
on: [push, pull_request]

Expand All @@ -8,7 +9,6 @@ permissions:
checks: write

jobs:

build:
name: Build and Test
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -43,7 +43,10 @@ jobs:
run: sudo apt install -y libgcrypt20-dev

- name: Configure
run: SHELL=$(which sh) CXX=$(echo ${{ matrix.compiler }} | sed -E 's/^(g|clang)(cc)?/\1++/') cmake -G Ninja -S . -B build
run: |
export SHELL=$(which sh)
export CXX=$(echo ${{ matrix.compiler }} | sed -E 's/^(g|clang)(cc)?/\1++/')
cmake -G Ninja -S . -B build

- name: Build
working-directory: build
Expand All @@ -55,7 +58,6 @@ jobs:
ninja test_arglex_ambiguous test_crc16 test_fletcher16 test_hyphen test_url_decode
ctest --output-junit ctest.junit.xml


docs:
name: Documentation
runs-on: ubuntu-22.04
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: MegaLinter
on: [push, pull_request]

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
name: MegaLinter
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: MegaLinter
uses: oxsecurity/megalinter/flavors/dotnet@v6
env:
# All available variables are described in documentation
# https://megalinter.github.io/configuration/
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
retention-days: 10
31 changes: 31 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# Configuration file for MegaLinter

DISABLE:
- ACTION # not relevant
- C # not relevant
- COPYPASTE
DISABLE_LINTERS:
- REPOSITORY_CHECKOV # not relevant
- REPOSITORY_TRIVY # not relevant
DISABLE_ERRORS_LINTERS:
- CPP_CPPLINT
- HTML_DJLINT
- HTML_HTMLHINT

# Formatting problems shall be reported as errors
FORMATTERS_DISABLE_ERRORS: false

# BASH:
# Test files use ". test_prelude.sh" which needs to be configured here
BASH_SHELLCHECK_ARGUMENTS: --external-sources --source-path=test
# Setup coding style
BASH_SHFMT_ARGUMENTS: --posix --indent 4 --space-redirects --func-next-line

# EDITORCONFIG:
# EditorConfig itself is configured in .editorconfig
EDITORCONFIG_EDITORCONFIG_CHECKER_ARGUMENTS: -disable-indent-size

# SPELL:
# cSpell is configured in .cspell.json
SPELL_MISSPELL_FILTER_REGEX_EXCLUDE: "(t0216a.sh)"
89 changes: 48 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,56 @@

The SRecord package is a collection of powerful tools for manipulating EPROM load files.

"I wrote SRecord because when I was looking for programs to manipulate EPROM load files, I could not find very many. The ones that I could find only did a few of the things I needed. SRecord is written in C++ and polymorphism is used to provide the file format flexibility and arbitrary filter chaining. Adding more file formats and filters is relatively simple, see the Reference Manual." -- Peter Miller (original author of SRecord)
> I wrote SRecord because when I was looking for programs to manipulate EPROM load files, I could not find very many.
> The ones that I could find only did a few of the things I needed. SRecord is written in C++ and polymorphism is
> used to provide the file format flexibility and arbitrary filter chaining. Adding more file formats and filters is
> relatively simple, see the Reference Manual.
> -- *Peter Miller (original author of SRecord)*

The SRecord package understands a number of file formats:

* **Ascii-Hex****: The ascii-hex format is understood for both reading and writing. (Also known as the ascii-space-hex format.)
* **ASM**: It is possible, for output only, to produce a series of DB statements containing the data. This can be useful for embedding data into assembler programs. This format cannot be read. Atmel Generic This format is produced by the Atmel AVR assembler. It is understood for both reading and writing.
* **BASIC**: It is possible, for output only, to produce a series of DATA statements cntaining the data. This can be useful for embedding data into BASIC programs. This format cannot be read.
* **BinaryBinary**: files can both be read and written.
* **B-Record**: Files in Freescale Dragonball bootstrap b-record format can be read and written.
* **C**: It is also possible to write a C array declaration which contains the data. This can be useful when you want to embed download data into C programs. This format cannot be read.
* **COE**: The Xilinx Coefficient File Format (.coe) is understood for output only.
* **Cosmac**: The RCA Cosmac Elf format is understood for both reading and writing.
* **DEC Binary**: The DEC Binary (XXDP) format is understood for both reading and writing.
* **Elektor Monitor (EMON52)**: The EMON52 format is understood for both reading and writing.
* **Fairchild Fairbug**: The Fairchild Fairbug format is understood for both reading and writing.
* **Formatted Binary**: The Formatted Binary format is understood for both reading and writing.
* **Four Packed Code (FPC)**: The FPC format is understood for both reading and writing.
* **Hexdump**: It is possible to get a simple hexdump as output.
* **HP64000 Absolute**: The HP64000 Absolute is understood for reading only.
* **IDT/sim**: The IDT/sim binary file format is understood for both reading and writing.
* **Intel**: The Intel hexadecimal format is understood for both reading and writing. (Also known as the Intel MCS-86 Object format.)
* **Intel AOMF**: The Intel Absolute Object Module Format (AOMF) is understood for both reading and writing.
* **Intel 16**: The Intel hexadecimal 16 format is understood for both reading and writing. (Also known as the INHX16 file format.)
* **LSI Logic Fast Load**: The LSI Logic Fast Load format is understood for both reading and writing. Logisim The Logisim format is understood for both reading and writing. See srec_logisim(5) for more information.
* **Memory Initialization Format**: The Memory Initialization Format (.mem) by Lattice Semiconductor is understood for writing only.
* **MIF**: The Memory Initialization File format by Altera is supported for both reading and writing.
* **MOS Technology**: The MOS Technology hexadecimal format is understood for both reading and writing.
* **MIPS-Flash**: The MIPS Flash file format is supported for both reading and writing.
* **Motorola S-Record**: The Motorola hexadecimal S-Record format is understood for both reading and writing. (Also known as the Exorciser, Exormacs or Exormax format.)
* **MsBin**: The Windows CE Binary Image Data Format is supported both for reading and writing.
* **Needham**: The Needham Electronics ASCII file format is understood for both reading and writing.
* **OS65V**: The Ohio Scientific hexadecimal format is understood for both reading and writing.
* **PPB**: The Stag Prom Programmer binary format is understood for both reading and writing.
* **PPX**: The Stag Prom Programmer hexadecimal format is understood for both reading and writing.
* **Signetics**: The Signetics format is understood for both reading and writing.
SPASM The SPASM format is used by a variety of PIC programmers; it is understood for both reading and writing.
* **Spectrum**: The Spectrum format is understood for both reading and writing.
* **Tektronix (Extended)**: The Tektronix hexadecimal format and the Tektronix Extended hexadecimal format are both understood for both reading and writing.
* **Texas Instruments Tagged**: The Texas Instruments Tagged format is understood for both reading and writing (both 8 and 16 bit). Also known as the TI-tagged or TI-SDSMAC format.
* **Texas Instruments ti-txt**: The TI-TXT format is understood for reading and writing. This format is used with the bootstrap loader of the Texas Instruments MSP430 family of processors.
* **TRS-80**: The Radio Shack TRS-80 object file format is understood for reading and writing.
* **VHDL**: It is possible to write VHDL file. This is only supported for output.
* **Verilog VMEM**: It is possible to write a Verilog VMEM file suitable for loading with $readmemh(). This format is supported for reading and writing.
* **Wilson**: The Wilson format is understood for both reading and writing. This mystery format was added for a mysterious type of EPROM writer.
* **Ascii-Hex**: input/output; also known as **ascii-space-hex**
* **ASM**: output only; for embedding data into *Assembler* code
* **Atmel Generic**: input/output; used by *Atmel AVR assembler*
* **BASIC**: output only; for embedding data into *BASIC* code
* **BinaryBinary**: input/output
* **B-Record**: input/output; also known as **Freescale Dragonball bootstrap b-record**
* **C**: output only; for embedding data into *C* code
* **COE**: output only; Extension `.coe`; also known as **Xilinx Coefficient File** format
* **Cosmac**: input/output; also known as **RCA Cosmac Elf** format
* **DEC Binary (XXDP)**: input/output
* **Elektor Monitor (EMON52)**: input/output
* **Fairchild Fairbug**: input/output
* **Formatted Binary**: input/output
* **Four Packed Code (FPC)**: input/output
* **Hexdump**: output only; a simple hexdump
* **HP64000 Absolute**: input only
* **IDT/sim**: input/output
* **Intel**: input/output; also known as **Intel MCS-86 Object** format
* **Intel Absolute Object Module Format (AOMF)**: input/output
* **Intel 16 (INHX16)**: input/output; also known as **Intel hexadecimal 16**
* **LSI Logic Fast Load**: input/output
* **Logisim**: input/output
* **Memory Initialization Format**: output only; Extension `.mem`; used by *Lattice Semiconductor*
* **MIF**: input/output; used by *Altera* **Memory Initialization File** format
* **MOS Technology**: input/output
* **MIPS-Flash**: input/output
* **Motorola S-Record**: input/output; also known as the **Exorciser**, **Exormacs** or **Exormax**
* **MsBin**: input/output; also known as **Windows CE Binary Image Data** format
* **Needham**: input/output; also known as **Needham Electronics ASCII file** format
* **OS65V**: input/output; also known as **Ohio Scientific hexadecimal** format
* **PPB**: input/output, also known as **Stag Prom Programmer binary**
* **PPX**: input/output, also known as **Stag Prom Programmer hexadecimal**
* **Signetics**: input/output
* **SPASM**: input/output; used by a variety of *PIC* programmers
* **Spectrum**: input/output
* **Tektronix**: input/output
* **Tektronix Extended**: input/output
* **Texas Instruments Tagged**: input/output (both 8 and 16 bit); also known as **TI-tagged** or **TI-SDSMAC**
* **Texas Instruments ti-txt**: input/output; used by bootstrap loader of *TI MSP430*
* **TRS-80**: input/output; used by *The Radio Shack*
* **VHDL**: output only
* **Verilog VMEM**: input/output; suitable for loading with `$readmemh()`
* **Wilson**: input/output; mysterious type of EPROM writer
sierrafoxtrot marked this conversation as resolved.
Show resolved Hide resolved

Full documentation and binary packages can be found at the [SRecord website](https://srecord.sourceforge.net/)
4 changes: 2 additions & 2 deletions RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COMPLETE CURRENT BRANCH DEVELOPMENT
then re-arrange the shortcut

aegis -remove-project-alias srecord.cur
segis -new-projet-alias srecord-1.63 srecord.cur
aegis -new-project-alias srecord-1.63 srecord.cur
ae_p srecord.cur

UPDATING THE CHANGE LOG
Expand Down Expand Up @@ -65,7 +65,7 @@ UPDATE SOURCEFORGE AND WEBSITE

now we update the aegis.repo on sf.net

./rsync-sourceorge
./rsync-sourceforge
(the name could be changed to be more informative, if you like)

./rsync-web-site
Expand Down
Loading