Skip to content

Included -x option for Hx file with Fuses defined#70

Open
gpreviato wants to merge 2 commits into
mraardvark:masterfrom
gpreviato:SingleFileFlash_ver0.1
Open

Included -x option for Hx file with Fuses defined#70
gpreviato wants to merge 2 commits into
mraardvark:masterfrom
gpreviato:SingleFileFlash_ver0.1

Conversation

@gpreviato

Copy link
Copy Markdown

We use hex files with flash definition inside. This means that the Hex file is built with a special address, starting at 0x820000, record 04, that defines the list of Fuses.
There is not problems fusing the chips with PikKit4 and mplabx.
The same file loaded with pyupdi gives a file dimension problem: intelhex creates the full space address, increasing the file dimension that becomes by far bigger than the space available.
So, I have added a new flag '-x' that solve this condition. It parses the hex files and divide it in two parts: the as 'hex' and the second as 'fuses array'. So far, seems working...

@gpreviato

Copy link
Copy Markdown
Author

... sorry... it also programs fuses and code at the same time

@mraardvark

Copy link
Copy Markdown
Owner

Question: have you considered using pymcuprog? It uses pyupdi behind the scenes if you specify "uart" as a tool.
Latest from the test server:
pip install -i https://test.pypi.org/simple/ pymcuprog

@gpreviato

Copy link
Copy Markdown
Author

Onestly I didn't know pymcuprog. I'll give a check. Thank you for the hint!

@gpreviato

Copy link
Copy Markdown
Author

Hi, seems that pymcuprog doesn't works on some 32bit hardware.
pyupdi it's perfect in this environemt. So thank you for your effort.

@mraardvark

Copy link
Copy Markdown
Owner

Would you mind elaborating on how pymcuprog fails? What sort of hardware are you using?

@gpreviato

Copy link
Copy Markdown
Author

An Intel Celeron Board, with 1Gbytes RAM and Debian 9.0 installed. Seems a pretty standard board... We had problems in installation and fails in programming. We go forward with pyupdi onestly we didn't spent too much time to understand why pymcuprog fails....

Lockbits can be inserted as parameters or in the hex files with 04 record 0x83

Reprogramming can be done.
1) Try to program the device;
2) Reset the power and then reprogram it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants