Merge branch 'master' into cr1901-msp430f5529
This commit is contained in:
@@ -42,6 +42,8 @@ enum {
|
||||
BLINK_UNPRESSED = 1000
|
||||
};
|
||||
|
||||
#define HELLO_STR "Hello from TinyUSB\n"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
board_init();
|
||||
@@ -53,9 +55,15 @@ int main(void)
|
||||
{
|
||||
uint32_t interval_ms = board_button_read() ? BLINK_PRESSED : BLINK_UNPRESSED;
|
||||
|
||||
// uart echo
|
||||
// uint8_t ch;
|
||||
// if ( board_uart_read(&ch, 1) ) board_uart_write(&ch, 1);
|
||||
|
||||
// Blink every interval ms
|
||||
if ( !(board_millis() - start_ms < interval_ms) )
|
||||
{
|
||||
board_uart_write(HELLO_STR, strlen(HELLO_STR));
|
||||
|
||||
start_ms = board_millis();
|
||||
|
||||
board_led_write(led_state);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
arm_target_interface_type="SWD"
|
||||
build_treat_warnings_as_errors="Yes"
|
||||
c_preprocessor_definitions="__LPC1347FBD64__;__LPC1300_FAMILY;__LPC134x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC13XX;CFG_TUSB_MEM_SECTION= __attribute__((section(".bss3")));CFG_TUSB_MEM_ALIGN=__attribute__ ((aligned(64)))"
|
||||
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc;$(rootDir)/src"
|
||||
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc13xx/lpc_chip_13xx/inc;$(rootDir)/src"
|
||||
debug_register_definition_file="$(ProjectDir)/LPC13Uxx_Registers.xml"
|
||||
debug_target_connection="J-Link"
|
||||
gcc_enable_all_warnings="Yes"
|
||||
|
||||
@@ -55,7 +55,6 @@ void cdc_task(void);
|
||||
int main(void)
|
||||
{
|
||||
board_init();
|
||||
|
||||
tusb_init();
|
||||
|
||||
while (1)
|
||||
|
||||
+6
-1
@@ -50,6 +50,7 @@ BUILD = _build/build-$(BOARD)
|
||||
include $(TOP)/hw/bsp/$(BOARD)/board.mk
|
||||
|
||||
# Include all source C in board folder
|
||||
SRC_C += hw/bsp/board.c
|
||||
SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/hw/bsp/$(BOARD)/*.c))
|
||||
|
||||
# Compiler Flags
|
||||
@@ -85,7 +86,11 @@ endif
|
||||
|
||||
# Debugging/Optimization
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -ggdb -DCFG_TUSB_DEBUG=1
|
||||
CFLAGS += -Og -ggdb -DCFG_TUSB_DEBUG=2
|
||||
else
|
||||
ifneq ($(BOARD), spresense)
|
||||
CFLAGS += -flto -Os
|
||||
else
|
||||
CFLAGS += -Os
|
||||
endif
|
||||
endif
|
||||
|
||||
+5
-1
@@ -3,7 +3,11 @@
|
||||
#
|
||||
|
||||
# libc
|
||||
LIBS += -lgcc -lc -lm -lnosys
|
||||
LIBS += -lgcc -lm -lnosys
|
||||
|
||||
ifneq ($(BOARD), spresense)
|
||||
LIBS += -lc
|
||||
endif
|
||||
|
||||
# TinyUSB Stack source
|
||||
SRC_C += \
|
||||
|
||||
Reference in New Issue
Block a user