Skip to content

Commit d97052b

Browse files
committed
* BSL430.NET -fixed download bug, coercing int division
+ WPF - added message box for first upload + WPF - added close button into dialogs * docs, screenshots, wiki update
1 parent 3f7596d commit d97052b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2848
-108
lines changed

docs/wiki/BSL430.NET.Console-App.md

+44-27
Original file line numberDiff line numberDiff line change
@@ -77,54 +77,70 @@ Params
7777
Examples
7878
--------
7979
### BSL430.NET
80+
Run this app without any cmd or param to show welcome screen with all info, commands, params, examples and enums.
81+
```powershell
82+
BSL430.NET.Console.exe
83+
```
84+
![Scan](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_home.png)
85+
8086
#### Scan Devices
8187
Scan for all available devices.
8288
```powershell
83-
BSL430NET.exe -s all
89+
BSL430.NET.Console.exe -s all
8490
```
8591
Scan for all available devices and save XML output file.
8692
```powershell
87-
BSL430NET.exe --scan all -x scan.xml
93+
BSL430.NET.Console.exe --scan all -x scan.xml
8894
```
8995
Scan for single device
9096
```powershell
91-
BSL430NET.exe -s ftdi
92-
BSL430NET.exe -s serial
93-
BSL430NET.exe -s usb
94-
BSL430NET.exe -s libftdi
97+
BSL430.NET.Console.exe -s ftdi
98+
BSL430.NET.Console.exe -s serial
99+
BSL430.NET.Console.exe -s usb
100+
BSL430.NET.Console.exe -s libftdi
95101
```
96102
![Scan](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_scan2.png)
97103

98104
#### Upload to MCU
99105
Upload fw.hex to MSP430_F5xx via FTDI1 with default baud rate (9600 bd/s), standard invoke mechanism (shared JTAG pins).
100106
```powershell
101-
BSL430NET.exe -u FTDI1 -f fw.hex -m MSP430_F5xx -i SHARED_JTAG
107+
BSL430.NET.Console.exe -u FTDI1 -f fw.hex -m MSP430_F5xx -i SHARED_JTAG
102108
```
109+
![Upload](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_upload.png)
110+
103111
Same action, same settings, but now faster (115200 bd/s) and save XML log.
104112
```powershell
105-
BSL430NET.exe --upload FTDI1 -f fw.hex -m MSP430_F5xx -i SHARED_JTAG -b 115200 -x log.xml
113+
BSL430.NET.Console.exe --upload FTDI1 -f fw.hex -m MSP430_F5xx -i SHARED_JTAG -b 115200 -x log.xml
106114
```
107-
![Upload](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_upload.png)
115+
![Upload](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_upload2.png)
108116

109117
#### Download from MCU
110-
Download fw.txt (TI-TXT format) from MSP430_F5xx via COM1 with default baud rate (9600 bd/s), standard invoke mechanism (shared JTAG pins), from start address 0x8000, 0x7FFF byte count, with BSL password 32x 0xFF.
118+
Download fw.txt (TI-TXT format) from MSP430_F5xx via COM14 with default baud rate (9600 bd/s), standard invoke mechanism (shared JTAG pins), from start address 0x8000, 0x7FFE byte count, with BSL password 32x 0xFF.
111119
```powershell
112-
BSL430NET.exe -d COM1 -f fw.txt -o TI_TXT -m MSP430_F5xx -i SHARED_JTAG -a 0x8000 -z 0x7FFF -p FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
120+
BSL430.NET.Console.exe -d COM14 -f fw.txt -o TI_TXT -m MSP430_F5xx -i SHARED_JTAG -a 8000 -z 7FFE -p FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
113121
```
122+
![Download](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_download.png)
123+
124+
When MCU is not connected or disconnected, this error is shown:
125+
![Download](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_download_fail.png)
126+
127+
When incorrect password is provided, this error is shown:
128+
![Download](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_download_fail_pw.png)
129+
114130
Same action, same settings, but now faster (115200 bd/s), set output firmware line length to 64 bytes and save XML log.
115131
```powershell
116-
BSL430NET.exe --download COM1 -f fw.txt -o TI_TXT -m MSP430_F5xx -i SHARED_JTAG -a 0x8000 -z 0x7FFF -b 115200 -x log.xml -y 64 -p FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
132+
BSL430.NET.Console.exe --download COM14 -f fw.txt -o TI_TXT -m MSP430_F5xx -i SHARED_JTAG -a 8000 -z 7FFE -b 115200 -x log.xml -y 64 -p FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
117133
```
118-
![Download](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_download.png)
134+
![Download](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_download2.png)
119135

