Closed snovotill closed 2 years ago
Okay, I've submitted a pull request which fixes this and also updates the boardname.json files to include the L. Beware that I'm don't know what I'm doing and this is the first line of Python that I've ever written! I did test my fix and it works fine here.
I was told to log this bug as explained below. I think this means the L needs to be stripped prior to calculating f_cpu_khz but left in tact for passing to the environment. Here is the summary from this discussion: https://community.platformio.org/t/specifying-f-cpu-in-boardname-json-doesnt-like-l-suffix/21847
Because of the following line in /builder/main.py the value in build.f_cpu has to be parsable as an integer with the Python int() functiont, so it can not contain any L.
That’s different to e.g. the atmel-avr platform which does not attempt to load the integer value into Python, but simply passes the value on.
Leaving out the L suffix will make the Python code not fail, but maybe the macro expansion in main.py
will be wrong then. Something like
might internally overflow, because the F_CPU value is not a long constant…