Skip to content

Commit df5d9c7

Browse files
author
Daniel Campora
committed
cc3200: Fix bootloader and modpyb after printf overhaul.
The bootloader needs string0.c because of memset, memcpy and others, without string0.c it magically links, but calling any of those functions results in a hard fault. In debug mode, modpyb needs printf, and including stdio.h leads to conflicts due to the redefinitions made in the simplelink drivers.
1 parent d847509 commit df5d9c7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

cc3200/bootmgr/bootloader.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,13 @@ BOOT_STM_SRC_C = $(addprefix stmhal/,\
6767
printf.c \
6868
)
6969

70+
BOOT_LIB_SRC_C = $(addprefix lib/,\
71+
libc/string0.c \
72+
)
73+
7074
OBJ = $(addprefix $(BUILD)/, $(BOOT_HAL_SRC_C:.c=.o) $(BOOT_SL_SRC_C:.c=.o) $(BOOT_CC3100_SRC_C:.c=.o) $(BOOT_UTIL_SRC_C:.c=.o) $(BOOT_MISC_SRC_C:.c=.o))
7175
OBJ += $(addprefix $(BUILD)/, $(BOOT_MAIN_SRC_C:.c=.o) $(BOOT_MAIN_SRC_S:.s=.o) $(BOOT_PY_SRC_C:.c=.o) $(BOOT_STM_SRC_C:.c=.o))
76+
OBJ += $(addprefix $(BUILD)/, $(BOOT_LIB_SRC_C:.c=.o))
7277

7378
# Add the linker script
7479
LINKER_SCRIPT = bootmgr/bootmgr.lds

cc3200/util/std.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
typedef unsigned int size_t;
3131

32+
int printf(const char *fmt, ...);
3233
int snprintf(char *str, size_t size, const char *fmt, ...);
3334

3435
// Convenience function, defined in main.c.

0 commit comments

Comments
 (0)