Skip to content

Commit

Permalink
Updated readme and some code comments
Browse files Browse the repository at this point in the history
Closes #6
  • Loading branch information
crycode-de committed Jun 4, 2023
1 parent 7516555 commit bffb3c3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The first four bytes are used for MCU identification, commands, data lengths and

## Flash-App

The remote application for flashing the MCU using the CAN bus is written in [Node.js](https://nodejs.org/) and located in the [mcp-can-boot-flash-app repository](https://github.com/crycode-de/mcp-can-boot-flash-app).
The official remote application for flashing the MCU using the CAN bus is written in [Node.js](https://nodejs.org/) and located in the [mcp-can-boot-flash-app repository](https://github.com/crycode-de/mcp-can-boot-flash-app).

The flash-app is also available on *npm* as `mcp-can-boot-flash-app`.

Expand Down Expand Up @@ -123,6 +123,10 @@ Example:
npx mcp-can-boot-flash-app -f firmware.hex -p m1284p -m 0x0042
```

### Inofficial (thirdparty) flash applications

* [AVR CAN flasher](https://github.com/Nerdiyde/AVR_CAN_flasher) - ESP32 port of the Flash-App

## How to reset the MCU by your main application

You can use the watchdog to reset the MCU by your main application.
Expand Down Expand Up @@ -355,6 +359,30 @@ Additionally a *start app* command may be send at any time by the flash applicat
![Communication example](./doc/flash-sequence.svg)
## Changelog
## WIP
* Added support for _ATmega32U4_
* Optimized bootloader size (724 to 770 bytes smaller dending on used MCU)
Thanks to [Dan Hankewycz (hankedan000)](https://github.com/hankedan000)!
* Added bitrate detect feature (merged from it's own branch since it now fits into 2048 words bootloader section)
## 1.3.1 (2021-09-30)
* Fixed variable overflow while flashing addresses bigger than 0xFFFF (Tanks to Cosmin-Andrei Popovici for reporting this issue!)
* Updated readme and fixed some spelling issues
## 1.3.0 (2021-06-18)
* Added config option to use SFF CAN-IDs instead of the default EFF CAN-IDs
* Added some basic checks for the defined CAN-IDs at compile time
## 1.2.0 (2021-06-17)
* Added storing MCUSR into R2 on bootup
This makes it possible to find the MCU reset caused in run code.
## License
**CC BY-NC-SA 4.0**
Expand Down
4 changes: 2 additions & 2 deletions src/bootloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CAN bus bootloader for AVR microcontrollers attached to an MCP2515 CAN controller.
*
* Copyright (C) 2020-2021 Peter Müller <[email protected]> (https://crycode.de)
* Copyright (C) 2020-2023 Peter Müller <[email protected]> (https://crycode.de)
* License: CC BY-NC-SA 4.0
*/

Expand Down Expand Up @@ -239,7 +239,7 @@ int main () {
#endif

if (!flashing) {
// we are not in bootloading mode... only halde flash init messages
// we are not in bootloading mode... only handle flash init messages
if (canMsg.data[CAN_DATA_BYTE_CMD] == CMD_FLASH_INIT
&& canMsg.data[4] == SIGNATURE_0
&& canMsg.data[5] == SIGNATURE_1
Expand Down
2 changes: 1 addition & 1 deletion src/bootloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CAN bus bootloader for AVR microcontrollers attached to an MCP2515 CAN controller.
*
* Copyright (C) 2020-2021 Peter Müller <[email protected]> (https://crycode.de)
* Copyright (C) 2020-2023 Peter Müller <[email protected]> (https://crycode.de)
* License: CC BY-NC-SA 4.0
*/

Expand Down
2 changes: 1 addition & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CAN bus bootloader for AVR microcontrollers attached to an MCP2515 CAN controller.
*
* Copyright (C) 2020-2021 Peter Müller <[email protected]> (https://crycode.de)
* Copyright (C) 2020-2023 Peter Müller <[email protected]> (https://crycode.de)
* License: CC BY-NC-SA 4.0
*
* Configuration
Expand Down

0 comments on commit bffb3c3

Please sign in to comment.