Skip to content

Commit 3f7596d

Browse files
committed
* readme and docs update
1 parent 0c02d5b commit 3f7596d

File tree

6 files changed

+142
-14
lines changed

6 files changed

+142
-14
lines changed
File renamed without changes.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Library **FwTools** is *static*, because it doesnt hold any state or use any ins
3030
Code Samples
3131
------------
3232
### Parse
33-
Parse firmware file from FirmwarePath in TI-TXT, Intel-HEX or ELF format and returns List of FwNode (Data+Addr) and Info. Auto Mode reads data and based on some particular characters determine what firmare format it should be. FillFF is optional parameter forcing to fill missing addr nodes with 0xFF and return monolithic piece of code, which is usefull for crc calc or overwriting whole memory in mcu. Log writes text (new line formatted) output only when parsing ELF firmware file.
33+
Parse firmware file from FirmwarePath in TI-TXT, Intel-HEX, ELF or SREC format and returns List of FwNode (Data+Addr) and Info. Auto Mode reads data and based on some particular characters determine what firmare format it should be. FillFF is optional parameter forcing to fill missing addr nodes with 0xFF and return monolithic piece of code, which is usefull for crc calc or overwriting whole memory in mcu. Log writes text (new line formatted) output only when parsing ELF firmware file.
3434

3535
```csharp
3636
public void ParseFirmware(string FwPath)
@@ -43,7 +43,7 @@ public void ParseFirmware(string FwPath)
4343
```
4444

4545
### Create
46-
Create firmware multi-line string in TI-TXT or Intel-HEX format. ELF is not supported yet. AUTO format will force TI-TXT format. AddrStart is address of first byte in data collection. LineLength defines amount of data bytes per one text row. When = 0, default values are set (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
46+
Create firmware multi-line string in TI-TXT, Intel-HEX or SREC format. ELF is not supported yet. AUTO format will force TI-TXT format. AddrStart is address of first byte in data collection. LineLength defines amount of data bytes per one text row. When = 0, default values are set (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
4747

4848
```csharp
4949
public void CreateFromFirmware(Firmware Fw)
@@ -69,7 +69,7 @@ public void CreateFromFwNodes(ICollection<FwNode> FwNodes)
6969
```
7070

7171
### Convert
72-
Convert firmware TI-TXT, Intel-HEX or ELF format (auto detected) to firmware in TI-TX or Intel-HEX format. Returned Fw is firmware and Format is useful for auto-detect feedback, indicates input format. FillFF is optional parameter forcing to fill missing addr nodes with 0xFF and return monolithic piece of code, which is usefull for crc calc or overwriting whole memory in mcu. LineLength defines amount of data bytes per one text row. When = 0, default values are set (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
72+
Convert firmware TI-TXT, Intel-HEX, ELF or SREC format (auto detected) to firmware in TI-TXT, Intel-HEX or SREC format. Returned Fw is firmware and Format is useful for auto-detect feedback, indicates input format. FillFF is optional parameter forcing to fill missing addr nodes with 0xFF and return monolithic piece of code, which is usefull for crc calc or overwriting whole memory in mcu. LineLength defines amount of data bytes per one text row. When = 0, default values are set (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
7373

7474
```csharp
7575
public void ConvertFirmware(string FwPath)

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

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
BSL430.NET.GUI App
2+
------------------
3+
BSL430.NET.GUI App is .NET WPF app wrapping BSL430.NET functions with nice graphical interface. It is Windows only, so if you run Linux, you should check out [Console App](https://github.com/parezj/BSL430.NET/wiki/BSL430.NET.Console-App). For more details please read docs here at wiki [BSL430.NET Library](https://github.com/parezj/BSL430.NET/wiki/BSL430.NET.Library) or [FirmwareTools](https://github.com/parezj/BSL430.NET/wiki/BSL430.NET.FirmwareTools.Library), especially [**Device Set Up**](https://github.com/parezj/BSL430.NET/wiki/BSL430.NET.Library#Device-Set-Up), because each time you init communication with MCU, you need to correctly set device up (*MCU*, *InvokeMechanism*, *BaudRate*, *Password*). App functionality is split into *Views*: **Upload**, **Download**, **Erase** and **FW Tools**. There are also some nice *features* included, like integration with Windows Explorer (Shell) in form of **shell ext association** (firmware files double click open), or **shell extension** (right click menu). App **settings** are managed from tray icon.
4+
5+
```
6+
Note: This app packs all (un)managed libraries into single assembly.
7+
User settings, logs, log backup and exe shadow copy are stored at:
8+
C:\Users\<NAME>\AppData\Local\Jakub Parez\BSL430.NET.WPF\
9+
```
10+
- [System Requirements](#System-Requirements)
11+
- [Views](#Views)
12+
- [Scan](#Scan)
13+
- [**Upload**](#Upload)
14+
- [**Download**](#Download)
15+
- [**Erase**](#Erase)
16+
- [XML Log](#Erase)
17+
- [**Firmware Tools**](#Firmware-Tools)
18+
- [Convert](#Convert)
19+
- [Combine](#Combine)
20+
- [Validate](#Validate)
21+
- [Hex Edit](#Hex-Edit)
22+
- [Get Password](#Get-Password)
23+
- [About](#About)
24+
- [Features](#Features)
25+
- [**Tray Icon Settings**](#Tray-Icon-Settings)
26+
- [**Shell Integration**](#Shell-Integration)
27+
- [Shell Association](#Shell-Association)
28+
- [Shell Extension](#Shell-Extension)
29+
30+
System Requirements
31+
-------------------
32+
BSL430.NET.WPF is built using **.NET Framework 4.6.1**. NET Core 3 (WPF) support is only experimental and would be interesting after .NET Core and WPF will go out better than today (.NET Core 3.0 Preview is first to implement WPF but not fully and without problems). Each architecture (x86, amd64) has its own build as unmanaged libraries are involved, but there are no significant differences when using x86 or amd64 build.
33+
- Framework
34+
- .NET Framework 4.6.1
35+
- *.NET Core 3.0 (experimental)*
36+
- OS
37+
- Windows 7, 8, 8.1, 10
38+
- x86
39+
- amd64
40+
41+
Views
42+
-----
43+
### 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.
45+
46+
![Scan1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_scan2.png)
47+
48+
### Upload
49+
Uploading code to micro is the most common way how use this library. First device needs to be set up (MCU family, Invoke Method, Baud Rate) according to [docs](https://github.com/parezj/BSL430.NET/wiki/BSL430.NET.Library#Device-Set-Up). Then You need to select **firmware file path** in formats Intel-HEX, TI-TXT, SREC or ELF. Password, key to unlock bootloader, is here optional, because mostly you want dont know it and also doesnt care about that data, because they are being overwriten with new one. However there are two use cases, when good password matters. First, you already uploaded main firmware to your device and now you want to upload only Info A memory (user settings, constants..). In this case you dont want to Erase MCU first, so you need to supply valid BSL password. Secondly, read warning below:
50+
```
51+
Warning: Password is optional for Download, but if wrong password is entered,
52+
MCU takes it as an attack and erase all memory, executing Mass Erase.
53+
If modern 5xx/6xx micro is used, code is just wiped, but if old
54+
1xx/2xx/4xx one is used and LOCK A bit is not set, also Info A mem
55+
is wiped, with factory calibration data. So please be careful.
56+
```
57+
![Upload1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_upload.png)
58+
![Upload2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_upload2_dark.png)
59+
60+
### Download
61+
Downloading code from micro is useful only sometimes, like when solving a problem with some remote device. First device needs to be set up (MCU family, Invoke Method, Baud Rate) according to [docs](https://github.com/parezj/BSL430.NET/wiki/BSL430.NET.Library#Device-Set-Up). Then You need to select firmware destination path and output format. Also **Start Addr** and **Byte Size** settings are crucial, which are the address of the very first data node wanted, and the count of bytes downloaded. You can toggle the button **K/1** and switch between scaler of download range. If *1* is set, values are in standard decimal units 1:1, if *K* is set, values are multiplied by 1024. Password is key to unlock bootloader and needs to be set correctly, otherwise bad things happen. Read below.
62+
```
63+
Warning: Password is needed for Download. If wrong password is entered, MCU
64+
takes it as an attack and erase all memory, executing Mass Erase.
65+
If modern 5xx/6xx micro is used, code is just wiped, but if old
66+
1xx/2xx/4xx one is used and LOCK A bit is not set, also Info A mem
67+
is wiped, with factory calibration data. So please be careful.
68+
```
69+
![Download1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_download2.png)
70+
![Download2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_download_dark.png)
71+
72+
### Erase
73+
Erasing micro is also sometimes needed and doesnt require any input data, nor it cares about set Baud Rate value. Just call this method and quickly all memory is erased. Device needs to be set up first (MCU family, Invoke Method, Baud Rate) according to [docs](https://github.com/parezj/BSL430.NET/wiki/BSL430.NET.Library#Device-Set-Up).
74+
```
75+
Warning: If old 1xx/2xx/4xx MCU is used and LOCK A bit is not set **DONT** do it!
76+
Info A memory will be erased as well, with factory calibration data.
77+
This will also happen when incorrect password entered, so be careful.
78+
Or just dont use old micros and buy a new better one :)
79+
```
80+
![Erase1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_erase.png)
81+
![Erase2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_erase2_dark.png)
82+
83+
### XML Log
84+
All main operations are logged into XML file located at *C:\Users\<NAME>\AppData\Local\Jakub Parez\BSL430.NET.WPF\*. You can open this log file by embedded explorer (AvalonEdit) by clicking *XML Log* or you cant just simply navigate into that folder by file explorer. If log file grows larger than 2MB, after app start you will be notified of moving this file to backup folder at same location and creating a new blank one.
85+
86+
![Log1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_log.png)
87+
![Log2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_log_dark.png)
88+
89+
### Firmware Tools
90+
This view implements all main functionality of sub-package **BSL430.NET.FirmwareTools**. These functions are universal except of *Get Password*, which is MSP430 specific. First there needs to be chosen (first) firmware file path.
91+
![FwTools1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools.png)
92+
![FwTools2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_dark.png)
93+
94+
#### 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).
96+
97+
![Convert](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_convert.png)
98+
99+
#### Combine
100+
![Combine](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_combine_dark.png)
101+
102+
#### Validate
103+
![Validate1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_validate.png)
104+
![Validate2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_validate_dark.png)
105+
106+
#### Hex Edit
107+
![HexEdit1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_hex_edit.png)
108+
![HexEdit2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_hex_edit_dark.png)
109+
110+
#### Get Password
111+
![Password](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_fw_tools_password.png)
112+
113+
### About
114+
![About1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_about.png)
115+
![About2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_about_dark.png)
116+
117+
Features
118+
--------
119+
### Tray Icon Settings
120+
![Tray1](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_tray.png)
121+
![Tray2](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_tray_dark.png)
122+
123+
### Shell Integration
124+
#### Shell Association
125+
![Association](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_shell_association.png)
126+
127+
#### Shell Extension
128+
![Extension](https://raw.githubusercontent.com/parezj/BSL430.NET/master/img/screenshots/wpf_gui_shell_extensions.png)

docs/wiki/BSL430.NET.Home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- [[Library|BSL430.NET.Library]] - docs and code samples for copy paste
66
- [[Console App|BSL430.NET.Console-App]] - docs, commands, params, examples
7-
- [[GUI App|BSL430.NET.GUI-App]] - first start quick go-through
7+
- [[GUI App|BSL430.NET.GUI-App]] - docs, screenshots, how to use go-through
88
- [[Wiring Diagram|BSL430.NET.Wiring]] - how to connect MCU to BSL430.NET
99
- [Releases](https://github.com/parezj/BSL430.NET/releases)
1010

docs/wiki/BSL430.NET.Library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public void UploadDetailed()
236236
}
237237
```
238238
### Download from MCU
239-
Downloading code from micro is useful only sometimes, like when solving a problem with some remote device. This method needs to be called with AddrStart, which is the address of the very first data node wanted, next DataSize is required, as this is the count of bytes downloaded counting AddrStart. Password is key to unlock bootloader. Before call you need to set up device acording to specific situation, MCU family, Invoke Method and Baud Rate (already described). After calling data can be processed, so the Firmware Output Path is the location of created firmware made from downloaded data, formated in FwFormat specified. StatusEx is returned holding complete result info data.
239+
Downloading code from micro is useful only sometimes, like when solving a problem with some remote device. This method needs to be called with AddrStart, which is the address of the very first data node wanted, next DataSize is required, as this is the count of bytes downloaded starting from AddrStart. Password is key to unlock bootloader. Before call you need to set up device acording to specific situation, MCU family, Invoke Method and Baud Rate (already described). After calling data can be processed, so the Firmware Output Path is the location of created firmware made from downloaded data, formated in FwFormat specified. StatusEx is returned holding complete result info data.
240240
```
241241
Warning: Password is needed for Download. If wrong password is entered, MCU
242242
takes it as an attack and erase all memory, executing Mass Erase.

src/BSL430.NET.FirmwareTools/FwTools.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ public class BslPasswords
368368
#region Public Methods
369369

370370
/// <summary>
371-
/// Parse firmware file from FirmwarePath in TI-TXT, Intel-HEX or ELF format and returns List of FwNode
371+
/// Parse firmware file from FirmwarePath in TI-TXT, Intel-HEX, ELF or SREC format and returns List of FwNode
372372
/// (Data+Addr) and Info. Auto Mode reads data and based on some particular characters determine
373373
/// what firmare format it should be.
374374
/// <para/>FillFF is optional parameter forcing to fill missing addr nodes with 0xFF
@@ -393,7 +393,7 @@ public static Firmware Parse(string FirmwarePath,
393393
}
394394

395395
/// <summary>
396-
/// Create firmware multi-line string in TI-TXT or Intel-HEX format. ELF is not supported yet.
396+
/// Create firmware multi-line string in TI-TXT, Intel-HEX or SREC format. ELF is not supported yet.
397397
/// AUTO format will force TI-TXT format.
398398
/// <para/>LineLength defines amount of data bytes per one text row. When = 0, default values are set
399399
/// (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
@@ -405,7 +405,7 @@ public static string Create(Firmware Firmware, FwFormat Format = FwFormat.AUTO,
405405
}
406406

407407
/// <summary>
408-
/// Create firmware multi-line string in TI-TXT or Intel-HEX format. ELF is not supported yet.
408+
/// Create firmware multi-line string in TI-TXT, Intel-HEX or SREC format. ELF is not supported yet.
409409
/// AUTO format will force TI-TXT format. AddrStart is address of first byte in data collection.
410410
/// <para/>LineLength defines amount of data bytes per one text row. When = 0, default values are set
411411
/// (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
@@ -422,7 +422,7 @@ public static string Create(IEnumerable<byte> Data,
422422
}
423423

424424
/// <summary>
425-
/// Create firmware multi-line string in TI-TXT or Intel-HEX format. ELF is not supported yet.
425+
/// Create firmware multi-line string in TI-TXT, Intel-HEX or SREC format. ELF is not supported yet.
426426
/// AUTO format will force TI-TXT format.
427427
/// <para/>LineLength defines amount of data bytes per one text row. When = 0, default values are set
428428
/// (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
@@ -442,18 +442,18 @@ public static string Create(ICollection<FwNode> Data, FwFormat Format = FwFormat
442442
}
443443

444444
/// <summary>
445-
/// Convert firmware TI-TXT, Intel-HEX or ELF format (auto detected) to firmware in TI-TX or Intel-HEX format.
446-
/// Returned Fw is firmware and Format is useful for auto-detect feedback, indicates input format.
445+
/// Convert firmware TI-TXT, Intel-HEX, ELF or SREC format (auto detected) to firmware in TI-TXT, Intel-HEX
446+
/// or SREC format. Returned Fw is firmware and Format is useful for auto-detect feedback, indicates input format.
447447
/// <para/>FillFF is optional parameter forcing to fill missing addr nodes with 0xFF
448448
/// and return monolithic piece of code, which is usefull for crc calc or overwriting whole memory in mcu.
449449
/// <para/>LineLength defines amount of data bytes per one text row. When = 0, default values are set
450450
/// (TI-TXT = 16, Intel-HEX = 32, SREC = 32).
451451
/// </summary>
452452
/// <exception cref="FirmwareToolsException"></exception>
453453
public static (string Fw, FwFormat Format) Convert(string FirmwarePath,
454-
FwFormat Format,
455-
bool FillFF = false,
456-
int LineLength = 0)
454+
FwFormat Format,
455+
bool FillFF = false,
456+
int LineLength = 0)
457457
{
458458
switch (Format)
459459
{

0 commit comments

Comments
 (0)