Open nikitos1550 opened 1 month ago
There is new code:
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0
# Copyright 2024 Frank Zago
# Generate chips.h from upstream wcfg files
import configparser
Where wcfg files can be obtained?
The wcfg files are part of the official WCHISPTool from wch. https://www.wch-ic.com/downloads/WCHISPTool_Setup_exe.html
I can make a patch for that, but since you have that chip, could you check whether you can actually flash a 62KB file?
The CH32L103F7P6 is also listed as having 48KB, while the others in that family have 64KB, so this might be correct and the docs are wrong.
I already checked, but with random 62K data. Here is closed PR https://github.com/frank-zago/isp55e0/pull/17 with log from my console.
Well, I can think that typo in doc also possible. Let postpone this issue for a while, I have plans to code some test for ch32x035, I will also make some test that will check actual flash size.
I just come to ch32x035 EVT and first applications.
/* Flash Program Valid Address */
#define ValidAddrStart (FLASH_BASE)
#define ValidAddrEnd (FLASH_BASE + 0xF800)
EVT has same settings for all chips (all family). 0xF800 is 62K.
Also there is only one link script for all chips.
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 62K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
Later I can proof it with some application, but seems WCH util has some mistake or error.
I asked vendor about this, the answer was that there actually two versions, 48k and 62k! 48k is old one. We can read specific register to understand what version we are using. I will try check are there any ability to check that register via bootloader.
The chip has 62K as other in x035 series. 62K is mentioned in pdf files and x035 page desciption (WCH website), same time chips list page says it is 48K, that seem to be typo.