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

🔬👾Add an example for a real embedded system #30

Open
lukevalenty opened this issue Apr 13, 2022 · 12 comments
Open

🔬👾Add an example for a real embedded system #30

lukevalenty opened this issue Apr 13, 2022 · 12 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@lukevalenty
Copy link
Contributor

There should be an example that can be built and experimented with on a real embedded board. Arduino might be nice due to its popularity.

https://github.com/a9183756-gh/Arduino-CMake-Toolchain

@lukevalenty lukevalenty added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 13, 2022
@Jasinsky
Copy link

@lukevalenty -

What do you think about https://platformio.org/?

There are many more popular low-cost embedded boards (mostly targetting hobbyists - but not only). PlatformIO has a coherent library management system - is able to set up toolchain automatically, etc.

Many thanks for such a great concept and library!

Regards,
Daniel

@lukevalenty
Copy link
Contributor Author

I haven't used platformio myself, but it looks intriguing. Could be a good learning opportunity for myself. 🙂

@antonysigma
Copy link

Me too! I wish to see a more hardware oriented example of cib.hpp. Something like a Arduino LED blinker controlled by a push button.

Examples:
https://godbolt.org/z/Y983h4
https://github.com/boost-ext/sml

@mhanuel26
Copy link

@lukevalenty ,

Hi Luke, I recently saw your presentation and example using Atiny device for this (excellent btw), it might be a good start and example for a real embedded platform, but I was looking for it under this repo and could not find it. Is this something you can share or help to setup for us mere mortals?

Thanks,

@lukevalenty
Copy link
Contributor Author

Hi @mhanuel26! We have been tossing around the idea of making a separate repo that pulls together all of our C++ baremetal libraries/framework into a dev kit that can be used for various microcontrollers. Stay tuned!

@antonysigma
Copy link

@lukevalenty Given the dependency on C++20 standard and the most recent gcc toolchain, what is the strategy of unifying the gcc build environments in the dev kit? Just curious.

@mhanuel26 Same here. I am also hoping to see the real world, end to end example of CIB as demonstrated in the ATTiny seminar. While we are waiting, have you tried the modm framework? They have a pretty good tutorial on setting up GCC compiler for ATTiny MCUs. The one on the Microchip website is outdated and not suitable for CIB.

@lukevalenty
Copy link
Contributor Author

@antonysigma: We are planning on using cmake and setup cmake toolchains for each of the targets. AVR, ARM, RISCV, and ARCv2 all have compatible toolchains.

@antonysigma
Copy link

antonysigma commented Dec 13, 2023

Re: CMake. @lukevalenty Great! I am looking forward to it.

I hit roadblocks with CMake in the past with the Canadian cross compilation pattern. CMake needed a separate build folders for the generated executables, in order to generate headers/cpp like what we do in CIB::logging. Link here. I am glad CIB doesn't make the logging parsing tool a cpp requiring "native" compilation.

I use Meson build though. Probably I will port your examples over to Meson once CIB has a dev kit.

@mhanuel26
Copy link

Hi @lukevalenty I know you are super busy and I have see you very active here but so far no joy with the the dev. kit example. I myself don't have any clue where to start, maybe you can share something here to star playing around and get familiar with library? Or maybe some instructions how to set up the AVR example and go from there? Thanks a mil

@basavarajubv
Copy link
Contributor

@lukevalenty : I thought your cppcon talk from last year would be starting point for all!?

Composition on Tiny Embedded Systems in C++

Can that be added as an example here!?

@lukevalenty
Copy link
Contributor Author

We are working on a dedicated repo that can be used to build projects with CIB. It's a bit more involved that what fits in the example folder. :( Stay tuned.

@antonysigma
Copy link

I am also half-way through implementing a blinky demo with CIB with compile-time logging features. Here: https://github.com/antonysigma/compile-time-init-build?tab=readme-ov-file#quick-start

The gotcha is that we have to rollback cib to the version before the libfmt integration.

Here's the list of additional changes teach cib to to call libarduino APIs: antonysigma/compile-time-init-build@no-fmtlib...antonysigma:compile-time-init-build:mesonbuild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants