Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert ch32v003fun -> ch32fun #506

Merged
merged 15 commits into from
Feb 6, 2025
Merged

Convert ch32v003fun -> ch32fun #506

merged 15 commits into from
Feb 6, 2025

Conversation

cnlohr
Copy link
Owner

@cnlohr cnlohr commented Feb 3, 2025

  • Split apart header into specific hardware devices.

@cnlohr
Copy link
Owner Author

cnlohr commented Feb 3, 2025

I still need to make sure this all works, but, I'd like some more eyeballs on this.

@cnlohr cnlohr marked this pull request as ready for review February 3, 2025 08:54
@cnlohr cnlohr mentioned this pull request Feb 3, 2025
@eeucalyptus
Copy link
Collaborator

I'll take a close look tonight (UTC+1)

@recalci
Copy link
Contributor

recalci commented Feb 3, 2025

I suggest considering splitting headers by peripherals, same as WCH’s official approach. We can use ch32xxxhw.h to manage which peripherals are available for specific model. This might make merging, updating, and checking easier.

@hexaedron
Copy link
Contributor

I can confirm it to work with ch32v208. No errors, just works.

@cnlohr
Copy link
Owner Author

cnlohr commented Feb 3, 2025

I suggest considering splitting headers by peripherals, same as WCH’s official approach. We can use ch32xxxhw.h to manage which peripherals are available for specific model. This might make merging, updating, and checking easier.

No. This would make it way too voluminous.

EDIT: Also all the peripherals are subtly different on each architecture.

Additionally, I want these files to be something people can use as a quick reference to see what features a given processor has instead of having to trull through lots of headers.

@cnlohr
Copy link
Owner Author

cnlohr commented Feb 3, 2025

Do we want to include changes to ch32fun.c, reorganizing how we setup the default ISR + startup code is organized.

(+ changing the printf-by-default code in the hard-fault-handler)

@hexaedron
Copy link
Contributor

What do you mean by reorganizing?

@cnlohr
Copy link
Owner Author

cnlohr commented Feb 3, 2025

Right now, if you look at the vector table, and .start code, it is difficult to tell what is used where.

CC @dwillmore

@dwillmore
Copy link
Collaborator

dwillmore commented Feb 3, 2025 via email

@eeucalyptus
Copy link
Collaborator

All projects on 003, 035 and 203 I have are working fine with the changes

@cnlohr
Copy link
Owner Author

cnlohr commented Feb 4, 2025

Do you think we should make more deep changes in ch32fun.c before committing this? Or commit this as is since it will match the new structure and people can begin to develop against it, and we can rename the repository.

…pen to install newlib deliberately. But, don't default to allowing it by default.
@cnlohr cnlohr changed the title * Convert ch32v003fun -> ch32fun Convert ch32v003fun -> ch32fun Feb 4, 2025
@hexaedron
Copy link
Contributor

IMHO we should do changes step by step. I don't see any reasons to make one giant commit instead of a series of commits.
But this is up to you.

@orbitalair
Copy link

I checked my 003 project. Built and ran ok, but its about 100bytes larger?
Anyone see this on blink or other programs? I will try and compare blinks later.
Were any compile flags changed?

@orbitalair
Copy link

Nevermind. False Alarm. Blink seems ok. I will investigate my own app code, i must have changed something.

@cnlohr
Copy link
Owner Author

cnlohr commented Feb 4, 2025

I will squash and merge this this evening if there are no other concerns.

@cnlohr cnlohr merged commit 8c8e018 into master Feb 6, 2025
164 checks passed
@cnlohr cnlohr deleted the dev branch February 7, 2025 01:16
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.

6 participants