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

Open source launchpad.c to support C++ compilation #53

Open
Kyran-C opened this issue Jul 12, 2019 · 5 comments
Open

Open source launchpad.c to support C++ compilation #53

Kyran-C opened this issue Jul 12, 2019 · 5 comments

Comments

@Kyran-C
Copy link

Kyran-C commented Jul 12, 2019

From my understanding, in order to support C++, main needs to be compiled by the C++ compiler. As it stands now, that's precompiled into launchpad.a and linked during build. Would it be possible to refactor things to have launchpad.c compiled by us and maybe have it link to a launchpad_lib.a which would have the opaque guts you don't want open sourced? If there's proprietary stuff you don't want public, that could be put into the lib. Alternately, if it's just hidden for simplicity's sake it might be worth exposing so we can do some deeper tinkering.

Either way, it'd be really amazing to be able to use templates and member functions and lambdas and bools and function overloads and...

@mat1jaczyyy
Copy link

If you open it with a static analyzer (I use ghidra), the binary appears to have all symbols and function names inside (except for local variables) and is modifiable / probably decompilable. Given how slow the responses have been over time, this is probably the better, but tougher bet.

@tgroh007
Copy link

Hey guys, this is pretty cool, I gave up on my mpk49 pads and purchased the lpp a few months ago and take it everywhere along with my mac book. @Kyran-C I was reading along in the enhancements comments and have modded the crap out of my mpk49 as well and pretty much haven't touched it since getting the lpp. Anyways I will be along for the ride, playing around with the firmware as well. Chat with ya all soon!!

@tgroh007
Copy link

tgroh007 commented Jul 16, 2019

Didn't have any luck setting up the docker container environment using the info from this github, but this repo worked fine. docker run -it -v $(pwd)/launchpad-pro:/launchpad-pro mluis/launchpad-pro-dev Gonna mod my llp's pads soon then start testing. Thanks all for paving the way!!

@zeroeth
Copy link

zeroeth commented Jan 19, 2020

I haven't tested it with the launchpad pro, but you can use extern "C" to as a bridge between the c and c++ code, as noted https://isocpp.org/wiki/faq/mixing-c-and-cpp#call-cpp

edit: but +1 would totally love a full compilation without linking to that .a file.

@mat1jaczyyy
Copy link

From what I understand this dude took my firmware and added C++ support to it, as well as his own tweaks. https://github.com/DarioDaF/lpp-performance-cfw

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

No branches or pull requests

4 participants