Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
Supowang1989 committed Sep 20, 2023
1 parent bab3502 commit 5183c5c
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 16 deletions.
2 changes: 1 addition & 1 deletion board/TencentOS_tiny_STM32H750/BSP/Src/mcu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void board_init(void)
MX_SPI5_Init();
//MX_UART4_Init();
MX_UART5_Init();
MX_USART2_UART_Init();
MX_USART6_UART_Init();
MX_I2S2_Init();
MX_HDMI_CEC_Init();
//MX_USART6_UART_Init();
Expand Down
18 changes: 13 additions & 5 deletions board/TencentOS_tiny_STM32H750/BSP/Src/usart.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,26 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
/* USART6 clock enable */
__HAL_RCC_USART6_CLK_ENABLE();

__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/**USART6 GPIO Configuration
PG9 ------> USART6_RX
PG14 ------> USART6_TX
PC6 ------> USART6_TX
*/
GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_14;
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF7_USART6;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);

GPIO_InitStruct.Pin = GPIO_PIN_6;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF7_USART6;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

/* USART6 interrupt Init */
HAL_NVIC_SetPriority(USART6_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USART6_IRQn);
Expand Down Expand Up @@ -442,10 +450,10 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)

/**USART6 GPIO Configuration
PG9 ------> USART6_RX
PG14 ------> USART6_TX
PC6 ------> USART6_TX
*/
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_9|GPIO_PIN_14);

HAL_GPIO_DeInit(GPIOG, GPIO_PIN_9);
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_6);
/* USART6 interrupt Deinit */
HAL_NVIC_DisableIRQ(USART6_IRQn);
/* USER CODE BEGIN USART6_MspDeInit 1 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@

<Group>
<GroupName>Application/User/Core</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -1431,7 +1431,7 @@

<Group>
<GroupName>example</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand All @@ -1451,7 +1451,7 @@

<Group>
<GroupName>at_framwork</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -1483,7 +1483,7 @@

<Group>
<GroupName>devices</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -1515,7 +1515,7 @@

<Group>
<GroupName>hal</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down Expand Up @@ -1939,7 +1939,7 @@

<Group>
<GroupName>cjson</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<TargetCommonOption>
<Device>STM32H750XBHx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackID>Keil.STM32H7xx_DFP.2.8.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000-0x2001FFFF) IRAM2(0x24000000-0x2407FFFF) IROM(0x8000000-0x801FFFF) CLOCK(12000000) FPU3(DFPU) CPUTYPE("Cortex-M7") ELITTLE TZ</Cpu>
<FlashUtilSpec></FlashUtilSpec>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************

LR_IROM1 0x08000000 0x00020000 { ; load region size_region
ER_IROM1 0x08000000 0x00020000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00020000 { ; RW data
.ANY (+RW +ZI)
}
RW_IRAM2 0x24000000 0x00080000 {
.ANY (+RW +ZI)
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#include "cJSON.h"
#include "sal_module_wrapper.h"

#define USE_ESP8266
#define USE_EC600S

#if defined(USE_ESP8266)
#include "esp8266.h"

#elif defined(USE_EC600S)
#include "ec600.h"
#include "ec600s.h"
#endif

#ifdef USE_ESP8266
Expand Down Expand Up @@ -101,7 +101,7 @@ void mqttclient_task(void)


#ifdef USE_EC600S
ec600s_sal_init(HAL_UART_PORT_0);
ec600s_sal_init(HAL_UART_PORT_6);
#endif

mqtt_log_init();
Expand Down
4 changes: 4 additions & 0 deletions board/TencentOS_tiny_STM32H750/TOS_CONFIG/tos_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

#define TOS_CFG_OBJECT_VERIFY_EN 1u


#define TOS_CFG_OBJ_DYNAMIC_CREATE_EN 1u


#define TOS_CFG_TASK_DYNAMIC_CREATE_EN 1u

#define TOS_CFG_EVENT_EN 1u
Expand Down

0 comments on commit 5183c5c

Please sign in to comment.