Commit Graph

37 Commits

Author SHA1 Message Date
Pavel Zakopaylo
c30287e49d
Fixed incorrect git-merge 2023-11-30 15:48:47 +11:00
Pavel Zakopaylo
d278063472
Merge remote-tracking branch 'upstream/feature/bl808' 2023-11-28 19:53:07 +11:00
Ben V. Brown
f1b93a1881
DFU file support (#45)
* DFU file work

Just grabbing first one for now

Expose crc

Update CMakeLists.txt

Test DFU file

Split crc function

Fixup

Zero init struct
Dont null the pointer 🤦
correct fread

Adding tests

Create dfu_file.h

Format

Scratching out more parsing

Basic port parser

Scratching fread wrapper

* Relocate dfu parsing and link in

* Scratching out parsers

* Generic bin parser

* Pull out get file util

Update CMakeLists.txt

* Pull in the generic parser

Fixup

.

* Print flash address

* Rebase address

* stdlib

Update dfu_file.c

* FIXUP! flash offset

* Update dfu_file.c

* Improve logging

* Drop extra erase

* Adjust DFU to avoid goto

* Pragma -> ifndef

* Include Windows headers for missing data types

---------

Co-authored-by: Marek Kraus <gamelaster@outlook.com>
2023-08-01 22:43:56 +10:00
Ben V. Brown
5306720e5d More annotations on errors 2023-05-09 08:05:38 +10:00
Ben V. Brown
6ec0e9e862 Expand blisp_easy to use error codes 2023-05-09 07:58:06 +10:00
Ben V. Brown
fced48570a Start migration to error codes enum 2023-05-09 07:39:34 +10:00
porsolic
6424f9ddf8 Fix it to work under FreeBSD
Add sp_drain() where needed. Without it FreeBSD won't pass the handshake
phase.
Also decreate max buffer size.
Tested with Pinecil v2 and it can write and check new firmware.
2023-02-15 20:21:47 +01:00
porsolic
7fb2cc829c Fix UART baudrate
Set standard baudrate (460800) instead of non-standard (500000).
This enables opening of serial device under FreeBSD without error.
2023-02-15 20:21:47 +01:00
porsolic
3fff531334 Fix compiler warnings 2023-02-15 20:21:47 +01:00
Marek Kraus
5e09eca00d Fix Windows CI build 2023-01-21 15:17:17 +01:00
Marek Kraus
cbac0733ee Final support of flashing on macOS
For some reason, macOS have issues with USB CDC,
surprisingly, CH340G convertor works just fine.
But FTDI and Bouffalo's USB CDC didn't worked.
Basically, without writing anything, we don't receive
response from board. This was fixed by adding drain
after writing BOUFALLOLABRESET handshake + adding
drains after every commmand write. Also, for some reason,
in USB CDC, the size of USB payload is limited, else
it will fail.
2023-01-21 14:34:46 +01:00
Marek Kraus
3325f3725e Make macOS build working again 2023-01-21 10:08:26 +01:00
Marek Kraus
a6b9b4102b Fix Windows support 2023-01-09 21:38:06 +01:00
Marek Kraus
279f2433ea Integrated eflash_loader 2023-01-09 21:23:46 +01:00
Marek Kraus
59cf5fb038 Add blisp_easy, many improvements, adds iot single download feature 2023-01-07 23:25:42 +01:00
Marek Kraus
2740d305ba Added initial BL61X and BL808 support, some chip changes 2023-01-07 16:57:45 +01:00
Marek Kraus
8a00a63600 Make proper error handling 2023-01-07 13:34:33 +01:00
Marek Kraus
da34daf69f Update code styly and reformat code 2023-01-07 11:50:51 +01:00
Marek Kraus
eb086f6fe3 Add initial MacOS support 2022-12-06 17:15:53 +01:00
Marek Kraus
6c0c857474 Drain TX and flush RX only in UART mode 2022-12-05 22:06:47 +01:00
Marek Kraus
a4489c7cce Add license 2022-11-30 13:17:30 +01:00
Marek Kraus
8bb6d2a82d Adds LOW_LATENCY config, which is disabled by default
This helped with handshake on CH340, but FT232H don't like it.
Currently, it is not needed, as current code can work properly
both on CH340G but also on FT232H.
2022-11-22 14:01:27 +01:00
Marek Kraus
717d693d0b Wait a bit so BootROM can init after reset 2022-11-22 13:57:56 +01:00
Marek Kraus
115f1df0b3 Make handshake more reliable via UART
Added waiting for transmitting whole handshake, and then flushing
RX buffer in case we received 0xFF data in mean time.
2022-11-22 13:57:26 +01:00
Marek Kraus
dd2801d6e9 Add termios support to libserialport and set_baudrate error handling
This fixes issues with flashing with FT232H
2022-11-22 13:55:38 +01:00
Marek Kraus
2d7eb72e80 Increase timeout time, since erase command can take some time 2022-11-17 20:57:31 +01:00
Marek Kraus
738626e67e Initial support for BL808
Not working yet
2022-11-10 21:36:00 +01:00
Marek Kraus
cae1bf0202 Don't wait too much on handshake response 2022-11-10 21:35:33 +01:00
Jean-François Milants
48ecd90f71 Fix handshake procedure :
- set RST and P8 low
 - wait
 - set P8 high
 - wait
 - set RST high

Also, do not reset again when sending the 2nd handshake.
2022-11-09 21:09:47 +01:00
Marek Kraus
6e036df085 Adding RTS & DTS mechanism (not working yet) 2022-11-09 20:16:08 +01:00
Marek Kraus
8c3cc0b017 Add initial support for BL60X 2022-11-08 22:06:14 +01:00
Marek Kraus
d2f13de709 Working BL70X flashing 2022-11-08 19:35:51 +01:00
Marek Kraus
e3dea5b85d Windows fixes 2022-11-07 15:22:06 +01:00
Marek Kraus
17a6c2f4a1 Work in Progress 2022-11-07 10:20:38 +01:00
Marek Kraus
f7964a9cb2 WIP 2022-10-05 11:35:44 +02:00
Marek Kraus
29a36a2d7b WIP 2022-09-25 10:58:59 +02:00
Marek Kraus
9d8738cb85 WIP 2022-09-24 11:58:47 +02:00