120136
#### Erase MCU
121-
Erase MSP430_F5xx via FTDI2 with standard invoke mechanism (shared JTAG pins).
137+
Erase MSP430_F5xx via FTDI1 with standard invoke mechanism (shared JTAG pins).
122138
```powershell
123-
BSL430NET.exe -e FTDI2 -m MSP430_F5xx -i SHARED_JTAG
139+
BSL430.NET.Console.exe -e FTDI1 -m MSP430_F5xx -i SHARED_JTAG
124140
```
125141
Same action, same settings, but now save also XML log.
126142
```powershell
127-
BSL430NET.exe --erase FTDI2 -m MSP430_F5xx -i SHARED_JTAG -x log.xml
143+
BSL430.NET.Console.exe --erase FTDI1 -m MSP430_F5xx -i SHARED_JTAG -x log.xml
128144
```
129145
![Erase](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_erase.png)
130146

@@ -133,48 +149,49 @@ BSL430NET.exe --erase FTDI2 -m MSP430_F5xx -i SHARED_JTAG -x log.xml
133149
#### Convert
134150
Convert firmware fw_ti.txt (auto-detected) to Intel-HEX format and save it as fw_intel.hex.
135151
```powershell
136-
BSL430NET.exe -c fw_ti.txt -f fw_intel.hex -o INTEL_HEX
152+
BSL430.NET.Console.exe -c fw_ti.txt -f fw_intel.hex -o INTEL_HEX
137153
```
138154
Same action, but now also fill data gaps with 0xFF and set custom output line length to 64 bytes.
139155
```powershell
140-
BSL430NET.exe --convert fw_ti.txt -f fw_intel.hex -o INTEL_HEX -l true -y 64
156+
BSL430.NET.Console.exe --convert fw_ti.txt -f fw_intel.hex -o INTEL_HEX -l true -y 64
141157
```
142158
![Convert](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_convert.png)
143159

144160
#### Combine
145161
Combine TI-TXT firmware fw_ti.txt (auto-detected) with INTEL-HEX firmware fw_intel.hex (auto-detected) and save it as SREC firmware fw_srec.s19.
146162
```powershell
147-
BSL430NET.exe -n fw_ti.txt -j fw_intel.hex -f fw_srec.s19 -o SREC
163+
BSL430.NET.Console.exe -n fw_ti.txt -j fw_intel.hex -f fw_srec.s19 -o SREC
148164
```
149165
Same action, but now also fill data gaps with 0xFF and set custom output line length to 24 bytes.
150166
```powershell
151-
BSL430NET.exe --combine fw_ti.txt -j fw_intel.hex -f fw_srec.s19 -o SREC -l true -y 24
167+
BSL430.NET.Console.exe --combine fw_ti.txt -j fw_intel.hex -f fw_srec.s19 -o SREC -l true -y 24
152168
```
153169
![Combine](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_combine.png)
154170

155171
#### Compare
156172
Compare ELF firmware fw_elf.out with TI-TXT firmware fw_ti.txt.
157173
```powershell
158-
BSL430NET.exe -r fw_elf.out -j fw_ti.txt
174+
BSL430.NET.Console.exe -k fw_elf.out -j fw_ti.txt
159175
160-
BSL430NET.exe --compare fw_elf.out -j fw_ti.txt
176+
BSL430.NET.Console.exe --compare fw_elf.out -j fw_ti.txt
161177
```
162178
![Compare](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_compare.png)
179+
![Compare](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_compare2.png)
163180

164181
#### Validate
165182
Validate ELF firmware fw_elf.out and get basic info.
166183
```powershell
167-
BSL430NET.exe -v fw_elf.out
184+
BSL430.NET.Console.exe -v fw_elf.out
168185
169-
BSL430NET.exe --validate fw_ti.txt
186+
BSL430.NET.Console.exe --validate fw_ti.txt
170187
```
171188
![Validate](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_validate.png)
172189

