Author Topic: Why stm32Plus is not fully header-only?  (Read 3254 times)


  • Jr. Member
  • **
  • Posts: 1
    • View Profile
Why stm32Plus is not fully header-only?
« on: March 14, 2017, 05:59:30 am »

I'm just wondering: why isn't stm32plus fully header-only library? A lot of functions are inline and are included in *.h but some are in *.cpp.

Why is that? What are the props? What's the reasoning behind this?

I'm thinking about exercising a bit by writing my own library and I wonder why shouldn't I do it all as header-only?

Andy Brown

  • Administrator
  • Hero Member
  • *****
  • Posts: 275
    • View Profile
    • Andy's Workshop
Re: Why stm32Plus is not fully header-only?
« Reply #1 on: March 18, 2017, 01:27:52 pm »
Hi, it's really because the library evolved over the years towards header-only. If you're writing your own library then header only is the way to go in my opinion.

Watch out though for interrupt handlers. They must remain anchored to a fixed address so that the address can be inserted into the vector table.
It's worse than that, it's physics Jim!