Skip to content

Commit 4452c35

Browse files
committed
wip
1 parent 3a2cfb1 commit 4452c35

File tree

13 files changed

+114
-95
lines changed

13 files changed

+114
-95
lines changed

boards/com.hex.here_pro_2.0/board.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,26 @@ void boardInit(void) {
3636
palSetLineMode(BOARD_PAL_LINE_ICM_CS, PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
3737
palSetLine(BOARD_PAL_LINE_ICM_CS);
3838
}
39+
40+
41+
#if HAL_USE_SDC || defined(__DOXYGEN__)
42+
/**
43+
* @brief SDC card detection.
44+
*/
45+
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
46+
47+
(void)sdcp;
48+
/* TODO: Fill the implementation.*/
49+
return true;
50+
}
51+
52+
/**
53+
* @brief SDC card write protection detection.
54+
*/
55+
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
56+
57+
(void)sdcp;
58+
/* TODO: Fill the implementation.*/
59+
return false;
60+
}
61+
#endif /* HAL_USE_SDC */

boards/com.hex.here_pro_2.0/mcuconf.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@
179179
#define STM32_LPTIM2SEL STM32_LPTIM2SEL_PCLK4
180180
#define STM32_I2C4SEL STM32_I2C4SEL_PCLK4
181181
#define STM32_LPUART1SEL STM32_LPUART1SEL_PCLK4
182-
#define STM32_SDMMCSEL STM32_SDMMCSEL_PLL1_Q_CK
183182

184183
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
185184

185+
#define STM32_SDC_USE_SDMMC1 TRUE
186+
186187
/*
187188
* ST driver system settings.
188189
*/

bootloader/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ can \
2121
can_autobaud \
2222
uavcan \
2323
uavcan_nodestatus_publisher \
24-
uavcan_allocatee \
25-
usb_slcan
24+
uavcan_allocatee
2625

2726
MESSAGES_ENABLED = \
2827
uavcan.protocol.GetNodeInfo \

bootloader/include/framework_conf.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define UAVCAN_BEGINFIRMWAREUPDATE_SERVER_WORKER_THREAD lpwork_thread
1414
#define UAVCAN_ALLOCATEE_WORKER_THREAD lpwork_thread
1515
#define BOOTLOADER_APP_THREAD lpwork_thread
16+
#define LOGGER_WORKER_THREAD lpwork_thread
1617
#define USB_SLCAN_WORKER_THREAD can_thread
1718

1819
#define CAN_TRX_WORKER_THREAD can_thread
@@ -29,9 +30,9 @@
2930
// Configure debug checks
3031
//
3132

32-
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
33-
#define CH_DBG_ENABLE_CHECKS FALSE
34-
#define CH_DBG_ENABLE_ASSERTS FALSE
35-
#define CH_DBG_ENABLE_STACK_CHECK FALSE
33+
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
34+
#define CH_DBG_ENABLE_CHECKS TRUE
35+
#define CH_DBG_ENABLE_ASSERTS TRUE
36+
#define CH_DBG_ENABLE_STACK_CHECK TRUE
3637

3738
#define CAN_TX_QUEUE_LEN 256

bootloader/openocd.cfg

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
source [find interface/stlink-v2-1.cfg]
2-
source [find target/stm32f4x.cfg]
1+
source [find interface/stlink.cfg]
2+
source [find target/stm32h7x.cfg]
3+
reset_config srst_only separate connect_assert_srst
34
$_TARGETNAME configure -rtos ChibiOS
5+
$_TARGETNAME configure -event gdb-attach {
6+
halt
7+
}
8+
$_TARGETNAME configure -event gdb-attach {
9+
reset init
10+
}
411
init
12+
reset run

examples/basic_uavcan_functionality/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ uavcan_beginfirmwareupdate_server \
2222
uavcan_allocatee \
2323
uavcan_restart \
2424
freemem_check \
25-
uavcan_timesync \
26-
logger
25+
uavcan_timesync
2726

2827
MESSAGES_ENABLED = \
2928
uavcan.protocol.debug.LogMessage
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
source [find interface/stlink-v2-1.cfg]
2-
source [find target/stm32f3x.cfg]
2+
source [find target/stm32h7x.cfg]
3+
reset_config srst_only separate connect_assert_srst
4+
$_TARGETNAME configure
5+
# -rtos ChibiOS
36
init
4-
reset run
5-
$_TARGETNAME configure -rtos ChibiOS
7+
#reset run

mk/build.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Compiler options here.
22
ifeq ($(USE_OPT),)
3-
USE_OPT = -Os
3+
USE_OPT = -O0
44
endif
55

66
override USE_OPT += -Wl,--wrap=log10f -Wl,--wrap=_impure_ptr -ggdb -std=gnu99 --specs=nosys.specs --specs=nano.specs -Werror=double-promotion -ffast-math

modules/can/can.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ struct can_tx_frame_s* can_allocate_tx_frames(struct can_instance_s* instance, s
271271
}
272272

273273
void can_enqueue_tx_frames(struct can_instance_s* instance, struct can_tx_frame_s** frame_list, systime_t tx_timeout, struct pubsub_topic_s* completion_topic, enum can_frame_origin_t origin) {
274+
#ifndef CAN_MODULE_ENABLE_BRIDGE_INTERFACE
275+
(void)origin;
276+
#endif
277+
274278
if (!instance) {
275279
return;
276280
}

0 commit comments

Comments
 (0)