Skip to content

new board generator option: --nofloat #4232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ build.lwip_lib=-llwip_gcc
build.lwip_include=lwip/include
build.lwip_flags=-DLWIP_OPEN_SRC

build.float=-u _printf_float -u _scanf_float
build.led=

compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
Expand All @@ -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.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.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc
Expand Down
23 changes: 11 additions & 12 deletions tools/boards.txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,7 @@ def all_debug ():
listcomb = [ 'SSL', 'TLS_MEM', 'HTTP_CLIENT', 'HTTP_SERVER' ]
listnocomb = [ 'CORE', 'WIFI', 'HTTP_UPDATE', 'UPDATER', 'OTA' ]
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 += comb1(listnocomb)
options += [ listcomb + listnocomb ]
Expand Down Expand Up @@ -1091,10 +1090,7 @@ def all_boards ():

macros.update(all_flash_size())
macros.update(all_debug())
if premerge:
macros.update({ 'led': { } })
else:
macros.update(led(led_default, led_max))
macros.update(led(led_default, led_max))

print '#'
print '# this file is script-generated and is likely to be overwritten by ' + sys.argv[0]
Expand Down Expand Up @@ -1148,6 +1144,9 @@ def all_boards ():
if not ('opts' in board) or not (optname in board['opts']):
print id + optname + '=' + macros[block][optname]

if nofloat:
print id + '.build.float='

print ''

if boardsgen:
Expand Down Expand Up @@ -1243,8 +1242,8 @@ def usage (name,ret):
print " --led - preferred default builtin led for generic boards (default %d)" % led_default
print " --board b - board to modify:"
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 " --nofloat - disable float support in printf/scanf"
print ""
print " mandatory option (at least one):"
print ""
Expand Down Expand Up @@ -1285,7 +1284,7 @@ def usage (name,ret):
default_speed = '115'
led_default = 2
led_max = 16
premerge = False
nofloat = False
ldgen = False
ldshow = False
boardsgen = False
Expand All @@ -1300,7 +1299,7 @@ def usage (name,ret):

try:
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" ])
except getopt.GetoptError as err:
print str(err) # will print something like "option -a not recognized"
Expand All @@ -1314,9 +1313,6 @@ def usage (name,ret):
if o in ("-h", "--help"):
usage(sys.argv[0], 0)

elif o in ("--premerge"):
premerge = True

elif o in ("--lwip"):
lwip = a

Expand All @@ -1343,6 +1339,9 @@ def usage (name,ret):
usage(sys.argv[0], 1)
boards[board]['serial'] = a

elif o in ("--nofloat"):
nofloat=True

elif o in ("--ldshow"):
ldshow = True

Expand Down