Skip to content

Commit

Permalink
Merge pull request #120 from K-Society/experimental
Browse files Browse the repository at this point in the history
Experimental
  • Loading branch information
maniglia committed Feb 11, 2024
2 parents 6ff1666 + f9916ee commit 7af43f8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,19 @@ jobs:
# path: build/**/Release/*.*nupkg

- name: Bump version and push tag
if: github.event_name == 'push' && github.repository_owner == 'K-Society' && (github.ref == 'refs/heads/master')
#if: github.event_name == 'push' && github.repository_owner == 'K-Society' && (github.ref == 'refs/heads/master')
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
custom_tag: ${{ steps.nbgv.outputs.SimpleVersion }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1.10.1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}

- name: Push to GitHub Packages
if: github.event_name == 'push' && github.repository_owner == 'K-Society' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
Expand Down
2 changes: 1 addition & 1 deletion docs/KSociety.SharpCubeProgrammer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Please make sure you have updated the firmware of your ST-LINK V2 / V3, you can
The STM32 CubeProgrammer_API is a C-library, created by ST for ST-Link access to micro-controllers
for the purpose of flash downloads or general memory access.
The ST-Link drivers is required, and can be downloaded from st.com and installed [(STSW-LINK009)](https://www.st.com/en/development-tools/stsw-link009.html).
This has been tested on Windows 10, you don't need to install cubeprogrammer.
This has been tested on Windows 10, you don't need to install STM32CubeProgrammer.

### KSociety.SharpCubeProgrammer
STM32CubeProgrammer_API C# wrapper, the first wrapper for C#. Any suggestions are welcome.
Expand Down
9 changes: 6 additions & 3 deletions src/01/KSociety.SharpCubeProgrammer/CubeProgrammerApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -770,12 +770,15 @@ public void DeleteInterfaceList()
/// <inheritdoc />
public void AutomaticMode(string filePath, string address, uint skipErase = 1U, uint verify = 1U, int isMassErase = 0, string obCommand = "", int run = 1)
{
if (!String.IsNullOrEmpty(filePath) || !String.IsNullOrEmpty(address))
if (!String.IsNullOrEmpty(filePath))
{
var filePathAdapted = filePath.Replace(@"\", "/");
var uintAddress = this.HexConverterToUint(address);
if (!String.IsNullOrEmpty(address))
{
var uintAddress = this.HexConverterToUint(address);

Native.ProgrammerApi.AutomaticMode(filePathAdapted, uintAddress, skipErase, verify, isMassErase, obCommand, run);
Native.ProgrammerApi.AutomaticMode(filePathAdapted, uintAddress, skipErase, verify, isMassErase, obCommand, run);
}
}
}

Expand Down

0 comments on commit 7af43f8

Please sign in to comment.