Skip to content

Commit 252b56b

Browse files
committed
fix ci
1 parent 6b3a595 commit 252b56b

File tree

9 files changed

+28
-54
lines changed

9 files changed

+28
-54
lines changed

examples/device/board_test/src/main.c

+4-50
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*
2424
*/
2525

26-
#if 1
2726
#include <stdlib.h>
2827
#include <stdio.h>
2928
#include <string.h>
@@ -52,7 +51,7 @@ int main(void) {
5251

5352
// Blink and print every interval ms
5453
if (!(board_millis() - start_ms < interval_ms)) {
55-
// board_uart_write(HELLO_STR, strlen(HELLO_STR));
54+
board_uart_write(HELLO_STR, strlen(HELLO_STR));
5655

5756
start_ms = board_millis();
5857

@@ -61,57 +60,12 @@ int main(void) {
6160
}
6261

6362
// echo
64-
// uint8_t ch;
65-
// if (board_uart_read(&ch, 1) > 0) {
66-
// board_uart_write(&ch, 1);
67-
// }
68-
}
69-
}
70-
71-
#else
72-
#include <stdio.h>
73-
#include <zephyr/kernel.h>
74-
#include <zephyr/drivers/gpio.h>
75-
76-
/* 1000 msec = 1 sec */
77-
#define SLEEP_TIME_MS 200
78-
79-
/* The devicetree node identifier for the "led0" alias. */
80-
#define LED0_NODE DT_ALIAS(led0)
81-
82-
/*
83-
* A build error on this line means your board is unsupported.
84-
* See the sample documentation for information on how to fix this.
85-
*/
86-
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
87-
88-
int main(void)
89-
{
90-
int ret;
91-
bool led_state = true;
92-
93-
if (!gpio_is_ready_dt(&led)) {
94-
return 0;
95-
}
96-
97-
ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
98-
if (ret < 0) {
99-
return 0;
100-
}
101-
102-
while (1) {
103-
ret = gpio_pin_toggle_dt(&led);
104-
if (ret < 0) {
105-
return 0;
63+
uint8_t ch;
64+
if (board_uart_read(&ch, 1) > 0) {
65+
board_uart_write(&ch, 1);
10666
}
107-
108-
led_state = !led_state;
109-
printf("LED state: %s\n", led_state ? "ON" : "OFF");
110-
k_msleep(SLEEP_TIME_MS);
11167
}
112-
return 0;
11368
}
114-
#endif
11569

11670
#if TUSB_MCU_VENDOR_ESPRESSIF
11771
void app_main(void) {

hw/bsp/lpc11/family.c

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
#include "bsp/board_api.h"
4343
#include "board.h"
4444

45+
extern void USB_IRQHandler(void);
46+
extern void SysTick_Handler(void);
47+
void SystemInit(void);
48+
4549
//--------------------------------------------------------------------+
4650
// Forward USB interrupt events to TinyUSB IRQ Handler
4751
//--------------------------------------------------------------------+

hw/bsp/lpc11/family.cmake

+4-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ function(add_board_target BOARD_TARGET)
4949
update_board(${BOARD_TARGET})
5050

5151
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
52-
target_compile_options(${BOARD_TARGET} PUBLIC -nostdlib)
52+
target_compile_options(${BOARD_TARGET} PUBLIC
53+
-nostdlib
54+
-Wno-error=incompatible-pointer-types
55+
)
5356
target_link_options(${BOARD_TARGET} PUBLIC
5457
"LINKER:--script=${LD_FILE_GNU}"
5558
--specs=nosys.specs --specs=nano.specs

hw/bsp/lpc18/family.c

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
#include "bsp/board_api.h"
3333
#include "board.h"
3434

35+
extern void USB0_IRQHandler(void);
36+
extern void USB1_IRQHandler(void);
37+
extern void SysTick_Handler(void);
38+
void SystemInit(void);
39+
3540
//--------------------------------------------------------------------+
3641
// USB Interrupt Handler
3742
//--------------------------------------------------------------------+

hw/bsp/lpc18/family.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ CFLAGS += \
1212
-DCFG_TUSB_MCU=OPT_MCU_LPC18XX
1313

1414
# mcu driver cause following warnings
15-
CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes -Wno-error=cast-qual
15+
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-qual
1616

1717
LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
1818

hw/bsp/lpc43/family.c

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
const uint32_t OscRateIn = 12000000;
4848
const uint32_t ExtRateIn = 0;
4949

50+
extern void USB0_IRQHandler(void);
51+
extern void USB1_IRQHandler(void);
52+
extern void SysTick_Handler(void);
53+
void SystemInit(void);
54+
5055
/*------------------------------------------------------------------*/
5156
/* BOARD API
5257
*------------------------------------------------------------------*/

hw/bsp/lpc43/family.cmake

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ function(add_board_target BOARD_TARGET)
5151
update_board(${BOARD_TARGET})
5252

5353
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
54-
target_compile_options(${BOARD_TARGET} PUBLIC -nostdlib)
54+
target_compile_options(${BOARD_TARGET} PUBLIC
55+
-nostdlib
56+
-Wno-error=incompatible-pointer-types
57+
)
5558
target_link_options(${BOARD_TARGET} PUBLIC
5659
"LINKER:--script=${LD_FILE_GNU}"
5760
--specs=nosys.specs --specs=nano.specs

hw/bsp/lpc43/family.mk

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ CFLAGS += \
1414
# mcu driver cause following warnings
1515
CFLAGS += \
1616
-Wno-error=unused-parameter \
17-
-Wno-error=strict-prototypes \
1817
-Wno-error=cast-qual \
1918
-Wno-error=incompatible-pointer-types \
2019

hw/bsp/nrf/family.mk

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ SRC_C += \
4545

4646
INC += \
4747
$(TOP)/$(BOARD_PATH) \
48+
$(TOP)/$(FAMILY_PATH)/nrfx_config \
4849
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
4950
$(TOP)/${NRFX_PATH} \
5051
$(TOP)/${NRFX_PATH}/mdk \

0 commit comments

Comments
 (0)