173190
#### Get BSL Password
174-
Get BSL password (16/20/32 bytes long) to use it for correct download/upload. Read docs for more info.
191+
Get BSL password (16/20/32 bytes long) to use it for correct download/upload of MSP430_F5xx MCU. Read docs for more info.
175192
```powershell
176-
BSL430NET.exe -r fw_intel.hex
193+
BSL430.NET.Console.exe -r fw_intel.hex -m MSP430_F5xx
177194
178-
BSL430NET.exe --get-password fw_intel.hex
195+
BSL430.NET.Console.exe --get-password fw_elf.out -m MSP430_F5xx
179196
```
180197
![Password](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/console_get_password.png)

docs/wiki/BSL430.NET.FirmwareTools.Library.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void ParseFirmware(string FwPath)
3838
Firmware fw1 = FwTools.Parse(FwPath); // Fw.Format = AUTO
3939
Firmware fw2 = FwTools.Parse(FwPath, FillFF: true); // gaps are filled with 0xFF
4040
Firmware fw3 = FwTools.Parse(FwPath, FwFormat.SREC); // Fw.Format = SREC
41-
Firmware fw4 = FwTools.Parse(FwPath, Log: new StringWriter()) // save parse log
41+
Firmware fw4 = FwTools.Parse(FwPath, Log: new StringWriter()); // save parse log
4242
}
4343
```
4444

docs/wiki/BSL430.NET.GUI-App.md

+35-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ BSL430.NET.WPF is built using **.NET Framework 4.6.1**. NET Core 3 (WPF) support
4141
Views
4242
-----
4343
### Scan
44-
Scan for available devices. It is important to have drivers installed for using FTDI devices (FTD2XX). If you dont want to or cant install them, please use libftdi. Other device types are USB or Serial (COM) port.
44+
Scan for available devices. It is important to have drivers installed for using FTDI devices (FTD2XX). If you dont want to or cant install them, please use libftdi. Other device types are USB or Serial (COM).
4545

4646
![Scan1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_scan2.png)
4747

@@ -92,37 +92,70 @@ This view implements all main functionality of sub-package **BSL430.NET.Firmware
9292
![FwTools2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_dark.png)
9393

9494
#### Convert
95-
Convert firmware TI-TXT, Intel-HEX or ELF format (auto detected) to firmware in TI-TXT, Intel-HEX or SREC format. There needs to be set output firmware format by combo-box and after clicking *Convert* button dialog windows opens. There is set output file path and optional check-box FillFF can be set (fill missing addr nodes with 0xFF and return monolithic piece of code). LineLength can be set via Tray Icon settings and it defines amount of data bytes per one text row. When = 0, default values are set (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
95+
Convert firmware TI-TXT, Intel-HEX or ELF format (auto detected) to firmware in TI-TXT, Intel-HEX or SREC format. There needs to be set **output firmware format** by combo-box and after clicking *Convert* button dialog windows opens. There is set **output file path** and optional check-box **FillFF** can be set (fill missing addr nodes with 0xFF and return monolithic piece of code). LineLength can be set via Tray Icon settings and it defines amount of data bytes per one text row. Default values are set (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
9696

9797
![Convert](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_convert.png)
9898

9999
#### Combine
100+
Combines two firmware files into single one with format specified. Usually, main firmware and EEPROM file is done this way, or main firmware and Info A flash content is merged. There needs to be set **output firmware format** by combo-box and after clicking *Convert* button dialog windows opens. There is set **second firmware path** and **output file path** and optional check-box **FillFF** can be set (fill missing addr nodes with 0xFF and return monolithic piece of code). LineLength can be set via Tray Icon settings and it defines amount of data bytes per one text row. Default values are set (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
101+
100102
![Combine](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_combine_dark.png)
101103

102104
#### Validate
105+
Validate firmware file and show dialog window with specific firmware information. **Reset Vector** is MSP430 specifics, other properties are universal. **Format**, **CRC16**, **First Addres** and **Last Address** are pretty straight forward. **Code Size** is real count of bytes from file, **Full Size** is size of all (even missing 0xFF nodes) data located in MCU memory. If parse log is availabe, there is button *Show Parse Log*. If firmware is Valid, also button *Compare* is shown, providing ability to quickly compare this firmware to another.
106+
103107
![Validate1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_validate.png)
104108
![Validate2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_validate_dark.png)
105109

106110
#### Hex Edit
111+
If firmware is valid, opens dedicated window with hex editor (WpfHexEdit). Intel-HEX, TI-TXT and SREC can also be edited and saved, ELF is read-only. Status bar shows important things like addresses, size or scale. For save click button *Save* or close window and answer Yes in Message Box. There is also zoom feature, hold CTRL with mouse wheel.
112+
107113
![HexEdit1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_hex_edit.png)
108114
![HexEdit2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_hex_edit_dark.png)
109115

110116
#### Get Password
117+
This is MSP430 specific property. Validate firmware file and display BSL password for Upload/Download. Password is last 16-byte (F543x-non-A only) or 32-byte (others) of IVT (FFE0-FFFF), if newer 5xx/6xx MCU is used. If MCU from older series is used (1xx/2xx/4xx), password is exactly 20-byte long. Mostly it is 32-byte. You need to specify **MCU** family first for displaying password with correct length.
118+
111119
![Password](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_password.png)
112120

113121
### About
122+
This is only informational window displaying build version, github site, author name and contact and also list of packages used in this assembly.
123+
114124
![About1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_about.png)
115125
![About2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_about_dark.png)
116126

117127
Features
118128
--------
119129
### Tray Icon Settings
130+
Tray icon is located at standard Windows tray bar, usually on right sight of start bar. For making things simple, BSL430.NET user settings can be set only from there.
131+
132+
| Main Menu | Sub Menu | Description |
133+
|----------------|------------------------------|-------------|
134+
| **Upload** | | Open Upload View.
135+
| **Download** | | Open Download View.
136+
| **Erase** | | Open Erase View.
137+
| **FW Tools** | | Open FW Tools View.
138+
| **BSL430.NET** | | Open About View.
139+
| Settings | **Download Size Range** | Set slider maximum property for Download view. Tweak this according to your MCU Flash memory size. Default is 128K.
140+
| Settings | **FW Write Line Length** | Defines amount of data bytes per one text row when creating firmware file. Default is AUTO -> TI-TXT = 16, Intel-HEX = 32, SREC = 32.
141+
| Settings | **Minimize To Tray Bar** | If true, when app is minimized, it hides from task bar and resides only in tray bar. Useful for long running.
142+
| Settings | **Shell Default Action** | Default action when either double clicked or right clicked on firmware file in windows explorer. Default is Validate.
143+
| Settings | **Shell File Association** | If true, firmware file extensions -> .hex .out .elf .s .srec .s19 .eep are associated with windows explorer for double click. Requires elevating Admin UAC rights.
144+
| Settings | **Shell Explorer Extension** | If true, any file right click in windows explorer opens menu with extensions and menu -> Open with BSL430.NET. Requires elevating Admin UAC rights.
145+
| Settings | **Reset User Settings** | Reset user settings to factory defaults. Requires elevating Admin UAC rights.
146+
| **Dark Mode** | | Switch to dark theme, useful when running app in night or dark environment.
147+
| **Exit** | | Exit Application.
148+
120149
![Tray1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_tray.png)
121150
![Tray2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_tray_dark.png)
122151

123152
### Shell Integration
124153
#### Shell Association
154+
This feature needs to be turned on in tray icon settings or at the first start by clicking Yes in Message Box. When turned on (requires UAC Admin elevation), double click in windows explorer opens BSL430.NET and perform default action, that is set also in tray icon settings, default is Validate firmware. Firmware file extensions involved are: **.hex .out .elf .s .srec .s19 .eep**. There is also unified logo for those files created by merging simple file and BSL430.NET logo.
155+
125156
![Association](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_shell_association.png)
126157

127158
#### Shell Extension
159+
This feature needs to be turned on in tray icon settings or at the first start by clicking Yes in Message Box. When turned on (requires UAC Admin elevation), right click any file opens popup menu box with menu item called **Open with BSL430.NET**. After clicking this menu item default action is done. This action is set also in tray icon settings, default is Validate firmware.
160+
128161
![Extension](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_shell_extensions.png)

0 commit comments

Comments
 (0)