Fixed remaking Makefiles, removed implicit %.o for %.elf, aligned
defines, added volatile qualifier for RAM vector pointer
This commit is contained in:
parent
f83579098b
commit
65ba0bb5a6
@ -39,6 +39,12 @@ ifdef CI
|
||||
endif
|
||||
endif
|
||||
|
||||
# Prevent Make from remaking any makefiles. This was particularly an
|
||||
# issue when you had a Makefile with a suffix equal to that of $(TARGET),
|
||||
# as it managed to match with the %.$(TARGET) rule, which in turn fucked up
|
||||
# everything. Now this isn't the case.
|
||||
Makefile.%: ;
|
||||
|
||||
OBJECTDIR := obj_$(TARGET)
|
||||
|
||||
LOWERCASE := -abcdefghijklmnopqrstuvwxyz/
|
||||
@ -321,7 +327,10 @@ distclean:
|
||||
$(MAKE) TARGET=$$TARG clean; \
|
||||
done
|
||||
|
||||
-include $(CONTIKI)/arch/platform/$(TARGET)/Makefile.customrules-$(TARGET)
|
||||
custom_rules := $(CONTIKI)/arch/platform/$(TARGET)/Makefile.customrules-$(TARGET)
|
||||
ifneq ("$(wildcard $(custom_rules))","")
|
||||
-include $(custom_rules)
|
||||
endif
|
||||
|
||||
ifndef CUSTOM_RULE_C_TO_OBJECTDIR_O
|
||||
$(OBJECTDIR)/%.o: %.c | $(OBJECTDIR)
|
||||
@ -383,6 +392,10 @@ ifndef LD
|
||||
LD = $(CC)
|
||||
endif
|
||||
|
||||
### Make sure Makefiles with the $(TARGET) suffix doesn't match
|
||||
Makefile.$(TARGET):
|
||||
@
|
||||
|
||||
ifndef CUSTOM_RULE_LINK
|
||||
%.$(TARGET): %.o $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) $(CONTIKI_NG_TARGET_LIB)
|
||||
$(TRACE_LD)
|
||||
@ -478,6 +491,8 @@ endif
|
||||
# in fact the primary target.
|
||||
.PRECIOUS: %.$(TARGET)
|
||||
|
||||
|
||||
|
||||
# Cancel the predefined implict rule for compiling and linking
|
||||
# a single C source into a binary to force GNU make to consider
|
||||
# the match-anything rule below instead.
|
||||
|
@ -19,7 +19,7 @@ CUSTOM_RULE_LINK = 1
|
||||
|
||||
.SECONDEXPANSION:
|
||||
|
||||
%.elf: $(CPU_STARTFILES) $$(CONTIKI_OBJECTFILES) %.o $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) $(LDSCRIPT)
|
||||
%.elf: $(CPU_STARTFILES) $$(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) $(LDSCRIPT)
|
||||
$(TRACE_LD)
|
||||
$(Q)$(LD) $(LDFLAGS) ${filter-out $(LDSCRIPT) %.a,$^} ${filter %.a,$^} $(TARGET_LIBFILES) -lm -o $@
|
||||
|
||||
|
@ -22,7 +22,7 @@ CUSTOM_RULE_LINK = 1
|
||||
|
||||
.SECONDEXPANSION:
|
||||
|
||||
%.elf: $(CPU_STARTFILES) $$(CONTIKI_OBJECTFILES) %.o $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES)
|
||||
%.elf: $(CPU_STARTFILES) $$(CONTIKI_OBJECTFILES) %.o $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) $(TARGET_LIBS)
|
||||
$(TRACE_LD)
|
||||
$(Q)$(LD) $(LDFLAGS) ${filter %.o %.a,$^} -Wl,--start-group $(TARGET_LIBFLAGS) -Wl,--end-group -o $@
|
||||
|
||||
|
@ -12,6 +12,7 @@ SDK_KERNEL := $(SIMPLELINK_SDK)/kernel/nortos
|
||||
SDK_BOARDS := $(SDK_SOURCE)/ti/boards
|
||||
SDK_STARTUP := $(SDK_DEVICE_SOURCE)/startup_files
|
||||
SDK_STARTUP_SRCS = ccfg.c
|
||||
|
||||
EXTERNALDIRS += $(SDK_STARTUP)
|
||||
|
||||
|
||||
|
@ -97,7 +97,7 @@ rtimer_arch_init(void)
|
||||
hClk = ClockP_construct(&gClk, rtimer_clock_stub, 0, &clkParams);
|
||||
|
||||
// Try to access the RAM vector table
|
||||
volatile IsrFxn * const pfnRAMVectors = (IsrFxn *)(HWREG(NVIC_VTABLE));
|
||||
volatile IsrFxn * const pfnRAMVectors = (volatile IsrFxn *)(HWREG(NVIC_VTABLE));
|
||||
if (!pfnRAMVectors)
|
||||
{
|
||||
while (0) { /* hang */ }
|
||||
|
@ -37,8 +37,8 @@
|
||||
* Header with configuration defines common to all CC13xx/CC26xx platforms
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef CC13XX_CC26XX_CONF_H_
|
||||
#define CC13XX_CC26XX_CONF_H_
|
||||
#ifndef SIMPLELINK_CONF_H_
|
||||
#define SIMPLELINK_CONF_H_
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \name Network Stack Configuration
|
||||
@ -199,6 +199,6 @@
|
||||
#endif
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#endif /* CC13XX_CC26XX_CONF_H_ */
|
||||
#endif /* SIMPLELINK_CONF_H_ */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user