Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ch32v003fun
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Horn
ch32v003fun
Commits
72cd014f
Commit
72cd014f
authored
1 year ago
by
Alexander Mandera
Browse files
Options
Downloads
Patches
Plain Diff
Use binary blob write for whole 20x/30x series
parent
7a12cf5c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
minichlink/minichlink.exe
+0
-0
0 additions, 0 deletions
minichlink/minichlink.exe
minichlink/pgm-wch-linke.c
+7
-5
7 additions, 5 deletions
minichlink/pgm-wch-linke.c
with
7 additions
and
5 deletions
minichlink/minichlink.exe
+
0
−
0
View file @
72cd014f
No preview for this file type
This diff is collapsed.
Click to expand it.
minichlink/pgm-wch-linke.c
+
7
−
5
View file @
72cd014f
...
@@ -236,11 +236,13 @@ static int LESetupInterface( void * d )
...
@@ -236,11 +236,13 @@ static int LESetupInterface( void * d )
return
-
1
;
return
-
1
;
}
}
uint32_t
target_chip_type
=
(
rbuff
[
4
]
<<
4
)
+
(
rbuff
[
5
]
>>
4
);
uint32_t
mcu_series
=
rbuff
[
4
]
<<
4
;
fprintf
(
stderr
,
"Chip Type: %03x
\n
"
,
target_chip_type
);
uint32_t
target_chip_type
=
mcu_series
+
(
rbuff
[
5
]
>>
4
);
if
(
target_chip_type
==
0x307
||
target_chip_type
==
0x203
)
fprintf
(
stderr
,
"Chip Type: %03x
\n
"
,
target_chip_type
);
if
(
mcu_series
==
0x300
||
mcu_series
==
0x200
)
{
{
fprintf
(
stderr
,
"CH32V30
7
or CH32V20
3 D
etected.
Allowing old-flash-mod
e for operation.
\n
"
);
fprintf
(
stderr
,
"CH32V30
x
or CH32V20
x MCU d
etected.
Using binary blob writ
e for operation.
\n
"
);
MCF
.
WriteBinaryBlob
=
LEWriteBinaryBlob
;
MCF
.
WriteBinaryBlob
=
LEWriteBinaryBlob
;
iss
->
sector_size
=
256
;
iss
->
sector_size
=
256
;
...
@@ -401,7 +403,7 @@ void * TryInit_WCHLinkE()
...
@@ -401,7 +403,7 @@ void * TryInit_WCHLinkE()
#if 1
#if 1
//
In case you are using a non-CH32V003 board.
//
Flash Bootloader for V20x and V30x series MCUs
const
uint8_t
*
bootloader
=
(
const
uint8_t
*
)
const
uint8_t
*
bootloader
=
(
const
uint8_t
*
)
"
\x93\x77\x15\x00\x41\x11\x99\xcf\xb7\x06\x67\x45\xb7\x27\x02\x40
"
\
"
\x93\x77\x15\x00\x41\x11\x99\xcf\xb7\x06\x67\x45\xb7\x27\x02\x40
"
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment