2 Commits

Author SHA1 Message Date
gaoro-xiao efb88ea367 feat(ch390): optimize SPI transfer, MAC fallback, and build settings for V1.0.0
- increase UART DMA/ring buffer sizes for mux traffic
- switch SPI1 to Mode0 with prescaler /2 and align CubeMX settings
- refactor CH390 memory read/write path with chunked SPI read and HAL bulk write
- fallback to hardware MAC when configured MAC is invalid (all-zero)
- add mux frame RTT logs and remove redundant UART1 polling
- update Keil post-build viewer integration and include build viewer artifacts
- update AT manual with all-zero MAC behavior
2026-04-05 03:49:27 +08:00
gaoro-xiao c5b2bdd2d2 feat(AT): LINK 对外接口改为 S1/S2/C1/C2
- LINK 首参数由数字索引改为角色名(S1/S2/C1/C2),内部映射对用户隐藏

- LINK 查询与摘要回包统一输出角色名

- LINK 配置成功后返回当前记录,格式与查询一致

- 同步更新 AT 使用手册中的命令示例与字段说明
2026-04-04 15:44:18 +08:00
12 changed files with 225 additions and 80 deletions
+29 -27
View File
@@ -30,7 +30,7 @@
1. `MUX`:全局数据承载模式开关
2. `NET`:全局静态网络配置记录
3. `LINK[idx]`:按索引组织的链路配置记录
3. `LINK[ROLE]`:按角色名组织的链路配置记录`S1/S2/C1/C2`
约束如下:
@@ -127,18 +127,16 @@ NET = 192.168.1.100,255.255.255.0,192.168.1.1,02:00:00:00:00:01
### 7.3 LINK 默认值
```text
LINK0 = 1,8080,0.0.0.0,0,U0
LINK1 = 0,8081,0.0.0.0,0,U1
LINK2 = 1,9001,192.168.1.200,9000,U1
LINK3 = 0,9002,192.168.1.201,9001,U0
LINK:S1 = 1,8080,0.0.0.0,0,U0
LINK:S2 = 0,8081,0.0.0.0,0,U1
LINK:C1 = 1,9001,192.168.1.200,9000,U1
LINK:C2 = 0,9002,192.168.1.201,9001,U0
```
固定索引映射
说明
- `0 = S1`
- `1 = S2`
- `2 = C1`
- `3 = C2`
- `S1/S2/C1/C2` 为对外可见角色名
- 内部索引映射由固件管理,不对外暴露
UART 记号约定:
@@ -174,10 +172,10 @@ AT+QUERY\r\n
```text
+NET:IP=192.168.1.100,MASK=255.255.255.0,GW=192.168.1.1,MAC=02:00:00:00:00:01
+LINK:0,EN=1,LPORT=8080,RIP=0.0.0.0,RPORT=0,UART=U0
+LINK:1,EN=0,LPORT=8081,RIP=0.0.0.0,RPORT=0,UART=U1
+LINK:2,EN=1,LPORT=9001,RIP=192.168.1.200,RPORT=9000,UART=U1
+LINK:3,EN=0,LPORT=9002,RIP=192.168.1.201,RPORT=9001,UART=U0
+LINK:S1,EN=1,LPORT=8080,RIP=0.0.0.0,RPORT=0,UART=U0
+LINK:S2,EN=0,LPORT=8081,RIP=0.0.0.0,RPORT=0,UART=U1
+LINK:C1,EN=1,LPORT=9001,RIP=192.168.1.200,RPORT=9000,UART=U1
+LINK:C2,EN=0,LPORT=9002,RIP=192.168.1.201,RPORT=9001,UART=U0
+MUX:0
+MAP:UART2=0x04,UART3=0x08,C1=0x01,C2=0x02,S1=0x10,S2=0x20
+BAUD:U0=115200,U1=115200
@@ -237,24 +235,28 @@ AT+NET?\r\n
OK
```
**MAC 设置说明:**
当MAC设置为全0时,固件将使用硬件MAC地址,此时通过AT+?查询到的MAC地址即为当前生效的硬件MAC地址。
### 8.5 LINK 类命令
#### 设置单条 LINK 记录
```text
AT+LINK=0,1,8080,0.0.0.0,0,U0\r\n
AT+LINK=2,1,9001,192.168.1.200,9000,U1\r\n
AT+LINK=S1,1,8080,0.0.0.0,0,U0\r\n
AT+LINK=C1,1,9001,192.168.1.200,9000,U1\r\n
```
字段顺序:
```text
IDX,EN,LPORT,RIP,RPORT,UART
ROLE,EN,LPORT,RIP,RPORT,UART
```
字段说明:
- `IDX`:实例索引,固定为 `0..3`
- `ROLE`:链路角色名,固定为 `S1/S2/C1/C2`
- `EN``0/1`
- `LPORT`:本地端口
- `RIP`:对端 IP
@@ -270,13 +272,13 @@ IDX,EN,LPORT,RIP,RPORT,UART
#### 查询单条 LINK
```text
AT+LINK=0\r\n
AT+LINK=S1\r\n
```
返回示例:
```text
+LINK:0,EN=1,LPORT=8080,RIP=0.0.0.0,RPORT=0,UART=U0
+LINK:S1,EN=1,LPORT=8080,RIP=0.0.0.0,RPORT=0,UART=U0
OK
```
@@ -289,10 +291,10 @@ AT+LINK?\r\n
返回示例:
```text
+LINK:0,EN=1,LPORT=8080,RIP=0.0.0.0,RPORT=0,UART=U0
+LINK:1,EN=0,LPORT=8081,RIP=0.0.0.0,RPORT=0,UART=U1
+LINK:2,EN=1,LPORT=9001,RIP=192.168.1.200,RPORT=9000,UART=U1
+LINK:3,EN=0,LPORT=9002,RIP=192.168.1.201,RPORT=9001,UART=U0
+LINK:S1,EN=1,LPORT=8080,RIP=0.0.0.0,RPORT=0,UART=U0
+LINK:S2,EN=0,LPORT=8081,RIP=0.0.0.0,RPORT=0,UART=U1
+LINK:C1,EN=1,LPORT=9001,RIP=192.168.1.200,RPORT=9000,UART=U1
+LINK:C2,EN=0,LPORT=9002,RIP=192.168.1.201,RPORT=9001,UART=U0
OK
```
@@ -353,9 +355,9 @@ OK: Defaults restored
```text
AT+NET=192.168.1.123,255.255.255.0,192.168.1.1,02:00:00:00:00:01\r\n
AT+LINK=0,1,10001,0.0.0.0,0,U1\r\n
AT+LINK=1,1,10003,0.0.0.0,0,U1\r\n
AT+LINK=2,1,20001,192.168.1.201,10002,U0\r\n
AT+LINK=S1,1,10001,0.0.0.0,0,U1\r\n
AT+LINK=S2,1,10003,0.0.0.0,0,U1\r\n
AT+LINK=C1,1,20001,192.168.1.201,10002,U0\r\n
AT+MUX=1\r\n
AT+SAVE\r\n
AT+RESET\r\n
+57 -12
View File
@@ -158,6 +158,48 @@ static const char *link_uart_to_str(uint8_t uart)
return (uart == LINK_UART_U1) ? "U1" : "U0";
}
static const char *link_index_to_name(uint32_t index)
{
switch (index) {
case CONFIG_LINK_S1:
return "S1";
case CONFIG_LINK_S2:
return "S2";
case CONFIG_LINK_C1:
return "C1";
case CONFIG_LINK_C2:
return "C2";
default:
return "?";
}
}
static int parse_link_name(const char *value, uint32_t *index)
{
if (value == NULL || index == NULL) {
return -1;
}
if (equals_ignore_case(value, "S1")) {
*index = CONFIG_LINK_S1;
return 0;
}
if (equals_ignore_case(value, "S2")) {
*index = CONFIG_LINK_S2;
return 0;
}
if (equals_ignore_case(value, "C1")) {
*index = CONFIG_LINK_C1;
return 0;
}
if (equals_ignore_case(value, "C2")) {
*index = CONFIG_LINK_C2;
return 0;
}
return -1;
}
static bool parse_command_with_value(const char *cmd, const char *name, const char **value)
{
size_t name_len;
@@ -309,10 +351,10 @@ static at_result_t handle_summary_query(char *response, uint16_t max_len)
snprintf(response, max_len,
"+NET:IP=%s,MASK=%s,GW=%s,MAC=%s\r\n"
"+LINK:0,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:1,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:2,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:3,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:S1,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:S2,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:C1,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:C2,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+MUX:%u\r\n"
"+MAP:UART2=0x04,UART3=0x08,C1=0x01,C2=0x02,S1=0x10,S2=0x20\r\n"
"+BAUD:U0=%lu,U1=%lu\r\n"
@@ -356,8 +398,8 @@ static at_result_t handle_link_query(uint32_t index, char *response, uint16_t ma
config_ip_to_str(g_config.links[index].remote_ip, rip_str);
snprintf(response,
max_len,
"+LINK:%lu,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\nOK\r\n",
index,
"+LINK:%s,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\nOK\r\n",
link_index_to_name(index),
g_config.links[index].enabled,
g_config.links[index].local_port,
rip_str,
@@ -376,10 +418,10 @@ static at_result_t handle_all_link_query(char *response, uint16_t max_len)
snprintf(response,
max_len,
"+LINK:0,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:1,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:2,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:3,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:S1,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:S2,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:C1,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"+LINK:C2,EN=%u,LPORT=%u,RIP=%s,RPORT=%u,UART=%s\r\n"
"OK\r\n",
g_config.links[0].enabled, g_config.links[0].local_port, rip_str[0], g_config.links[0].remote_port, link_uart_to_str(g_config.links[0].uart),
g_config.links[1].enabled, g_config.links[1].local_port, rip_str[1], g_config.links[1].remote_port, link_uart_to_str(g_config.links[1].uart),
@@ -581,7 +623,7 @@ at_result_t config_process_at_cmd(const char *cmd, char *response, uint16_t max_
cursor = value_copy;
token = config_next_token(&cursor);
if (token == NULL || parse_u32_value(token, 0u, CONFIG_LINK_COUNT - 1u, &index) != 0) {
if (token == NULL || parse_link_name(token, &index) != 0) {
snprintf(response, max_len, "ERROR: Invalid route field\r\n");
return AT_INVALID_PARAM;
}
@@ -623,7 +665,10 @@ at_result_t config_process_at_cmd(const char *cmd, char *response, uint16_t max_
memcpy(g_config.links[index].remote_ip, rip, sizeof(rip));
g_config.links[index].remote_port = (uint16_t)remote_port;
g_config.links[index].uart = uart;
snprintf(response, max_len, "OK\r\n");
if (handle_link_query(index, response, max_len) != AT_OK) {
snprintf(response, max_len, "ERROR: Invalid route field\r\n");
return AT_INVALID_PARAM;
}
return AT_NEED_REBOOT;
}
+4 -4
View File
@@ -26,10 +26,10 @@ typedef struct {
uint8_t payload[256];
} uart_mux_frame_t;
#define UART_RX_DMA_BUFFER_SIZE 128u
#define UART_TX_DMA_BUFFER_SIZE 128u
#define UART_RX_RING_BUFFER_SIZE 256u
#define UART_TX_RING_BUFFER_SIZE 256u
#define UART_RX_DMA_BUFFER_SIZE 256u
#define UART_TX_DMA_BUFFER_SIZE 256u
#define UART_RX_RING_BUFFER_SIZE 512u
#define UART_TX_RING_BUFFER_SIZE 384u
#define UART_DEFAULT_BAUDRATE 115200u
typedef struct {
+2 -10
View File
@@ -57,7 +57,6 @@ void SystemClock_Config(void);
static void LED_Init(void);
static void LED_StartBlink(void);
static void BootDiag_ReportCh390(void);
static void App_PollUart1ConfigRx(void);
static void App_Init(void);
static void App_Poll(void);
static void App_ConfigureLinks(const device_config_t *cfg);
@@ -143,14 +142,6 @@ static void BootDiag_ReportCh390(void)
cfg->mux_mode);
}
static void App_PollUart1ConfigRx(void)
{
while (__HAL_UART_GET_FLAG(&huart1, UART_FLAG_RXNE) != RESET) {
uint8_t byte = (uint8_t)(huart1.Instance->DR & 0xFFu);
config_uart_rx_byte(byte);
}
}
static void App_ConfigureLinks(const device_config_t *cfg)
{
tcp_server_instance_config_t server_cfg;
@@ -352,6 +343,7 @@ static void App_RouteMuxUartTraffic(void)
const device_config_t *cfg = config_get();
while (uart_mux_try_extract_frame(UART_CHANNEL_U0, &frame)) {
SEGGER_RTT_printf(0, "Mux frame from UART0: src_id=%u dst_mask=0x%02X len=%u\r\n", frame.src_id, frame.dst_mask, frame.payload_len);
if (frame.dst_mask == 0u) {
at_result_t result;
char *response_text = (char *)&g_mux_response_frame[5];
@@ -390,6 +382,7 @@ static void App_RouteMuxUartTraffic(void)
}
while (uart_mux_try_extract_frame(UART_CHANNEL_U1, &frame)) {
SEGGER_RTT_printf(0, "Mux frame from UART1: src_id=%u dst_mask=0x%02X len=%u\r\n", frame.src_id, frame.dst_mask, frame.payload_len);
if (frame.dst_mask == 0u) {
at_result_t result;
char *response_text = (char *)&g_mux_response_frame[5];
@@ -437,7 +430,6 @@ static void App_Poll(void)
App_StartLinksIfNeeded();
tcp_client_poll();
uart_trans_poll();
App_PollUart1ConfigRx();
StackGuard_Check();
config_poll();
App_RouteTcpTraffic();
+1 -1
View File
@@ -44,7 +44,7 @@ void MX_SPI1_Init(void)
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW; /* Match CH390 runtime baseline: CPOL=Low */
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE; /* Match CH390 runtime baseline: CPHA=1Edge (Mode 0) */
hspi1.Init.NSS = SPI_NSS_SOFT; /* Software CS control for CH390 */
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64; /* 72MHz/64 = 1.125MHz for conservative CH390 bring-up */
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; /* 72MHz/2 = 36MHz, max SPI1 clock at current APB2 */
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
+29 -12
View File
@@ -60,6 +60,7 @@ extern SPI_HandleTypeDef hspi1;
/* Timeout for SPI operations (ms) */
#define SPI_TIMEOUT 100
#define CH390_SPI_CHUNK_SIZE 64u
/*----------------------------------------------------------------------------
* Low-level GPIO operations
@@ -105,6 +106,24 @@ static uint8_t ch390_spi_exchange_byte(uint8_t byte)
return rx_data;
}
static int ch390_spi_read_bytes(uint8_t *data, uint16_t length)
{
static const uint8_t dummy_tx[CH390_SPI_CHUNK_SIZE] = {0};
while (length > 0u)
{
uint16_t chunk = (length > CH390_SPI_CHUNK_SIZE) ? CH390_SPI_CHUNK_SIZE : length;
if (HAL_SPI_TransmitReceive(&hspi1, (uint8_t *)dummy_tx, data, chunk, SPI_TIMEOUT) != HAL_OK)
{
return -1;
}
data += chunk;
length = (uint16_t)(length - chunk);
}
return 0;
}
static void ch390_spi_apply_mode(uint32_t polarity, uint32_t phase)
{
hspi1.Init.CLKPolarity = polarity;
@@ -281,16 +300,15 @@ void ch390_write_reg(uint8_t reg, uint8_t value)
*/
void ch390_read_mem(uint8_t *data, int length)
{
int i;
if (data == NULL || length <= 0)
{
return;
}
ch390_cs(0); /* CS low - select */
ch390_spi_exchange_byte(OPC_MEM_READ); /* Send memory read command */
/* Read data bytes */
for (i = 0; i < length; i++)
{
data[i] = ch390_spi_dummy_read();
}
(void)ch390_spi_read_bytes(data, (uint16_t)length);
ch390_cs(1); /* CS high - deselect */
}
@@ -322,16 +340,15 @@ void ch390_read_mem_dma(uint8_t *data, int length)
*/
void ch390_write_mem(uint8_t *data, int length)
{
int i;
if (data == NULL || length <= 0)
{
return;
}
ch390_cs(0); /* CS low - select */
ch390_spi_exchange_byte(OPC_MEM_WRITE); /* Send memory write command */
/* Write data bytes */
for (i = 0; i < length; i++)
{
ch390_spi_exchange_byte(data[i]);
}
(void)HAL_SPI_Transmit(&hspi1, data, (uint16_t)length, SPI_TIMEOUT);
ch390_cs(1); /* CS high - deselect */
}
+26 -1
View File
@@ -157,6 +157,19 @@ struct pbuf *ch390_runtime_input_frame(struct netif *netif)
return p;
}
bool ch390_mac_address_valid(const uint8_t *mac)
{
if (mac == NULL) {
return false;
}
for (uint8_t i = 0; i < ETHARP_HWADDR_LEN; ++i) {
if (mac[i] == 0u) {
return false;
}
}
return true;
}
void ch390_runtime_init(struct netif *netif, const uint8_t *mac)
{
struct ethernetif *ethernetif = (struct ethernetif *)netif->state;
@@ -186,7 +199,19 @@ void ch390_runtime_init(struct netif *netif, const uint8_t *mac)
SEGGER_RTT_WriteString(0, "ETH init: default\r\n");
ch390_default_config();
SEGGER_RTT_WriteString(0, "ETH init: mac\r\n");
ch390_set_mac_address((uint8_t *)mac);
if (ch390_mac_address_valid(mac)) {
ch390_set_mac_address((uint8_t *)mac);
}
else {
if (mac != NULL) {
ch390_get_mac((uint8_t *)mac);
SEGGER_RTT_printf(0, "ETH init: invalid MAC in config, using hardware MAC: %02X:%02X:%02X:%02X:%02X:%02X\r\n",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
}
else {
SEGGER_RTT_WriteString(0, "ETH init: no MAC in config\r\n");
}
}
netif->hwaddr_len = ETHARP_HWADDR_LEN;
SEGGER_RTT_WriteString(0, "ETH init: getmac\r\n");
+2 -2
View File
@@ -45,7 +45,7 @@
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath></ListingPath>
<ListingPath>.\TCP2UART\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
@@ -140,7 +140,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>CMSIS_AGDI</Key>
<Name>-X"Any" -UAny -O206 -S8 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103R8$Flash\STM32F10x_128.FLM)</Name>
<Name>-X"Any" -UAny -O206 -S8 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103R8$Flash\STM32F10x_128.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
+3 -3
View File
@@ -55,7 +55,7 @@
<CreateHexFile>1</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath></ListingPath>
<ListingPath>.\TCP2UART\</ListingPath>
<HexFormatSelection>1</HexFormatSelection>
<Merge32K>0</Merge32K>
<CreateBatchFile>0</CreateBatchFile>
@@ -80,9 +80,9 @@
<nStopB2X>0</nStopB2X>
</BeforeMake>
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg1Name>keil-build-viewer.exe -NOPATH</UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
+64
View File
@@ -0,0 +1,64 @@
Code (inc. data) RO Data RW Data ZI Data Debug Object Name
590 0 0 0 0 0 ch390.o
616 0 64 0 0 0 ch390_interface.o
1446 0 85 3 88 0 ch390_runtime.o
3690 0 591 8 1240 0 config.o
8 0 0 0 0 0 def.o
124 0 0 0 0 0 dma.o
1772 0 0 1 240 0 etharp.o
238 0 12 0 0 0 ethernet.o
178 0 0 0 48 0 ethernetif.o
246 0 0 0 0 0 flash_param.o
240 0 0 0 0 0 gpio.o
452 0 0 0 0 0 icmp.o
334 0 0 0 0 0 inet_chksum.o
26 0 0 0 0 0 init.o
0 0 0 0 24 0 ip.o
778 0 0 2 0 0 ip4.o
46 0 4 0 0 0 ip4_addr.o
0 0 0 0 12 0 iwdg.o
2746 0 185 6 272 0 main.o
828 0 0 12 4115 0 mem.o
196 0 244 32 6464 0 memp.o
582 0 0 12 0 0 netif.o
1118 0 0 0 0 0 pbuf.o
248 0 0 4 0 0 raw.o
214 0 9 168 272 0 segger_rtt.o
64 0 0 0 0 0 segger_rtt_printf.o
216 0 0 0 88 0 spi.o
60 0 236 0 1024 0 startup_stm32f103xb.o
128 0 0 12 0 0 stm32f1xx_hal.o
198 0 0 0 0 0 stm32f1xx_hal_cortex.o
808 0 0 0 0 0 stm32f1xx_hal_dma.o
392 0 0 0 32 0 stm32f1xx_hal_flash.o
240 0 0 0 0 0 stm32f1xx_hal_flash_ex.o
516 0 0 0 0 0 stm32f1xx_hal_gpio.o
12 0 0 0 0 0 stm32f1xx_hal_iwdg.o
60 0 0 0 0 0 stm32f1xx_hal_msp.o
1240 0 18 0 0 0 stm32f1xx_hal_rcc.o
1510 0 0 0 0 0 stm32f1xx_hal_spi.o
936 0 0 0 0 0 stm32f1xx_hal_tim.o
108 0 0 0 0 0 stm32f1xx_hal_tim_ex.o
2300 0 0 0 0 0 stm32f1xx_hal_uart.o
490 0 0 0 0 0 stm32f1xx_it.o
2 0 24 4 0 0 system_stm32f1xx.o
3474 0 193 32 0 0 tcp.o
1216 0 0 0 1120 0 tcp_client.o
3684 0 0 36 20 0 tcp_in.o
3862 0 0 0 0 0 tcp_out.o
962 0 0 0 1104 0 tcp_server.o
164 0 0 0 72 0 tim.o
374 0 16 12 0 0 timeouts.o
1268 0 0 0 2936 0 uart_trans.o
816 0 0 0 624 0 usart.o
Object Totals
Memory Map of the image
Load Region LR_IROM1
Execution Region ER_IROM1 (Exec base: 0x08000000, Size: 0x0000D178, Max: 0x00010000, END)
Execution Region RW_IRAM1 (Exec base: 0x20000000, Size: 0x00004FF8, Max: 0x00005000, END)
Image component sizes
Binary file not shown.
+4 -4
View File
@@ -234,10 +234,10 @@ RCC.USBFreq_Value=72000000
RCC.VCOOutput2Freq_Value=8000000
SH.GPXTI0.0=GPIO_EXTI0
SH.GPXTI0.ConfNb=1
SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_8
SPI1.CLKPhase=SPI_PHASE_2EDGE
SPI1.CLKPolarity=SPI_POLARITY_HIGH
SPI1.CalculateBaudRate=9.0 MBits/s
SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_2
SPI1.CLKPhase=SPI_PHASE_1EDGE
SPI1.CLKPolarity=SPI_POLARITY_LOW
SPI1.CalculateBaudRate=36.0 MBits/s
SPI1.Direction=SPI_DIRECTION_2LINES
SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,BaudRatePrescaler,VirtualNSS,CLKPolarity,CLKPhase
SPI1.Mode=SPI_MODE_MASTER