Skip to content

Commit

Permalink
continued boot loader work
Browse files Browse the repository at this point in the history
  • Loading branch information
gagarinlg committed Sep 17, 2022
1 parent bc89985 commit acaaf73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/bootloader/src/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,9 @@ int main(void)
/* MCU Configuration---------------------------------------------*/

/* Make sure the vectors are set correctly */
#if !defined(STM32F030x8)
#if defined(STM32F0)
__HAL_SYSCFG_REMAPMEMORY_FLASH();
#else
SCB->VTOR = BL_FLASH_START;
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/bootloader/src/Src/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ void uart_init(uint32_t baud, int32_t pin_rx, int32_t pin_tx,
/* TX USART peripheral config */
usart_hw_init(uart_ptr, baud, 0, halfduplex);

#if defined(STM32F3xx)
#if defined(STM32F3xx) || defined(STM32F0)
/* F3 can swap Rx and Tx pins */
if (swapped) {
LL_USART_SetTXRXSwap(uart_ptr, LL_USART_TXRX_SWAPPED);
Expand Down
6 changes: 5 additions & 1 deletion src/bootloader/src/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ board_build.ldscript = linker/stm32f0.ld
upload_tool = jlink
upload_protocol = jlink
build_flags =
-g
-D STM32F0
-D STM32F030x8
-D MCU_TYPE=FRM301_TX
Expand All @@ -677,8 +678,11 @@ build_flags =
# STK500 (OpenTX)= UART2
-D STK500=1
-D UART_TX_PIN="A,2"
# -D UART_RX_PIN="A,3"
-D UART_TX_PIN_2ND="A,9"
-D UART_RX_PIN_2ND="A,10"
-D UART_BAUD=57600
-D UART_INV=0
-D UART_INV=1
-D FLASH_APP_OFFSET=0x2000u
-Wl,--defsym=RAM_SIZE=8K
-Wl,--defsym=FLASH_SIZE=65K
Expand Down

0 comments on commit acaaf73

Please sign in to comment.