diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
new file mode 100644
index 00000000..7af47c08
--- /dev/null
+++ b/.github/workflows/c-cpp.yml
@@ -0,0 +1,63 @@
+name: C/C++ CI
+
+on:
+ create:
+ tags:
+ - '*'
+jobs:
+ publish:
+ name: Publish for ${{ matrix.os }}-${{matrix.arch}}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ include:
+ - os: ubuntu-latest
+ artifact_name: bin/bossac
+ asset_name: qbossa
+ arch: amd64
+ suffix: -linux-amd64
+ - os: windows-latest
+ artifact_name: bin/bossac.exe
+ asset_name: qbossa
+ arch: i686
+ msystem: MINGW32
+ suffix: -win32.exe
+ - os: windows-latest
+ artifact_name: bin/bossac.exe
+ asset_name: qbossa
+ arch: x86_64
+ msystem: MINGW64
+ suffix: -win64.exe
+ - os: macos-latest
+ artifact_name: bin/bossac
+ asset_name: qbossa
+ arch: amd64
+ suffix: -mac
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Inject slug/short variables
+ uses: rlespinasse/github-slug-action@v3.x
+ - name: get msys2
+ uses: msys2/setup-msys2@v2
+ if: ${{matrix.os == 'windows-latest'}}
+ with:
+ msystem: ${{ matrix.msystem }}
+ install: git base-devel binutils mingw-w64-${{ matrix.arch }}-toolchain
+ release: false
+ - name: make (win)
+ if: ${{matrix.os == 'windows-latest'}}
+ shell: msys2 {0}
+ run: make bossac
+ - name: make (not win)
+ if: ${{matrix.os != 'windows-latest'}}
+ run: make bossac
+ - name: Upload file
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: ${{matrix.artifact_name}}
+ asset_name: ${{matrix.asset_name}}-${{env.GITHUB_REF_SLUG}}${{matrix.suffix}}
+ tag: ${{github.ref}}
+ overwrite: true
+ body: "Release ${{env.GITHUB_REF_SLUG}} of qNimble verion of BOSSA"
diff --git a/Makefile b/Makefile
index 63b2b017..f613c979 100644
--- a/Makefile
+++ b/Makefile
@@ -29,17 +29,23 @@ INSTALLDIR=install
# Determine OS
#
OS:=$(shell uname -s | cut -c -7)
-
+ifeq ($(OS),MSYS_NT)
+OS:=WIN
+else ifeq ($(OS),MINGW32)
+OS:=WIN
+else ifeq ($(OS),MINGW64)
+OS:=WIN
+endif
#
# Windows rules
#
-ifeq ($(OS),MINGW32)
+ifeq ($(OS),WIN)
# Use wxWindows development branch to work around font scaling issues on Windows
WXVERSION=3.1
EXE=.exe
COMMON_SRCS+=WinSerialPort.cpp WinPortFactory.cpp
COMMON_LDFLAGS=-Wl,--enable-auto-import -static -static-libstdc++ -static-libgcc
-COMMON_LIBS=-ltermcap -Wl,--as-needed -lsetupapi
+COMMON_LIBS=-Wl,--as-needed -lsetupapi
BOSSA_RC=BossaRes.rc
WIXDIR="C:\Program Files (x86)\WiX Toolset v3.11\bin"
CODE_SIGN=$(INSTALLDIR)\\code_sign.p12
diff --git a/README.md b/README.md
index 72b702fd..ecabde0e 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,7 @@ Supported Device Families
* SAMS70\*
* SAMV70\*
* SAMV71\*
+ * qNimble Quarto\*
\* Device families which are not tested for each release and could stop working.
diff --git a/src/BossaForm.cpp b/src/BossaForm.cpp
index ecda8792..bd713407 100644
--- a/src/BossaForm.cpp
+++ b/src/BossaForm.cpp
@@ -271,7 +271,7 @@ AboutDialog::AboutDialog( wxWindow* parent, wxWindowID id, const wxString& title
_bossaBitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
_topBoxSizer->Add( _bossaBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
- _titleStaticText = new wxStaticText( this, wxID_ANY, wxT("Basic Open Source SAM-BA Application"), wxDefaultPosition, wxDefaultSize, 0 );
+ _titleStaticText = new wxStaticText( this, wxID_ANY, wxT("qNimble's Basic Open Source SAM-BA Application"), wxDefaultPosition, wxDefaultSize, 0 );
_titleStaticText->Wrap( -1 );
_topBoxSizer->Add( _titleStaticText, 0, wxALL, 5 );
diff --git a/src/BossaForm.fbp b/src/BossaForm.fbp
index 8db460d2..9b6744a7 100644
--- a/src/BossaForm.fbp
+++ b/src/BossaForm.fbp
@@ -2678,7 +2678,7 @@
0
0
wxID_ANY
- Basic Open Source SAM-BA Application
+ qNimble's Basic Open Source SAM-BA Application
0
diff --git a/src/Device.cpp b/src/Device.cpp
index 0c94ae44..8e848c45 100644
--- a/src/Device.cpp
+++ b/src/Device.cpp
@@ -418,6 +418,14 @@ Device::create()
_family = FAMILY_SAMV71;
flashPtr = new EefcFlash(_samba, "ATSAMV71x21", 0x400000, 4096, 512, 1, 128, 0x20401000, 0x20404000, 0x400e0c00, false);
break;
+ //
+ // qNimble BOSSA-compatible bootloader
+ //
+ case 0x714e3000:
+ _family = FAMILY_SAM7X;
+ flashPtr = new EfcFlash(_samba, "qNimble BOSSAv1", 0x300000, 32768, 256, 1, 32, 0x202000, 0x220000, true);
+
+ break;
//
// No CHIPID devices
//
diff --git a/src/EfcFlash.cpp b/src/EfcFlash.cpp
index 9b212385..81b0c217 100644
--- a/src/EfcFlash.cpp
+++ b/src/EfcFlash.cpp
@@ -65,7 +65,7 @@ EfcFlash::EfcFlash(Samba& samba,
_canBootFlash(canBootFlash)
{
assert(planes == 1 || planes == 2);
- assert(pages <= planes * 1024);
+ assert(pages <= planes * 65536);
assert(lockRegions <= 32);
eraseAuto(true);
diff --git a/src/bossac.cpp b/src/bossac.cpp
index 11ebcade..c0f0f251 100644
--- a/src/bossac.cpp
+++ b/src/bossac.cpp
@@ -336,7 +336,7 @@ main(int argc, char* argv[])
{
if (config.help)
printf("Usage: %s [OPTION...] [FILE]\n", argv[0]);
- printf("Basic Open Source SAM-BA Application (BOSSA) Version " VERSION "\n"
+ printf("qNimble's Basic Open Source SAM-BA Application (qBOSSA) Version " VERSION "\n"
"Flash programmer for Atmel SAM devices.\n"
"Copyright (c) 2011-2018 ShumaTech (http://www.shumatech.com)\n"
);
@@ -344,9 +344,9 @@ main(int argc, char* argv[])
{
printf("\n"
"Examples:\n"
- " bossac -e -w -v -b image.bin # Erase flash, write flash with image.bin,\n"
+ " qbossac -e -w -v -b image.bin # Erase flash, write flash with image.bin,\n"
" # verify the write, and set boot from flash\n"
- " bossac -r0x10000 image.bin # Read 64KB from flash and store in image.bin\n"
+ " qbossac -r0x10000 image.bin # Read 64KB from flash and store in image.bin\n"
);
printf("\nOptions:\n");
cmd.usage(stdout);