Skip to content

Commit 87d2ca9

Browse files
committed
factory-setup: Remove C implementation of RTT
The debug builds use the rust implementation of RTT. The two implementations cannot coexist. To be able to build debug builds of the factory-setup the C imeplementation is therefore removed. The factory-setup image is changed to use the second channel for API calls, since the first is used for debug console.
1 parent 5f96d5e commit 87d2ca9

22 files changed

+97
-5066
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ bootloader-btc-production: | build
7979
$(MAKE) -C build bootloader-btc-production.elf
8080
factory-setup: | build
8181
$(MAKE) -C build factory-setup.elf
82+
factory-setup-debug: | build-debug
83+
$(MAKE) -C build-debug factory-setup.elf
8284
docs: | build
8385
$(MAKE) -C build doc
8486
rust-docs: | build
@@ -139,6 +141,8 @@ rtt-client:
139141
telnet localhost 19021
140142
run-debug:
141143
arm-none-eabi-gdb -x scripts/jlink.gdb build-debug/bin/firmware.elf
144+
run-factory-setup-debug:
145+
arm-none-eabi-gdb -x scripts/jlink.gdb build-debug/bin/factory-setup.elf
142146
dockerinit:
143147
./scripts/container.sh build --pull --force-rm --no-cache -t shiftcrypto/firmware_v2:$(shell cat .containerversion) .
144148
dockerpull:

external/CMakeLists.txt

-11
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,6 @@ add_library(ctaes
255255
)
256256
target_include_directories(ctaes SYSTEM PUBLIC ctaes)
257257

258-
add_library(rtt
259-
SEGGER_RTT_V796b/RTT/SEGGER_RTT.c
260-
)
261-
target_compile_options(rtt PRIVATE "-Wno-cast-qual")
262-
# Define RTT config vars. The default DOWN buffer size (buffer for reading from host) is 64, which
263-
# is too small for our need. The default UP buffer size (buffer for writing to host) is 1024, but
264-
# we define it anyway here in case the default changes.
265-
target_compile_definitions(rtt PUBLIC "BUFFER_SIZE_DOWN=(1024)" "BUFFER_SIZE_UP=(1024)")
266-
target_include_directories(rtt SYSTEM PUBLIC SEGGER_RTT_V796b/RTT SEGGER_RTT_V796b/Config)
267-
268-
269258
# optiga-trust-m
270259
# The below build instructions are loosely based on optiga-trust-m/tests/linux_i2c.cmake
271260
aux_source_directory(optiga-trust-m/src/cmd SRC_CMD_FILES)

external/SEGGER_RTT_V796b/Config/SEGGER_RTT_Conf.h

-425
This file was deleted.

external/SEGGER_RTT_V796b/Examples/Main_RTT_InputEchoApp.c

-43
This file was deleted.

external/SEGGER_RTT_V796b/Examples/Main_RTT_MenuApp.c

-70
This file was deleted.

external/SEGGER_RTT_V796b/Examples/Main_RTT_PrintfTest.c

-118
This file was deleted.

external/SEGGER_RTT_V796b/Examples/Main_RTT_SpeedTestApp.c

-69
This file was deleted.

external/SEGGER_RTT_V796b/LICENSE.md

-36
This file was deleted.

0 commit comments

Comments
 (0)