Commit 0a93e301 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

CC3220: Exception handling, NWP init

Also make CC3200 use newer ARM compiler, generates slightly smaller code.

PUBLISHED_FROM=a0be49d7ea864a95886f7110887a59f6f11802d7
parent 6fe9cae6
......@@ -58,11 +58,11 @@ $(FW_DIR):
$(FW_ZIP): $(FW_ELF) $(FW_BIN) $(SLFS_FILES)
@echo " Code size: $(shell ls -l $(FW_BIN) | awk '{print $$5}')"
@echo " GEN $(FW_MANIFEST)"
@fw_meta gen_build_info \
@fw_meta.py gen_build_info \
--json_output=$(BUILD_INFO_JSON)
@cp -v $(SLFS_FILES) out/
@cp $(CC3200_SP_FILE)* $(FW_DIR)
@fw_meta create_manifest \
@fw_meta.py create_manifest \
--name=$(PROG) --platform=$(PLATFORM) \
--build_info=$(BUILD_INFO_JSON) \
--output=$(FW_MANIFEST) \
......@@ -72,14 +72,14 @@ $(FW_ZIP): $(FW_ELF) $(FW_BIN) $(SLFS_FILES)
/sys/mcuimg.bin:type=app,src=$(notdir $(FW_BIN)) \
$(foreach f,$(SLFS_FILES), $(notdir $(f)):type=slfile,src=$(notdir $(f)))
@echo " ZIP $@"
@fw_meta create_fw \
@fw_meta.py create_fw \
--manifest=$(FW_MANIFEST) \
--src_dir=$(FW_DIR) \
--output=$@
FREERTOS_SRCS = timers.c list.c queue.c tasks.c port.c heap_3.c osi_freertos.c
DRIVER_SRCS = cpu.c gpio.c gpio_if.c i2c.c i2c_if.c interrupt.c pin.c prcm.c spi.c uart.c udma.c utils.c
SL_SRCS = socket.c wlan.c driver.c device.c netapp.c netcfg.c network_common.c cc_pal.c fs.c
SL_SRCS = socket.c wlan.c driver.c device.c netapp.c netcfg.c network_common.c timer.c cc_pal.c fs.c
SDK_SRCS = startup_gcc.c $(FREERTOS_SRCS) $(DRIVER_SRCS) $(SL_SRCS)
IPATH += $(SDK_PATH) $(SDK_PATH)/inc $(SDK_PATH)/driverlib \
$(SDK_PATH)/example/common $(SDK_PATH)/oslib \
......
......@@ -294,3 +294,16 @@ void SimpleLinkGeneralEventHandler(SlDeviceEvent_t *e) {
LOG(LL_ERROR, ("status %d sender %d", e->EventData.deviceEvent.status,
e->EventData.deviceEvent.sender));
}
#ifndef __TI_COMPILER_VERSION__
int _gettimeofday_r(struct _reent *r, struct timeval *tp, void *tz) {
#else
int gettimeofday(struct timeval *tp, void *tz) {
#endif
unsigned long sec;
unsigned short msec;
MAP_PRCMRTCGet(&sec, &msec);
tp->tv_sec = sec;
tp->tv_usec = ((unsigned long) msec) * 1000;
return 0;
}
docker.cesanta.com/cc3200-build:1.2.0-r8
docker.cesanta.com/cc3200-build:1.3.0-r2
......@@ -12505,28 +12505,6 @@ time_t HOSTtime() {
#endif /* __TI_COMPILER_VERSION__ */
#ifndef __TI_COMPILER_VERSION__
int _gettimeofday_r(struct _reent *r, struct timeval *tp, void *tz) {
#else
int gettimeofday(struct timeval *tp, void *tz) {
#endif
unsigned long sec;
unsigned short msec;
MAP_PRCMRTCGet(&sec, &msec);
tp->tv_sec = sec;
tp->tv_usec = ((unsigned long) msec) * 1000;
return 0;
}
#ifndef __TI_COMPILER_VERSION__
int settimeofday(const struct timeval *tv, const struct timezone *tz) {
#else
int settimeofday(const struct timeval *tv, const void *tz) {
#endif
MAP_PRCMRTCSet(tv->tv_sec, tv->tv_usec / 1000);
return 0;
}
void fprint_str(FILE *fp, const char *str) {
while (*str != '\0') {
if (*str == '\n') MAP_UARTCharPut(CONSOLE_UART, '\r');
......
......@@ -1208,7 +1208,7 @@ int sl_set_ssl_opts(struct mg_connection *nc);
#endif /* !defined(__SIMPLELINK_H__) */
/* COmpatibility with older versions of SimpleLink */
/* Compatibility with older versions of SimpleLink */
#if SL_MAJOR_VERSION_NUM < 2
#define SL_ERROR_BSD_EAGAIN SL_EAGAIN
#define SL_ERROR_BSD_EALREADY SL_EALREADY
......@@ -1219,6 +1219,13 @@ int sl_set_ssl_opts(struct mg_connection *nc);
#define SL_SOCKET_FD_SET SL_FD_SET
#define SL_SOCKET_FD_ISSET SL_FD_ISSET
#define SL_SO_SECURE_DOMAIN_NAME_VERIFICATION SO_SECURE_DOMAIN_NAME_VERIFICATION
#define SlDeviceVersion_t SlVersionFull
#define sl_DeviceGet sl_DevGet
#define SL_DEVICE_GENERAL SL_DEVICE_GENERAL_CONFIGURATION
#define SL_DEV_GET_LEN_TYPE _u8
#else
#define SL_DEV_GET_LEN_TYPE _u16
#endif
#endif /* MG_NET_IF == MG_NET_IF_SIMPLELINK */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment