diff --git a/boards/keil/board_mcb4300.c b/boards/keil/board_mcb4300.c
index 0a00c8e58..6addfb252 100644
--- a/boards/keil/board_mcb4300.c
+++ b/boards/keil/board_mcb4300.c
@@ -73,7 +73,10 @@ const static struct {
void board_init(void)
{
CGU_Init();
+
+#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / TUSB_CFG_TICKS_HZ); // 1 msec tick timer
+#endif
//------------- USB Bus power HOST ONLY-------------//
// Keil VBUS0 is P6_3
@@ -97,20 +100,17 @@ void board_init(void)
GPIO_SetDir(leds[i].port, BIT_(leds[i].pin), 1); // output
}
- //------------- UART init -------------//
- #if CFG_UART_ENABLE
- scu_pinmux(BOARD_UART_PIN_PORT, BOARD_UART_PIN_TX, MD_PDN , FUNC1);
- scu_pinmux(BOARD_UART_PIN_PORT, BOARD_UART_PIN_RX, MD_PLN|MD_EZI|MD_ZI, FUNC1);
+ //------------- UART -------------//
+ scu_pinmux(BOARD_UART_PIN_PORT, BOARD_UART_PIN_TX, MD_PDN , FUNC1);
+ scu_pinmux(BOARD_UART_PIN_PORT, BOARD_UART_PIN_RX, MD_PLN|MD_EZI|MD_ZI, FUNC1);
- UART_CFG_Type UARTConfigStruct;
+ UART_CFG_Type UARTConfigStruct;
UART_ConfigStructInit(&UARTConfigStruct);
- UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE;
- UARTConfigStruct.Clock_Speed = 0;
-
- UART_Init(BOARD_UART_PORT, &UARTConfigStruct);
- UART_TxCmd(BOARD_UART_PORT, ENABLE); // Enable UART Transmit
- #endif
+ UARTConfigStruct.Baud_rate = CFG_UART_BAUDRATE;
+ UARTConfigStruct.Clock_Speed = 0;
+ UART_Init(BOARD_UART_PORT, &UARTConfigStruct);
+ UART_TxCmd(BOARD_UART_PORT, ENABLE); // Enable UART Transmit
}
//--------------------------------------------------------------------+
@@ -130,19 +130,25 @@ void board_leds(uint32_t on_mask, uint32_t off_mask)
}
}
+//--------------------------------------------------------------------+
+// BUTTONS
+//--------------------------------------------------------------------+
+uint32_t board_buttons(void)
+{
+ return 0; // TODO buttons for mcb4300
+}
+
//--------------------------------------------------------------------+
// UART
//--------------------------------------------------------------------+
-#if CFG_UART_ENABLE
-uint32_t board_uart_send(uint8_t *buffer, uint32_t length)
+uint8_t board_uart_getchar(void)
{
- return UART_Send(BOARD_UART_PORT, buffer, length, BLOCKING);
+ return UART_ReceiveByte(BOARD_UART_PORT);
}
-uint32_t board_uart_recv(uint8_t *buffer, uint32_t length)
+void board_uart_putchar(uint8_t c)
{
- return UART_Receive(BOARD_UART_PORT, buffer, length, BLOCKING);
+ UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING);
}
-#endif
#endif
diff --git a/boards/keil/board_mcb4300.h b/boards/keil/board_mcb4300.h
index ef8f36ec0..b414e142a 100644
--- a/boards/keil/board_mcb4300.h
+++ b/boards/keil/board_mcb4300.h
@@ -49,7 +49,7 @@
extern "C" {
#endif
-#define CFG_PRINTF_TARGET PRINTF_TARGET_SEMIHOST
+#define CFG_PRINTF_TARGET PRINTF_TARGET_UART
#ifdef __cplusplus
diff --git a/demos/host/host_cmsis_rtx/.cproject b/demos/host/host_cmsis_rtx/.cproject
index 812f77897..6a0904d1c 100644
--- a/demos/host/host_cmsis_rtx/.cproject
+++ b/demos/host/host_cmsis_rtx/.cproject
@@ -75,7 +75,7 @@
-
+
@@ -175,7 +175,7 @@
-
+
@@ -277,7 +277,7 @@
-
+
@@ -298,6 +298,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -306,7 +408,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<TargetConfig>
<Properties property_0="" property_2="LPC18x7_43x7_2x512_BootA.cfx" property_3="NXP" property_4="LPC4357" property_count="5" version="60100"/>
-<infoList vendor="NXP"><info chip="LPC4357" flash_driver="LPC18x7_43x7_2x512_BootA.cfx" match_id="0x0" name="LPC4357" resetscript="LPC18LPC43InternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"><chip><name>LPC4357</name>
+<infoList vendor="NXP">
+<info chip="LPC4357" flash_driver="LPC18x7_43x7_2x512_BootA.cfx" match_id="0x0" name="LPC4357" resetscript="LPC18LPC43InternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp">
+<chip>
+<name>LPC4357</name>
<family>LPC43xx</family>
<vendor>NXP (formerly Philips)</vendor>
<reset board="None" core="Real" sys="Real"/>
@@ -381,7 +486,8 @@
<peripheralInstance derived_from="SPI" determined="infoFile" id="SPI" location="0x40100000"/>
<peripheralInstance derived_from="SGPIO" determined="infoFile" id="SGPIO" location="0x40101000"/>
</chip>
-<processor><name gcc_name="cortex-m4">Cortex-M4</name>
+<processor>
+<name gcc_name="cortex-m4">Cortex-M4</name>
<family>Cortex-M</family>
</processor>
<link href="nxp_lpc43xx_peripheral.xme" show="embed" type="simple"/>
diff --git a/demos/host/host_freertos/.cproject b/demos/host/host_freertos/.cproject
index b4cc30b7a..09924c3d7 100644
--- a/demos/host/host_freertos/.cproject
+++ b/demos/host/host_freertos/.cproject
@@ -1,23 +1,25 @@
-
+
+
+
-
+
+
+
-
-
@@ -77,7 +79,7 @@
-
+
@@ -97,24 +99,25 @@
+
-
+
+
+
-
-
@@ -174,7 +177,7 @@
-
+
@@ -194,6 +197,7 @@
+
@@ -344,7 +348,7 @@
-
+
@@ -361,24 +365,123 @@
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demos/host/host_os_none/.cproject b/demos/host/host_os_none/.cproject
index 65a43203e..968f21190 100644
--- a/demos/host/host_os_none/.cproject
+++ b/demos/host/host_os_none/.cproject
@@ -75,7 +75,7 @@
-
+
@@ -167,7 +167,7 @@
-
+
@@ -220,7 +220,7 @@
-
+
@@ -351,7 +351,7 @@
-
+