ETLCPP / etl

Embedded Template Library
https://www.etlcpp.com
MIT License
2.2k stars 391 forks source link

Supporting -mlarge compilation for MSP430 #913

Closed ReneCanadian closed 1 month ago

ReneCanadian commented 3 months ago

Hi!

The issue concerns building projects for 20 bit architecture for MSP430s. Currently anything that uses integral_limits.h for example span.h will crash. The work around that I found to this is adding a definition for int_20 in integral_limits.h

     template<>
     struct integral_limits<__int20 unsigned> {
         static constexpr __int20 unsigned max = 0xFFFFF;
         static constexpr __int20 unsigned min = 0;
     };

However this has to be wrapped in an #ifdef as this is not compliant with ISO C++ forcing to disable -pedantic flag.

Do we consider this should be supported within the ETL library?

jwellbelove commented 3 months ago

Would you like to add this as a pull request?

ReneCanadian commented 3 months ago

Sure! I'll try to get something ready over the weekend :)

jwellbelove commented 2 months ago

Are you still planning to do a PR?

ReneCanadian commented 2 months ago

Ah yes sorry I'll try to have it this week, got a bit side tracked