1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

optionally move float emulation code into iram (#8958)

* optionally move float emulation code into iram
allows doing float operation in iram
suitable for libraries like AccelStepper when called from ISR
* proposed changes for pio from @mcspr
This commit is contained in:
david gauchard
2023-11-12 23:53:39 +01:00
committed by GitHub
parent 74c04c88c5
commit d0f7293491
7 changed files with 201 additions and 9 deletions

View File

@ -1682,6 +1682,17 @@ def sdk ():
################################################################
def float_in_iram ():
return { 'iramfloat': collections.OrderedDict([
('.menu.iramfloat.no', 'in IROM'),
('.menu.iramfloat.no.build.iramfloat', '-DFP_IN_IROM'),
('.menu.iramfloat.yes', 'allowed in ISR'),
('.menu.iramfloat.yes.build.iramfloat', '-DFP_IN_IRAM'),
])
}
################################################################
def all_boards ():
if boardsgen or boardslocalgen:
@ -1709,6 +1720,7 @@ def all_boards ():
macros.update(led('led', led_default, range(0,led_max+1)))
macros.update(led('led216', 2, { 16 }))
macros.update(sdk())
macros.update(float_in_iram())
if boardfilteropt or excludeboards:
print('#')
@ -1754,6 +1766,7 @@ def all_boards ():
print('menu.stacksmash=Stack Protection')
print('menu.wipe=Erase Flash')
print('menu.sdk=NONOS SDK Version')
print('menu.iramfloat=Floating Point operations')
print('menu.ssl=SSL Support')
print('menu.mmu=MMU')
print('menu.non32xfer=Non-32-Bit Access')
@ -1791,6 +1804,7 @@ def all_boards ():
macrolist += speeds[default_speed]
macrolist += [ 'autoflash' ]
macrolist += [ 'iramfloat' ]
for block in macrolist:
for optname in macros[block]: