Skip to content

Add libserialport as an external library for MSVC build - #2111

Closed
mcuee wants to merge 17 commits into
avrdudes:mainfrom
mcuee:msvc_libserialport
Closed

Add libserialport as an external library for MSVC build#2111
mcuee wants to merge 17 commits into
avrdudes:mainfrom
mcuee:msvc_libserialport

Conversation

@mcuee

@mcuee mcuee commented May 29, 2026

Copy link
Copy Markdown
Collaborator

@mcuee
mcuee marked this pull request as draft May 29, 2026 09:50
@mcuee

mcuee commented May 29, 2026

Copy link
Copy Markdown
Collaborator Author

Not working yet.

@mcuee mcuee added enhancement New feature or request build_CI Related to CMake, auto-tools build infrastructure and github CI labels May 29, 2026
@mcuee

mcuee commented May 29, 2026

Copy link
Copy Markdown
Collaborator Author

Related issue from avrdude-libserialport

@mcuee

mcuee commented May 30, 2026

Copy link
Copy Markdown
Collaborator Author

Okay, I think we may need to re-organize libserialport as what Marius designed how the external libraries should be organized.

https://github.com/avrdudes/libftdi
https://github.com/avrdudes/libelf
https://github.com/avrdudes/libusb
https://github.com/avrdudes/libhidapi

Basically:

root directory
         <include>
         <src>
         CMakeLists.txt

@mcuee

mcuee commented May 30, 2026

Copy link
Copy Markdown
Collaborator Author

I have created the following avrdude-libserialport for this purpose.
https://github.com/mcuee/avrdude-libserialport

PS C:\work\avr\avrdude-libserialport> ls

    Directory: C:\work\avr\avrdude-libserialport

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----           30/5/2026  8:40 am                include
d----           30/5/2026  8:28 am                src
-a---           30/5/2026  8:24 am            518 .gitignore
-a---           30/5/2026  8:25 am           1186 AUTHORS
-a---           30/5/2026  8:33 am            726 CMakeLists.txt
-a---           30/5/2026  8:25 am           7816 COPYING
-a---           30/5/2026  8:25 am           6131 NEWS
-a---           30/5/2026  8:25 am           3210 README_libserialport
-a---           30/5/2026  8:24 am             71 README.md

@mcuee

mcuee commented May 30, 2026

Copy link
Copy Markdown
Collaborator Author

One step closer but not yet there.
https://github.com/avrdudes/avrdude/actions/runs/26669906962/job/78610897110

mcuee added 10 commits May 31, 2026 10:37
Add conditional compilation definition for MSVC.
Added compile definitions for MSVC to treat libserialport as an inline static header dependency.
Removed redundant comments and clarified existing ones in CMakeLists.txt.
Updated CMake configuration to define SP_API for libserialport.
Updated the GIT_TAG for libserialport to a newer commit and removed MSVC-specific compile definitions.
Updated the GIT_TAG for libserialport to a newer commit and removed unnecessary MSVC-specific linking.
@mcuee

mcuee commented May 31, 2026

Copy link
Copy Markdown
Collaborator Author

After a lot of trial and error, now it seems to be okay.
https://github.com/avrdudes/avrdude/actions/runs/26704517415

@mcuee
mcuee marked this pull request as ready for review May 31, 2026 05:45
@mcuee

mcuee commented May 31, 2026

Copy link
Copy Markdown
Collaborator Author

I think it is better to move my libserialport MSVC port (which is modeled after Marius' libftdi/libusb organization) here under avrdude organization.

@stefanrueger and @MCUdude

Just wondering if you have the right to create a new repo libserialport-avrdude and grant me the admin right.

I do not want to touch the existing fork here since I want to use it to contribute to the upstream libserialport.

@stefanrueger

Copy link
Copy Markdown
Collaborator

I think it is better to move my libserialport MSVC port here under avrdude organization

I agree but believe that only @dl8dtl has the right to cretate that directory. @dl8dtl?

@mcuee

mcuee commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

@dl8dtl

I already have access to the following repo.
https://github.com/avrdudes/libserialport

I would like to be able to be the admin of the following repo, or at least with code commit right.
https://github.com/avrdudes/libusb
https://github.com/avrdudes/libreadline (not really used as of now)
https://github.com/avrdudes/libhidapi
https://github.com/avrdudes/libftdi
https://github.com/avrdudes/libelf

If possible, I am wondering if you can open the organization access to me, @stefanrueger and @MCUdude, so that we can create new repo and also carry out admin work on the above-mentioned avrdude MSVC supporting repos. libelf repo might be even useful for macOS in the future.

@stefanrueger

Copy link
Copy Markdown
Collaborator

Oops, wrong PR closed

@stefanrueger stefanrueger reopened this Jun 13, 2026
@mcuee

mcuee commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

This PR should be post 8.2 release.

Converted to draft first -- we need to sort out the repo issue first and update this PR.

@mcuee
mcuee marked this pull request as draft June 17, 2026 00:02
@mcuee

mcuee commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator Author

@dl8dtl

I already have access to the following repo.
https://github.com/avrdudes/libserialport

I would like to be able to be the admin of the following repo, or at least with code commit right. Thanks.
https://github.com/avrdudes/libusb
https://github.com/avrdudes/libreadline (not really used as of now)
https://github.com/avrdudes/libhidapi
https://github.com/avrdudes/libftdi
https://github.com/avrdudes/libelf

@mcuee

mcuee commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator Author

Close this PR for now as the repo issue has not been sorted out.

@mcuee mcuee closed this Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build_CI Related to CMake, auto-tools build infrastructure and github CI enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants