mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
new board generator option: --nofloat (#4232)
This commit is contained in:
parent
4e539b2618
commit
8b87491700
@ -21,6 +21,7 @@ build.lwip_lib=-llwip_gcc
|
|||||||
build.lwip_include=lwip/include
|
build.lwip_include=lwip/include
|
||||||
build.lwip_flags=-DLWIP_OPEN_SRC
|
build.lwip_flags=-DLWIP_OPEN_SRC
|
||||||
|
|
||||||
|
build.float=-u _printf_float -u _scanf_float
|
||||||
build.led=
|
build.led=
|
||||||
|
|
||||||
compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
|
compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
|
||||||
@ -34,7 +35,7 @@ compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implici
|
|||||||
compiler.S.cmd=xtensa-lx106-elf-gcc
|
compiler.S.cmd=xtensa-lx106-elf-gcc
|
||||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls
|
compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls
|
||||||
|
|
||||||
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read
|
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start {build.float} -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read
|
||||||
|
|
||||||
compiler.c.elf.cmd=xtensa-lx106-elf-gcc
|
compiler.c.elf.cmd=xtensa-lx106-elf-gcc
|
||||||
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc
|
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc
|
||||||
|
@ -924,8 +924,7 @@ def all_debug ():
|
|||||||
listcomb = [ 'SSL', 'TLS_MEM', 'HTTP_CLIENT', 'HTTP_SERVER' ]
|
listcomb = [ 'SSL', 'TLS_MEM', 'HTTP_CLIENT', 'HTTP_SERVER' ]
|
||||||
listnocomb = [ 'CORE', 'WIFI', 'HTTP_UPDATE', 'UPDATER', 'OTA' ]
|
listnocomb = [ 'CORE', 'WIFI', 'HTTP_UPDATE', 'UPDATER', 'OTA' ]
|
||||||
listsingle = [ 'NoAssert-NDEBUG' ]
|
listsingle = [ 'NoAssert-NDEBUG' ]
|
||||||
if not premerge:
|
listnocomb += [ 'OOM -include "umm_malloc/umm_malloc_cfg.h"' ]
|
||||||
listnocomb += [ 'OOM -include "umm_malloc/umm_malloc_cfg.h"' ]
|
|
||||||
options = combn(listcomb)
|
options = combn(listcomb)
|
||||||
options += comb1(listnocomb)
|
options += comb1(listnocomb)
|
||||||
options += [ listcomb + listnocomb ]
|
options += [ listcomb + listnocomb ]
|
||||||
@ -1091,10 +1090,7 @@ def all_boards ():
|
|||||||
|
|
||||||
macros.update(all_flash_size())
|
macros.update(all_flash_size())
|
||||||
macros.update(all_debug())
|
macros.update(all_debug())
|
||||||
if premerge:
|
macros.update(led(led_default, led_max))
|
||||||
macros.update({ 'led': { } })
|
|
||||||
else:
|
|
||||||
macros.update(led(led_default, led_max))
|
|
||||||
|
|
||||||
print '#'
|
print '#'
|
||||||
print '# this file is script-generated and is likely to be overwritten by ' + sys.argv[0]
|
print '# this file is script-generated and is likely to be overwritten by ' + sys.argv[0]
|
||||||
@ -1148,6 +1144,9 @@ def all_boards ():
|
|||||||
if not ('opts' in board) or not (optname in board['opts']):
|
if not ('opts' in board) or not (optname in board['opts']):
|
||||||
print id + optname + '=' + macros[block][optname]
|
print id + optname + '=' + macros[block][optname]
|
||||||
|
|
||||||
|
if nofloat:
|
||||||
|
print id + '.build.float='
|
||||||
|
|
||||||
print ''
|
print ''
|
||||||
|
|
||||||
if boardsgen:
|
if boardsgen:
|
||||||
@ -1243,8 +1242,8 @@ def usage (name,ret):
|
|||||||
print " --led - preferred default builtin led for generic boards (default %d)" % led_default
|
print " --led - preferred default builtin led for generic boards (default %d)" % led_default
|
||||||
print " --board b - board to modify:"
|
print " --board b - board to modify:"
|
||||||
print " --speed s - change default serial speed"
|
print " --speed s - change default serial speed"
|
||||||
print " --premerge - no OOM debug option, no led menu"
|
|
||||||
print " --customspeed s - new serial speed for all boards"
|
print " --customspeed s - new serial speed for all boards"
|
||||||
|
print " --nofloat - disable float support in printf/scanf"
|
||||||
print ""
|
print ""
|
||||||
print " mandatory option (at least one):"
|
print " mandatory option (at least one):"
|
||||||
print ""
|
print ""
|
||||||
@ -1285,7 +1284,7 @@ lwip = 2
|
|||||||
default_speed = '115'
|
default_speed = '115'
|
||||||
led_default = 2
|
led_default = 2
|
||||||
led_max = 16
|
led_max = 16
|
||||||
premerge = False
|
nofloat = False
|
||||||
ldgen = False
|
ldgen = False
|
||||||
ldshow = False
|
ldshow = False
|
||||||
boardsgen = False
|
boardsgen = False
|
||||||
@ -1300,7 +1299,7 @@ customspeeds = []
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], "h",
|
opts, args = getopt.getopt(sys.argv[1:], "h",
|
||||||
[ "help", "premerge", "lwip=", "led=", "speed=", "board=", "customspeed=",
|
[ "help", "lwip=", "led=", "speed=", "board=", "customspeed=", "nofloat",
|
||||||
"ld", "ldgen", "boards", "boardsgen", "package", "packagegen", "doc", "docgen" ])
|
"ld", "ldgen", "boards", "boardsgen", "package", "packagegen", "doc", "docgen" ])
|
||||||
except getopt.GetoptError as err:
|
except getopt.GetoptError as err:
|
||||||
print str(err) # will print something like "option -a not recognized"
|
print str(err) # will print something like "option -a not recognized"
|
||||||
@ -1314,9 +1313,6 @@ for o, a in opts:
|
|||||||
if o in ("-h", "--help"):
|
if o in ("-h", "--help"):
|
||||||
usage(sys.argv[0], 0)
|
usage(sys.argv[0], 0)
|
||||||
|
|
||||||
elif o in ("--premerge"):
|
|
||||||
premerge = True
|
|
||||||
|
|
||||||
elif o in ("--lwip"):
|
elif o in ("--lwip"):
|
||||||
lwip = a
|
lwip = a
|
||||||
|
|
||||||
@ -1343,6 +1339,9 @@ for o, a in opts:
|
|||||||
usage(sys.argv[0], 1)
|
usage(sys.argv[0], 1)
|
||||||
boards[board]['serial'] = a
|
boards[board]['serial'] = a
|
||||||
|
|
||||||
|
elif o in ("--nofloat"):
|
||||||
|
nofloat=True
|
||||||
|
|
||||||
elif o in ("--ldshow"):
|
elif o in ("--ldshow"):
|
||||||
ldshow = True
|
ldshow = True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user