Skip to content

Commit 8ca0183

Browse files
committed
bricks/simhub: Enable floating point.
Needed for several tests, and this is the closest match to most of our embedded targets.
1 parent 37348a0 commit 8ca0183

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bricks/_common/common.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ LDFLAGS += -Wl,[email protected],--cref -Wl,--gc-sections
162162
else ifeq ($(UNAME_S),Darwin)
163163
LDFLAGS += -Wl,-map,$@.map -Wl,-dead_strip
164164
endif
165-
LIBS =
165+
LIBS = -lm
166166
else # end native, begin embedded
167167
CROSS_COMPILE ?= arm-none-eabi-
168168
ifeq ($(PB_MCU_FAMILY),STM32)
@@ -230,7 +230,7 @@ CFLAGS += -DSTM32_H='<stm32$(PB_MCU_SERIES_LCASE)xx.h>'
230230
CFLAGS += -DSTM32_HAL_H='<stm32$(PB_MCU_SERIES_LCASE)xx_hal.h>'
231231
endif
232232

233-
LIBS = "$(shell $(CC) $(CFLAGS) -print-libgcc-file-name)"
233+
LIBS += "$(shell $(CC) $(CFLAGS) -print-libgcc-file-name)"
234234

235235
# Sources and libraries common to all pybricks bricks
236236

bricks/simhub/mpconfigport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#define PYBRICKS_OPT_COMPILER (1)
4848
#define PYBRICKS_OPT_USE_STACK_END_AS_TOP (1)
4949
#define PYBRICKS_OPT_RAW_REPL (0)
50-
#define PYBRICKS_OPT_FLOAT (0)
50+
#define PYBRICKS_OPT_FLOAT (1)
5151
#define PYBRICKS_OPT_TERSE_ERR (0)
5252
#define PYBRICKS_OPT_EXTRA_LEVEL1 (1)
5353
#define PYBRICKS_OPT_EXTRA_LEVEL2 (1)

0 commit comments

Comments
 (0)