mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 16:33:40 +00:00
runtime/nrf: translate nrf sleep function from C to Go
This is the last critical part of the C runtime. Code size is reduced by 4 bytes for examples/blinky2 (probably due to inlining) and is unchanged for examples/test.
This commit is contained in:
@@ -36,7 +36,6 @@ CFLAGS += -I$(CURDIR)/lib/nrfx/mdk
|
||||
CFLAGS += -I$(CURDIR)/lib/CMSIS/CMSIS/Include
|
||||
CFLAGS += -DNRF52832_XXAA
|
||||
CFLAGS += -Wno-uninitialized
|
||||
RUNTIME_PARTS += build/runtime_nrf.bc
|
||||
RUNTIME_PARTS += build/nrfx_system_nrf52.bc
|
||||
OBJ += build/nrfx_startup_nrf51.o # TODO nrf52, see https://bugs.llvm.org/show_bug.cgi?id=31601
|
||||
|
||||
@@ -98,11 +97,6 @@ build/tgo: *.go
|
||||
build/%.o: src/examples/% src/examples/%/*.go build/tgo src/runtime/*.go build/runtime-$(TARGET)-combined.bc
|
||||
./build/tgo build $(TGOFLAGS) -runtime build/runtime-$(TARGET)-combined.bc -o $@ $(subst src/,,$<)
|
||||
|
||||
# Compile C sources for the runtime.
|
||||
build/%.bc: src/runtime/%.c src/runtime/*.h
|
||||
@mkdir -p build
|
||||
clang $(CFLAGS) -c -o $@ $<
|
||||
|
||||
# Compile LLVM bitcode from LLVM source.
|
||||
build/%.bc: src/runtime/%.ll
|
||||
$(LLAS) -o $@ $<
|
||||
|
||||
Reference in New Issue
Block a user