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.
This commit is contained in:
Daniel Campora 2015-04-19 20:54:43 +02:00
parent d8475092d1
commit df5d9c77f4
2 changed files with 6 additions and 0 deletions

View File

@ -67,8 +67,13 @@ BOOT_STM_SRC_C = $(addprefix stmhal/,\
printf.c \ printf.c \
) )
BOOT_LIB_SRC_C = $(addprefix lib/,\
libc/string0.c \
)
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)) 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))
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)) 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))
OBJ += $(addprefix $(BUILD)/, $(BOOT_LIB_SRC_C:.c=.o))
# Add the linker script # Add the linker script
LINKER_SCRIPT = bootmgr/bootmgr.lds LINKER_SCRIPT = bootmgr/bootmgr.lds

View File

@ -29,6 +29,7 @@
typedef unsigned int size_t; typedef unsigned int size_t;
int printf(const char *fmt, ...);
int snprintf(char *str, size_t size, const char *fmt, ...); int snprintf(char *str, size_t size, const char *fmt, ...);
// Convenience function, defined in main.c. // Convenience function, defined in main.c.