Merge branch 'master' into renesas-ra
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
CFLAGS += -DSTM32F070xB -DCFG_EXAMPLE_VIDEO_READONLY
|
||||
|
||||
LD_FILE = $(BOARD_PATH)/stm32F070rbtx_flash.ld
|
||||
# GCC
|
||||
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f070xb.s
|
||||
GCC_LD_FILE = $(BOARD_PATH)/stm32F070rbtx_flash.ld
|
||||
|
||||
SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f070xb.s
|
||||
# IAR
|
||||
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f070xb.s
|
||||
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f070xb_flash.icf
|
||||
|
||||
# For flash-jlink target
|
||||
JLINK_DEVICE = stm32f070rb
|
||||
|
||||
# flash target using on-board stlink
|
||||
flash: flash-stlink
|
||||
flash: flash-stlink
|
@@ -165,7 +165,7 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
/* This is used by the startup in order to initialize the .bss section */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
|
@@ -130,7 +130,7 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
/* This is used by the startup in order to initialize the .bss section */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
|
@@ -1,8 +1,10 @@
|
||||
CFLAGS += -DSTM32F072xB -DCFG_EXAMPLE_VIDEO_READONLY
|
||||
|
||||
LD_FILE = $(BOARD_PATH)/STM32F072RBTx_FLASH.ld
|
||||
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s
|
||||
GCC_LD_FILE = $(BOARD_PATH)/STM32F072RBTx_FLASH.ld
|
||||
|
||||
SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s
|
||||
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f072xb.s
|
||||
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f072xb_flash.icf
|
||||
|
||||
# For flash-jlink target
|
||||
JLINK_DEVICE = stm32f072rb
|
||||
|
@@ -1,8 +1,10 @@
|
||||
CFLAGS += -DSTM32F072xB -DLSI_VALUE=40000 -DCFG_EXAMPLE_VIDEO_READONLY
|
||||
|
||||
LD_FILE = $(BOARD_PATH)/STM32F072VBTx_FLASH.ld
|
||||
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s
|
||||
GCC_LD_FILE = $(BOARD_PATH)/STM32F072VBTx_FLASH.ld
|
||||
|
||||
SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s
|
||||
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f072xb.s
|
||||
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f072xb_flash.icf
|
||||
|
||||
# For flash-jlink target
|
||||
JLINK_DEVICE = stm32f072vb
|
||||
|
@@ -118,7 +118,8 @@ void board_init(void)
|
||||
|
||||
void board_led_write(bool state)
|
||||
{
|
||||
HAL_GPIO_WritePin(LED_PORT, LED_PIN, state ? LED_STATE_ON : (1-LED_STATE_ON));
|
||||
GPIO_PinState pin_state = (GPIO_PinState) (state ? LED_STATE_ON : (1-LED_STATE_ON));
|
||||
HAL_GPIO_WritePin(LED_PORT, LED_PIN, pin_state);
|
||||
}
|
||||
|
||||
uint32_t board_button_read(void)
|
||||
@@ -153,7 +154,7 @@ uint32_t board_millis(void)
|
||||
|
||||
void HardFault_Handler (void)
|
||||
{
|
||||
asm("bkpt");
|
||||
__asm("BKPT #0\n");
|
||||
}
|
||||
|
||||
#ifdef USE_FULL_ASSERT
|
||||
@@ -164,7 +165,7 @@ void HardFault_Handler (void)
|
||||
* @param line: assert_param error line source number
|
||||
* @retval None
|
||||
*/
|
||||
void assert_failed(uint8_t* file, uint32_t line)
|
||||
void assert_failed(const char* file, uint32_t line)
|
||||
{
|
||||
(void) file; (void) line;
|
||||
/* USER CODE BEGIN 6 */
|
||||
|
@@ -7,18 +7,32 @@ ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver
|
||||
|
||||
include $(TOP)/$(BOARD_PATH)/board.mk
|
||||
|
||||
# --------------
|
||||
# Compiler Flags
|
||||
# --------------
|
||||
CFLAGS += \
|
||||
-DCFG_EXAMPLE_MSC_READONLY \
|
||||
-DCFG_TUSB_MCU=OPT_MCU_STM32F0
|
||||
|
||||
# GCC Flags
|
||||
GCC_CFLAGS += \
|
||||
-flto \
|
||||
-mthumb \
|
||||
-mabi=aapcs \
|
||||
-mcpu=cortex-m0 \
|
||||
-mfloat-abi=soft \
|
||||
-nostdlib -nostartfiles \
|
||||
-DCFG_EXAMPLE_MSC_READONLY \
|
||||
-DCFG_TUSB_MCU=OPT_MCU_STM32F0
|
||||
|
||||
# suppress warning caused by vendor mcu driver
|
||||
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
|
||||
GCC_CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
|
||||
|
||||
# IAR Flags
|
||||
IAR_CFLAGS += --cpu cortex-m0
|
||||
IAR_ASFLAGS += --cpu cortex-m0
|
||||
|
||||
# ------------------------
|
||||
# All source paths should be relative to the top level.
|
||||
# ------------------------
|
||||
|
||||
SRC_C += \
|
||||
src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \
|
||||
@@ -28,7 +42,9 @@ SRC_C += \
|
||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \
|
||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c
|
||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_dma.c \
|
||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \
|
||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart_ex.c
|
||||
|
||||
INC += \
|
||||
$(TOP)/$(BOARD_PATH) \
|
||||
|
@@ -303,9 +303,9 @@
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed(__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void assert_failed(uint8_t* file, uint32_t line);
|
||||
void assert_failed(const char* file, uint32_t line);
|
||||
#else
|
||||
#define assert_param(expr) ((void)0U)
|
||||
#endif /* USE_FULL_ASSERT */
|
||||
|
Reference in New Issue
Block a user