Browse Source

modify buffer

master
gudae 2 months ago
parent
commit
9653271d6c
  1. BIN
      DefaultBuild/i2c.obj
  2. BIN
      DefaultBuild/multical.abs
  3. 448
      DefaultBuild/multical.map
  4. 1314
      DefaultBuild/multical.mot
  5. BIN
      DefaultBuild/owi.obj
  6. BIN
      DefaultBuild/r_cg_serial_user.obj
  7. BIN
      DefaultBuild/r_main.obj
  8. BIN
      DefaultBuild/uart.obj
  9. 42
      QualityReport(multical,DefaultBuild).txt
  10. 281
      multical.temp.mtud
  11. 56
      r_cg_serial_user.c
  12. 42
      r_main.c
  13. 54
      uart.c
  14. 13
      uart.h

BIN
DefaultBuild/i2c.obj

Binary file not shown.

BIN
DefaultBuild/multical.abs

Binary file not shown.

448
DefaultBuild/multical.map

@ -1,4 +1,4 @@
Renesas Optimizing Linker (W3.07.00 ) 06-Feb-2026 10:33:50
Renesas Optimizing Linker (W3.07.00 ) 06-Feb-2026 23:16:03
*** Options ***
@ -62,11 +62,11 @@ SECTION START END SIZE ALIGN
.monitor1
000000ce 000000d7 a 1
.data
000000d8 00000306 22f 2
000000d8 0000090a 833 2
.text
00000307 000004b9 1b3 1
0000090b 00000abf 1b5 1
.textf
000004ba 00002789 22d0 1
00000ac0 00002df9 233a 1
.const
00003000 000033d1 3d2 2
.SLIB
@ -74,9 +74,9 @@ SECTION START END SIZE ALIGN
.monitor2
0003fe00 0003ffff 200 1
.bss
000fb500 000fcfc5 1ac6 2
000fb500 000fd9c5 24c6 2
.dataR
000fcfc6 000fd1f4 22f 2
000fd9c6 000fe1f8 833 2
.sbss
000ffe20 000ffe20 0 2
.sdataR
@ -84,9 +84,9 @@ SECTION START END SIZE ALIGN
*** Total Section Size ***
RAMDATA SECTION: 00001cf5 Byte(s)
ROMDATA SECTION: 000008ad Byte(s)
PROGRAM SECTION: 00004d39 Byte(s)
RAMDATA SECTION: 00002cf9 Byte(s)
ROMDATA SECTION: 00000eb1 Byte(s)
PROGRAM SECTION: 00004da5 Byte(s)
*** Symbol List ***
@ -116,281 +116,283 @@ FILE=rlink_generates_02
SECTION=.data
FILE=DefaultBuild\r_main.obj
000000d8 000002f6 21f
000000d8 000008f8 821
FILE=DefaultBuild\owi.obj
000002f8 000002fb 4
000008fa 000008fd 4
FILE=DefaultBuild\i2c.obj
000002fc 00000303 8
000008fe 00000905 8
FILE=DefaultBuild\uart.obj
00000304 00000305 2
00000906 00000908 3
FILE=DefaultBuild\gatectrl.obj
00000306 00000306 1
0000090a 0000090a 1
SECTION=.text
FILE=DefaultBuild\cstart.obj
00000307 00000379 73
0000090b 0000097d 73
_start
00000307 0 none ,g *
0000090b 0 none ,g *
_exit
00000377 0 none ,g *
0000097b 0 none ,g *
_atexit
00000379 0 none ,g *
0000097d 0 none ,g *
FILE=DefaultBuild\r_cg_serial_user.obj
0000037a 000004b9 140
0000097e 00000abf 142
_r_uart0_interrupt_receive@1
0000037a 61 func ,l *
0000097e 61 func ,l *
_r_uart0_interrupt_send@1
000003db 2f func ,l *
000009df 2f func ,l *
_r_uart1_interrupt_receive@1
0000040a 5f func ,l *
00000a0e 61 func ,l *
_r_uart1_interrupt_send@1
00000469 2f func ,l *
00000a6f 2f func ,l *
_r_iica0_interrupt@1
00000498 22 func ,l *
00000a9e 22 func ,l *
SECTION=.textf
FILE=DefaultBuild\stkinit.obj
000004ba 000004fd 44
00000ac0 00000b03 44
_stkinit
000004ba 0 none ,g *
00000ac0 0 none ,g *
LSTINIT1
000004c8 0 none ,l *
00000ace 0 none ,l *
LSTINIT2
000004f2 0 none ,l *
00000af8 0 none ,l *
LSTINIT3
000004fd 0 none ,l *
00000b03 0 none ,l *
FILE=DefaultBuild\r_main.obj
000004fe 00001405 f08
00000b04 00001a55 f52
_RS485_Bridge_Push
000004fe 2b func ,g *
00000b04 2b func ,g *
_RS485_Bridge_ResetFifo@1
00000529 e func ,l *
00000b2f e func ,l *
_RS485_Bridge_ReadLine@1
00000537 91 func ,l *
00000b3d 91 func ,l *
_Is_V_Response_For@1
000005c8 40 func ,l *
00000bce 40 func ,l *
_UART1_WaitTxIdle@1
00000608 2c func ,l *
00000c0e 2c func ,l *
_UART1_SendString_Safe@1
00000634 36 func ,l *
00000c3a 39 func ,l *
_RS485_Bridge_DrainToPC@1
0000066a 4d func ,l *
00000c73 4d func ,l *
_hex2byte@1
000006b7 56 func ,l *
00000cc0 56 func ,l *
_parse_x_prefix@1
0000070d 153 func ,l *
00000d16 153 func ,l *
_OUT_PRINT@1
00000860 d func ,l *
00000e69 d func ,l *
_send_end_response@1
0000086d 8 func ,l *
00000e76 8 func ,l *
_parse_x_v_cmd@1
00000875 57 func ,l *
00000e7e 57 func ,l *
_send_n_response@1
000008cc 2b func ,l *
00000ed5 2b func ,l *
_parse_x_o_cmd@1
000008f7 57 func ,l *
00000f00 57 func ,l *
_send_v_response@1
0000094e 3f func ,l *
00000f57 3f func ,l *
_UART0_WaitTxDone_Flag@1
0000098d 3f func ,l *
00000f96 3f func ,l *
_PC_PrintLine_CRLF@1
000009cc 7c func ,l *
00000fd5 7c func ,l *
_scan_one_addr_rs485@1
00000a48 d4 func ,l *
00001051 f8 func ,l *
_build_line_from_rx@1
00000b1c 63 func ,l *
00001149 63 func ,l *
_detect_protocol@1
00000b7f 37 func ,l *
000011ac 37 func ,l *
_cmd_unknown@1
00000bb6 10 func ,l *
000011e3 10 func ,l *
_process_cmd@1
00000bc6 6d func ,l *
000011f3 6d func ,l *
_process_cmd_by_prefix@1
00000c33 11 func ,l *
00001260 11 func ,l *
_process_one_line@1
00000c44 6e2 func ,l *
00001271 6ea func ,l *
_handle_uart_command_line
00001326 5d func ,g *
0000195b 7a func ,g *
_main
00001383 6c func ,g *
000019d5 6a func ,g *
_R_MAIN_UserInit
000013ef 17 func ,g *
00001a3f 17 func ,g *
FILE=DefaultBuild\r_systeminit.obj
00001406 00001446 41
00001a56 00001a96 41
_R_Systeminit
00001406 3a func ,g *
00001a56 3a func ,g *
_hdwinit
00001440 7 func ,g *
00001a90 7 func ,g *
FILE=DefaultBuild\r_cg_cgc.obj
00001447 00001470 2a
00001a97 00001ac0 2a
_R_CGC_Create
00001447 2a func ,g *
00001a97 2a func ,g *
FILE=DefaultBuild\r_cg_cgc_user.obj
00001471 00001473 3
00001ac1 00001ac3 3
_R_CGC_Get_ResetSource
00001471 3 func ,g *
00001ac1 3 func ,g *
FILE=DefaultBuild\r_cg_serial.obj
00001474 00001757 2e4
00001ac4 00001da7 2e4
_R_SAU0_Create
00001474 10 func ,g *
00001ac4 10 func ,g *
_R_UART0_Create
00001484 6e func ,g *
00001ad4 6e func ,g *
_R_UART0_Start
000014f2 26 func ,g *
00001b42 26 func ,g *
_R_UART0_Stop
00001518 1e func ,g *
00001b68 1e func ,g *
_R_UART0_Receive
00001536 18 func ,g *
00001b86 18 func ,g *
_R_UART0_Send
0000154e 26 func ,g *
00001b9e 26 func ,g *
_R_SAU1_Create
00001574 10 func ,g *
00001bc4 10 func ,g *
_R_UART1_Create
00001584 6e func ,g *
00001bd4 6e func ,g *
_R_UART1_Start
000015f2 26 func ,g *
00001c42 26 func ,g *
_R_UART1_Stop
00001618 1e func ,g *
00001c68 1e func ,g *
_R_UART1_Receive
00001636 18 func ,g *
00001c86 18 func ,g *
_R_UART1_Send
0000164e 26 func ,g *
00001c9e 26 func ,g *
_R_IICA0_Create
00001674 50 func ,g *
00001cc4 50 func ,g *
_R_IICA0_Stop
000016c4 5 func ,g *
00001d14 5 func ,g *
_R_IICA0_StopCondition
000016c9 5 func ,g *
00001d19 5 func ,g *
_R_IICA0_Master_Send
000016ce 43 func ,g *
00001d1e 43 func ,g *
_R_IICA0_Master_Receive
00001711 47 func ,g *
00001d61 47 func ,g *
FILE=DefaultBuild\r_cg_serial_user.obj
00001758 00001906 1af
00001da8 00001f49 1a2
_r_uart0_callback_receiveend@1
00001758 60 func ,l *
00001da8 5d func ,l *
_r_uart0_callback_softwareoverrun@1
000017b8 1 func ,l *
00001e05 1 func ,l *
_r_uart0_callback_sendend@1
000017b9 9 func ,l *
00001e06 9 func ,l *
_r_uart0_callback_error@1
000017c2 64 func ,l *
00001e0f 5c func ,l *
_r_uart1_callback_receiveend@1
00001826 33 func ,l *
00001e6b 31 func ,l *
_r_uart1_callback_softwareoverrun@1
00001859 1 func ,l *
00001e9c 1 func ,l *
_r_uart1_callback_sendend@1
0000185a 4 func ,l *
00001e9d 4 func ,l *
_r_uart1_callback_error@1
0000185e 1 func ,l *
00001ea1 1 func ,l *
_iica0_masterhandler@1
0000185f 91 func ,l *
00001ea2 91 func ,l *
_r_iica0_callback_master_error@1
000018f0 7 func ,l *
00001f33 7 func ,l *
_r_iica0_callback_master_receiveend@1
000018f7 8 func ,l *
00001f3a 8 func ,l *
_r_iica0_callback_master_sendend@1
000018ff 8 func ,l *
00001f42 8 func ,l *
FILE=DefaultBuild\r_cg_port.obj
00001907 0000195f 59
00001f4a 00001fa2 59
_R_PORT_Create
00001907 59 func ,g *
00001f4a 59 func ,g *
FILE=DefaultBuild\owi.obj
00001960 00001fcb 66c
00001fa3 0000260e 66c
_GPIO_Clear
00001960 b func ,g *
00001fa3 b func ,g *
_GPIO_Input
0000196b 7 func ,g *
00001fae 7 func ,g *
_GPIO_Read
00001972 9 func ,g *
00001fb5 9 func ,g *
_OWI_Init
0000197b 18 func ,g *
00001fbe 18 func ,g *
_OWI_Start
00001993 17 func ,g *
00001fd6 17 func ,g *
_OWI_Stop
000019aa 17 func ,g *
00001fed 17 func ,g *
_OWI_SecureStop
000019c1 51 func ,g *
00002004 51 func ,g *
_OWI_WriteBit
00001a12 34 func ,g *
00002055 34 func ,g *
_OWI_WriteByte
00001a46 2a func ,g *
00002089 2a func ,g *
_OWI_ReadBit
00001a70 5e func ,g *
000020b3 5e func ,g *
_OWI_ReadByte
00001ace 32 func ,g *
00002111 32 func ,g *
_OWI_T_ReadBytesAndPrint
00001b00 ff func ,g *
00002143 ff func ,g *
_OWI_A_CommandMode
00001bff 262 func ,g *
00002242 262 func ,g *
_OWI_disable
00001e61 15 func ,g *
000024a4 15 func ,g *
_OWI_T_CommandMode
00001e76 5d func ,g *
000024b9 5d func ,g *
_OWI_CommandMode
00001ed3 4a func ,g *
00002516 4a func ,g *
_OWI_ReadBytesAndPrint
00001f1d af func ,g *
00002560 af func ,g *
FILE=DefaultBuild\i2c.obj
00001fcc 0000214c 181
0000260f 0000278f 181
_disable
00001fcc 26 func ,g *
0000260f 26 func ,g *
_I2C_EnablePower
00001ff2 4 func ,g *
00002635 4 func ,g *
_I2C_DisablePower
00001ff6 3 func ,g *
00002639 3 func ,g *
_I2C_T_Command_Mode_receiveData
00001ff9 4d func ,g *
0000263c 4d func ,g *
_I2C_Command_Mode_receiveData
00002046 3e func ,g *
00002689 3e func ,g *
_I2C_Command_Mode_Send
00002084 c9 func ,g *
000026c7 c9 func ,g *
FILE=DefaultBuild\uart.obj
0000214d 000022f5 1a9
00002790 00002965 1d6
_rs485_recover
00002790 56 func ,g *
_UART1_WaitTxIdle@1
0000214d 2c func ,l *
000027e6 2c func ,l *
_rs485_set_tx
00002179 b func ,g *
00002812 b func ,g *
_rs485_init
00002184 c func ,g *
0000281d c func ,g *
_UART0_WaitTxDone_Us
00002190 2f func ,g *
00002829 2f func ,g *
_RS485_Send
000021bf 1e func ,g *
00002858 1e func ,g *
_RS485_SendString
000021dd 11 func ,g *
00002876 11 func ,g *
_uart_send_string
000021ee 11 func ,g *
00002887 11 func ,g *
_uart1_send_string
000021ff 67 func ,g *
00002898 40 func ,g *
_uart_send_hex
00002266 48 func ,g *
000028d8 43 func ,g *
_uart1_send_hex
000022ae 48 func ,g *
0000291b 4b func ,g *
FILE=DefaultBuild\delay.obj
000022f6 000023b4 bf
00002966 00002a24 bf
_delay
000022f6 18 func ,g *
00002966 18 func ,g *
_delay_us
0000230e 82 func ,g *
0000297e 82 func ,g *
_delay_ms
00002390 25 func ,g *
00002a00 25 func ,g *
FILE=DefaultBuild\dipSwitch.obj
000023b5 000023c5 11
00002a25 00002a35 11
_DipSwitch_Init
000023b5 8 func ,g *
00002a25 8 func ,g *
_DipSwitch_ReadAddr_0to31
000023bd 9 func ,g *
00002a2d 9 func ,g *
FILE=DefaultBuild\gatectrl.obj
000023c6 00002789 3c4
00002a36 00002df9 3c4
_Gate_SetByNum
000023c6 372 func ,g *
00002a36 372 func ,g *
_Cal_Init
00002738 21 func ,g *
00002da8 21 func ,g *
_Eol_Init
00002759 21 func ,g *
00002dc9 21 func ,g *
_GateCtrl_SelectChannel
0000277a 10 func ,g *
00002dea 10 func ,g *
SECTION=.const
FILE=DefaultBuild\r_main.obj
@ -540,145 +542,147 @@ FILE=rlink_generates_02
SECTION=.bss
FILE=DefaultBuild\r_main.obj
000fb500 000fc007 b08
000fb500 000fc707 1208
_s_rb_fifo@2
000fb500 800 data ,l *
_g_uart1_txbuf@5
000fbd00 100 data ,l *
000fbd00 200 data ,l *
_txbuf@7@process_one_line@1
000fbe00 104 data ,l *
000fbf00 404 data ,l *
_txbuf@8@process_one_line@1
000fbf04 104 data ,l *
000fc304 404 data ,l *
FILE=DefaultBuild\r_cg_serial.obj
000fc008 000fc027 20
000fc708 000fc727 20
_gp_uart0_tx_address
000fc008 2 data ,g *
000fc708 2 data ,g *
_g_uart0_tx_count
000fc00a 2 data ,g *
000fc70a 2 data ,g *
_gp_uart0_rx_address
000fc00c 2 data ,g *
000fc70c 2 data ,g *
_g_uart0_rx_count
000fc00e 2 data ,g *
000fc70e 2 data ,g *
_g_uart0_rx_length
000fc010 2 data ,g *
000fc710 2 data ,g *
_gp_uart1_tx_address
000fc012 2 data ,g *
000fc712 2 data ,g *
_g_uart1_tx_count
000fc014 2 data ,g *
000fc714 2 data ,g *
_gp_uart1_rx_address
000fc016 2 data ,g *
000fc716 2 data ,g *
_g_uart1_rx_count
000fc018 2 data ,g *
000fc718 2 data ,g *
_g_uart1_rx_length
000fc01a 2 data ,g *
000fc71a 2 data ,g *
_g_iica0_master_status_flag
000fc01c 1 data ,g *
000fc71c 1 data ,g *
_g_iica0_slave_status_flag
000fc01d 1 data ,g *
000fc71d 1 data ,g *
_gp_iica0_rx_address
000fc01e 2 data ,g *
000fc71e 2 data ,g *
_g_iica0_rx_len
000fc020 2 data ,g *
000fc720 2 data ,g *
_g_iica0_rx_cnt
000fc022 2 data ,g *
000fc722 2 data ,g *
_gp_iica0_tx_address
000fc024 2 data ,g *
000fc724 2 data ,g *
_g_iica0_tx_cnt
000fc026 2 data ,g *
000fc726 2 data ,g *
FILE=DefaultBuild\owi.obj
000fc028 000fc732 70b
000fc728 000fce32 70b
_buf@2@OWI_ReadBytesAndPrint
000fc028 258 data ,l *
000fc728 258 data ,l *
_out@3@OWI_ReadBytesAndPrint
000fc280 4b3 data ,l *
000fc980 4b3 data ,l *
FILE=DefaultBuild\i2c.obj
000fc734 000fce3e 70b
000fce34 000fd53e 70b
_rx@2@I2C_Command_Mode_Send
000fc734 258 data ,l *
000fce34 258 data ,l *
_out@3@I2C_Command_Mode_Send
000fc98c 4b3 data ,l *
000fd08c 4b3 data ,l *
FILE=DefaultBuild\uart.obj
000fce40 000fcf41 102
000fd540 000fd941 402
_s_uart1_txbuf@1
000fce40 100 data ,l *
000fd540 400 data ,l *
_hex@2@uart1_send_hex
000fcf40 2 data ,l *
000fd940 2 data ,l *
FILE=sprintf
000fcf42 000fcf45 4
000fd942 000fd945 4
__REL_pointer@1
000fcf42 4 data ,l *
000fd942 4 data ,l *
FILE=_REL_print
000fcf46 000fcfc5 80
000fd946 000fd9c5 80
_qt@1@_REL_inmod@1
000fcf46 80 data ,l *
000fd946 80 data ,l *
SECTION=.dataR
FILE=DefaultBuild\r_main.obj
000fcfc6 000fd1e4 21f
000fd9c6 000fe1e6 821
_uart_rx_done
000fcfc6 1 data ,g *
000fd9c6 1 data ,g *
_uart_rx_index
000fcfc7 1 data ,g *
000fd9c8 2 data ,g *
_uart_rx_buffer
000fcfc8 100 data ,g *
000fd9ca 400 data ,g *
_uart_rx_length
000fd0c8 2 data ,g *
000fddca 2 data ,g *
_rs485_rx_done
000fd0ca 1 data ,g *
000fddcc 1 data ,g *
_rs485_rx_index
000fd0cb 1 data ,g *
000fddcd 1 data ,g *
_rs485_rx_buffer
000fd0cc 100 data ,g *
000fddce 400 data ,g *
_rs485_rx_length
000fd1cc 2 data ,g *
000fe1ce 2 data ,g *
_g_uart0_err_fef
000fd1ce 4 data ,g *
000fe1d0 4 data ,g *
_g_uart0_err_ovf
000fd1d2 4 data ,g *
000fe1d4 4 data ,g *
_g_uart0_err_pef
000fd1d6 4 data ,g *
000fe1d8 4 data ,g *
_g_rs485_bridge_active
000fd1da 1 data ,g *
000fe1dc 1 data ,g *
_g_rs485_bridge_done
000fd1db 1 data ,g *
000fe1dd 1 data ,g *
_g_rs485_bridge_seq
000fd1dc 2 data ,g *
000fe1de 2 data ,g *
_s_end_st@1
000fd1de 1 data ,l *
000fe1e0 1 data ,l *
_g_fixed_addr
000fd1df 1 data ,g *
000fe1e1 1 data ,g *
_s_rb_head@3
000fd1e0 2 data ,l *
000fe1e2 2 data ,l *
_s_rb_tail@4
000fd1e2 2 data ,l *
000fe1e4 2 data ,l *
_s_prefix_mode@6
000fd1e4 1 data ,l *
000fe1e6 1 data ,l *
FILE=DefaultBuild\owi.obj
000fd1e6 000fd1e9 4
000fe1e8 000fe1eb 4
_bit_period_us@1
000fd1e6 4 data ,l *
000fe1e8 4 data ,l *
FILE=DefaultBuild\i2c.obj
000fd1ea 000fd1f1 8
000fe1ec 000fe1f3 8
_i2c_tx_done
000fd1ea 1 data ,g *
000fe1ec 1 data ,g *
_i2c_rx_done
000fd1eb 1 data ,g *
000fe1ed 1 data ,g *
_g_i2c_last_command
000fd1ec 3 data ,g *
000fe1ee 3 data ,g *
_g_i2c_command_valid
000fd1ef 1 data ,g *
000fe1f1 1 data ,g *
_dis@1@disable
000fd1f0 2 data ,l *
000fe1f2 2 data ,l *
FILE=DefaultBuild\uart.obj
000fd1f2 000fd1f3 2
000fe1f4 000fe1f6 3
_g_uart0_tx_done
000fd1f2 1 data ,g *
000fe1f4 1 data ,g *
_g_uart1_tx_done
000fd1f3 1 data ,g *
000fe1f5 1 data ,g *
_g_rs485_need_recover
000fe1f6 1 data ,g *
FILE=DefaultBuild\gatectrl.obj
000fd1f4 000fd1f4 1
000fe1f8 000fe1f8 1
_s_ch@1
000fd1f4 1 data ,l *
000fe1f8 1 data ,l *
Absolute value symbols
FILE=DefaultBuild\gatectrl.obj
@ -686,13 +690,13 @@ FILE=DefaultBuild\gatectrl.obj
00000028 0 none ,l *
FILE=rlink_generates_05
__s.text
00000307 0 none ,g *
0000090b 0 none ,g *
__e.text
000004ba 0 none ,g *
00000ac0 0 none ,g *
__s.textf
000004ba 0 none ,g *
00000ac0 0 none ,g *
__e.textf
0000278a 0 none ,g *
00002dfa 0 none ,g *
__s.const
00003000 0 none ,g *
__e.const
@ -704,7 +708,7 @@ FILE=rlink_generates_05
__s.data
000000d8 0 none ,g *
__e.data
00000307 0 none ,g *
0000090b 0 none ,g *
__s.sdata
00000080 0 none ,g *
__e.sdata
@ -712,15 +716,15 @@ FILE=rlink_generates_05
__s.bss
000fb500 0 none ,g *
__e.bss
000fcfc6 0 none ,g *
000fd9c6 0 none ,g *
__s.sbss
000ffe20 0 none ,g *
__e.sbss
000ffe20 0 none ,g *
__s.dataR
000fcfc6 0 none ,g *
000fd9c6 0 none ,g *
__e.dataR
000fd1f5 0 none ,g *
000fe1f9 0 none ,g *
__s.sdataR
000ffe20 0 none ,g *
__e.sdataR
@ -764,7 +768,7 @@ FILE=rlink_generates_05
__STACK_ADDR_START
000ffe20 0 none ,g *
__STACK_ADDR_END
000fd1f6 0 none ,g *
000fe1fa 0 none ,g *
*** Unfilled Areas ***

1314
DefaultBuild/multical.mot

File diff suppressed because it is too large

BIN
DefaultBuild/owi.obj

Binary file not shown.

BIN
DefaultBuild/r_cg_serial_user.obj

Binary file not shown.

BIN
DefaultBuild/r_main.obj

Binary file not shown.

BIN
DefaultBuild/uart.obj

Binary file not shown.

42
QualityReport(multical,DefaultBuild).txt

@ -1,24 +1,24 @@
QualityReport
2026년 2월 6일 금요일 오전 10:35:33
2026년 2월 6일 금요일 오후 11:18:46
------ Start build(multical, DefaultBuild) ------
------ Build ended(Error:0, Warning:0)(multical, DefaultBuild) ------
--- SHA1 hash value of output files ---
C:\Users\MSI\Desktop\amosense\mulitcabration_4251_developement_fw\new_fw\DefaultBuild\multical.abs: a5534907a7523fd554cb20558441e7d7e807e916
C:\Users\MSI\Desktop\amosense\mulitcabration_4251_developement_fw\new_fw\DefaultBuild\multical.mot: 5e53a1f867431abe46e65592f9315e9c326aa8f9
C:\Users\temp\Desktop\new_fw\DefaultBuild\multical.abs: 235fac866adb556b01fbd5416ed5213237f23e5e
C:\Users\temp\Desktop\new_fw\DefaultBuild\multical.mot: 237e7ed8bd41bcb23dd5b9dfdfc2218d2ec27746
--- System Information ---
*OS Version
Microsoft Windows 11 Home (-, 10.0.26200, WOW64)
Microsoft Windows 10 Pro (-, 10.0.19045, WOW64)
*Language
한국어(대한민국)
*.NET Framework Version
Microsoft .NET Framework 4 [.NET 4.8 or later] (533509)
Microsoft .NET Framework 4 [.NET 4.8 or later] (533325)
*WebView2 Version
144.0.3719.93
144.0.3719.104
--- Application Information ---
*Product Name
@ -29,21 +29,19 @@ C:\Users\MSI\Desktop\amosense\mulitcabration_4251_developement_fw\new_fw\Default
V9.13.00.05 [12 Nov 2024]
*Assembly Version
3.12.10.1
*Sales Area
Japan
*Product License
*Execution Place
C:\Program Files (x86)\Renesas Electronics\CS+\CC
*Memory Usage
*Private Working Set
342 MB
398 MB
*Number of GDI Objects
2585
2660
*Number of USER Objects
1405
1655
*Opened Files
25 editors, 25 files, 206 KB
25 editors, 25 files, 230 KB
--- Build Tool Plug-in Information ---
RH850 Build tool CC-RH Plug-in
@ -148,20 +146,6 @@ Editor plug-in DLL
1.1.0.0
*DLL File Name
SEditor.dll
Smart Configurator for RH850 Communication Plug-in
*Version
V1.02.10.03 [14 Nov 2024]
*Assembly Version
1.0.0.0
*DLL File Name
SmcCodePartRH850.dll
Smart Configurator for RL78 Communication Plug-in
*Version
V1.00.11.01 [25 Nov 2024]
*Assembly Version
1.0.0.0
*DLL File Name
SmcCodePartRL78.dll
Stack Usage Tracer
*Version
V1.05.00.02 [30 Jul 2014]
@ -193,7 +177,7 @@ Device Information Common Interface
DeviceInformation.dll
--- Main Project Information ---
C:\Users\MSI\Desktop\amosense\mulitcabration_4251_developement_fw\new_fw\multical.mtpj
C:\Users\temp\Desktop\new_fw\multical.mtpj
Microcontroller Information
*R5F10PPJ
*File Name: Version
@ -234,10 +218,6 @@ Other Tool Information
*Version
V4.13.00.03 [24 May 2023]
*None
*None
*Code Generator
Other Information
*RL78/F14 Code Library

281
multical.temp.mtud

File diff suppressed because one or more lines are too long

56
r_cg_serial_user.c

@ -80,11 +80,13 @@ void RS485_Bridge_Push(uint8_t b);
extern volatile uint32_t g_uart0_err_fef;
extern volatile uint32_t g_uart0_err_ovf;
extern volatile uint32_t g_uart0_err_pef;
extern volatile uint8_t g_rs485_need_recover;
extern volatile uint8_t g_uart0_tx_done;
extern volatile uint8_t g_uart1_tx_done;
extern volatile uint16_t g_rs485_bridge_seq;
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
@ -255,12 +257,8 @@ static void r_uart0_callback_error(uint8_t err_type)
rs485_rx_done = 0;
rs485_rx_index = 0;
rs485_rx_length = 0;
// 2) ??? ??? ????? ? ??? ???? ??
g_rs485_bridge_done = 0;
// 3) ?? 1??? ?? ??(????)
R_UART0_Receive((uint8_t*)&rs485_rx_buffer[0], 1);
g_rs485_need_recover = 1;
/* End user code. Do not edit comment generated here */
}
@ -274,22 +272,23 @@ static void __near r_uart1_interrupt_receive(void)
{
volatile uint8_t rx_data;
volatile uint8_t err_type;
err_type = (uint8_t)(SSR11 & 0x0007U);
SIR11 = (uint16_t)err_type;
if (err_type != 0U)
{
if (err_type != 0U) {
(void)SDR11L; /* dummy read to clear */
r_uart1_callback_error(err_type);
return;
}
rx_data = SDR11L;
if (g_uart1_rx_length > g_uart1_rx_count)
{
*gp_uart1_rx_address = rx_data;
gp_uart1_rx_address++;
g_uart1_rx_count++;
g_uart1_rx_count++;
if (g_uart1_rx_length == g_uart1_rx_count)
{
@ -302,6 +301,7 @@ static void __near r_uart1_interrupt_receive(void)
}
}
/***********************************************************************************************************************
* Function Name: r_uart1_interrupt_send
* Description : This function is INTST1 interrupt service routine.
@ -331,21 +331,33 @@ static void __near r_uart1_interrupt_send(void)
static void r_uart1_callback_receiveend(void)
{
/* Start user code. Do not edit comment generated here */
/* ?? ???? uart_rx_buffer[uart_rx_index]? ??? ?? */
uint8_t c = uart_rx_buffer[uart_rx_index];
uart_rx_index++;
uart_rx_length = uart_rx_index;
// 한 줄 입력 끝 or 버퍼 가득
if (c == '\r' || c == '\n' || uart_rx_index >= (UART_RX_BUF_SIZE - 1))
{
/* index ?? (? uint16_t? 255 ??? ??) */
if (uart_rx_index < (UART_RX_BUF_SIZE - 1)) {
uart_rx_index++;
uart_rx_length = uart_rx_index;
} else {
/* ?? ??: ???? ?? ?? */
uart_rx_done = 1;
return;
}
else
{
// 다음 1바이트 계속 수신
/* CR? ??(??? CRLF?? ?? ?? ??) */
if (c == '\r') {
R_UART1_Receive((uint8_t *)&uart_rx_buffer[uart_rx_index], 1);
return;
}
/* LF??? ?? ?? */
if (c == '\n') {
uart_rx_done = 1;
return;
}
/* ?? 1??? ?? ?? */
R_UART1_Receive((uint8_t *)&uart_rx_buffer[uart_rx_index], 1);
/* End user code. Do not edit comment generated here */
}

42
r_main.c

@ -51,7 +51,7 @@ Includes
* Config
* ========================= */
#define CMD_MAX 529
#define UART_RX_BUF_SIZE 256
#define UART_RX_BUF_SIZE 1024
#define RS485_BRIDGE_FIFO_SZ 2048
#define BRIDGE_IDLE_DONE_US 5000U // 마지막 바이트 이후 3ms 조용하면 종료로 판단
@ -60,8 +60,8 @@ Includes
/* =========================
* UART RX Buffers
* ========================= */
volatile uint8_t uart_rx_done = 0;
volatile uint8_t uart_rx_index = 0;
volatile uint8_t uart_rx_done = 0;
volatile uint16_t uart_rx_index = 0; // ★ uint8_t -> uint16_t
volatile uint8_t uart_rx_buffer[UART_RX_BUF_SIZE] = {0};
volatile uint16_t uart_rx_length = 0;
@ -166,7 +166,7 @@ static int Is_V_Response_For(char *line, uint8_t addr)
* -
* - R_UART1_Send
* ========================= */
static uint8_t g_uart1_txbuf[256];
static uint8_t g_uart1_txbuf[512];
static void UART1_WaitTxIdle(void)
{
@ -200,7 +200,7 @@ static void UART1_SendString_Safe(const char *s)
if (s == 0) return;
UART1_WaitTxIdle();
UART1_WaitTxIdle(); // ? 보내기 전 대기
len = (uint16_t)strlen(s);
if (len >= (uint16_t)sizeof(g_uart1_txbuf))
@ -211,7 +211,7 @@ static void UART1_SendString_Safe(const char *s)
R_UART1_Send(g_uart1_txbuf, len);
//UART1_WaitTxIdle();
UART1_WaitTxIdle(); // ? ★ 추가: 보내고 난 뒤에도 대기 (버퍼 덮어쓰기 방지)
}
/* =========================
@ -470,6 +470,7 @@ static void PC_PrintLine_CRLF(const char *line)
static void scan_one_addr_rs485(uint8_t addr)
{
char cmdline[8];
uint8_t try;
if (addr == 0) return;
@ -482,6 +483,9 @@ static void scan_one_addr_rs485(uint8_t addr)
cmdline[6] = '\0';
/* ? try 횟수 줄이기: 속도 핵심 */
for (try = 0; try < 3; try++)
{
{
/* --- bridge 준비 --- */
g_rs485_bridge_active = 1;
@ -526,6 +530,13 @@ static void scan_one_addr_rs485(uint8_t addr)
g_rs485_bridge_active = 0;
}
// 실패 원인이 에러/꼬임이면 복구 후 재시도
if (g_rs485_need_recover) {
rs485_recover();
}
delay_us(500);
}
/* 실패 시 Nxx */
send_n_response(addr);
@ -754,6 +765,7 @@ static void process_one_line(CmdSource src, const volatile uint8_t *rx_buf, uint
g_rs485_bridge_active = 0;
if (total_us < 50U) {
rs485_recover();
OUT_PRINT(CMD_SRC_PC, "Err:rs485_timeout\r\n");
sprintf(msg, "Err:rs485_timeout fef=%lu ovf=%lu pef=%lu\r\n",
g_uart0_err_fef, g_uart0_err_ovf, g_uart0_err_pef);
@ -870,6 +882,7 @@ static void process_one_line(CmdSource src, const volatile uint8_t *rx_buf, uint
g_rs485_bridge_active = 0;
if (total_us < 50U) {
rs485_recover();
OUT_PRINT(CMD_SRC_PC, "Err:rs485_timeout\r\n");
sprintf(msg, "Err:rs485_timeout fef=%lu ovf=%lu pef=%lu\r\n",
g_uart0_err_fef, g_uart0_err_ovf, g_uart0_err_pef);
@ -989,6 +1002,23 @@ void handle_uart_command_line(void)
{
while (1)
{
if (g_rs485_need_recover) {
/* 1) 브릿지 강제 종료 */
g_rs485_bridge_active = 0;
g_rs485_bridge_done = 0;
RS485_Bridge_ResetFifo(); // 같은 파일 내 static이라 호출 가능
/* 2) RS485 RX 상태 정리 */
rs485_rx_done = 0;
rs485_rx_index = 0;
rs485_rx_length = 0;
/* 3) UART0 stop/start + RX 재arm */
rs485_recover();
g_rs485_need_recover = 0;
}
/* 브릿지 중이면 RS485->PC 계속 드레인 */
if (g_rs485_bridge_active) {
RS485_Bridge_DrainToPC();

54
uart.c

@ -2,6 +2,7 @@
#include "delay.h"
#include "r_cg_adc.h"
#include "r_cg_port.h"
#include <string.h>
#define RS485_EN_PORT P4
#define RS485_EN_PM PM4
@ -11,8 +12,50 @@ volatile uint8_t g_uart0_tx_done = 1;
volatile uint8_t g_uart1_tx_done = 1;
extern volatile uint16_t g_uart1_tx_count;
extern volatile uint8_t rs485_rx_done;
extern volatile uint8_t rs485_rx_index;
extern volatile uint16_t rs485_rx_length;
extern volatile uint8_t rs485_rx_buffer[];
extern volatile uint8_t g_rs485_bridge_active;
extern volatile uint8_t g_rs485_bridge_done;
volatile uint8_t g_rs485_need_recover = 0;
void rs485_recover(void)
{
DI(); // ISR 경쟁 줄이기 (권장)
rs485_set_tx(0); // RX 모드 고정
// UART0 재시작
R_UART0_Stop();
delay_us(200);
R_UART0_Create();
delay_us(200);
R_UART0_Start();
delay_us(200);
// 에러 플래그/카운터 정리
g_uart0_err_fef = 0;
g_uart0_err_ovf = 0;
g_uart0_err_pef = 0;
// RX 다시 arm
rs485_rx_done = 0;
rs485_rx_index = 0;
rs485_rx_length = 0;
R_UART0_Receive((uint8_t*)&rs485_rx_buffer[0], 1);
g_rs485_need_recover = 0; // recover 완료 처리 (여기서 내려도 OK)
EI();
}
/* UART1 송신용 내부 버퍼(스택 포인터 안전) */
static uint8_t s_uart1_txbuf[256]; // 너 출력 단위가 "72 " / "7272 " 정도라 64면 충분
static uint16_t s_uart1_txbuf[512]; // 너 출력 단위가 "72 " / "7272 " 정도라 64면 충분
// (더 길게 보내면 키워도 됨)
static void UART1_WaitTxIdle(void)
@ -48,7 +91,7 @@ void RS485_Send(const uint8_t* data, uint16_t len)
{
if (!data || len == 0) return;
/* 송신 시작을 명확히 */
/* 송신 시작을 명확히 */
g_uart0_tx_done = 0;
rs485_set_tx(1);
@ -111,6 +154,8 @@ void uart1_send_string(const char *str)
/* ✅ 이전 전송 끝날 때까지 대기 */
UART1_WaitTxIdle();
g_uart1_tx_done = 0;
/* ✅ 스택 포인터/버퍼 수명 문제 방지: 내부 버퍼로 복사 */
if (len >= (uint16_t)sizeof(s_uart1_txbuf))
@ -162,8 +207,7 @@ void uart_send_hex(uint8_t val)
hex[0] = (high < 10) ? ('0' + high) : ('A' + (high - 10));
hex[1] = (low < 10) ? ('0' + low) : ('A' + (low - 10));
rs485_set_tx(1);
R_UART0_Send(hex, 2);
RS485_Send(hex, 2);
}
@ -177,6 +221,8 @@ void uart1_send_hex(uint8_t val)
hex[1] = (low < 10) ? ('0' + low ) : ('A' + (low - 10));
UART1_WaitTxIdle();
g_uart1_tx_done = 0;
R_UART1_Send(hex, 2);
}

13
uart.h

@ -13,7 +13,7 @@ void UART0_WaitTxDone_Us(uint32_t timeout_us);
#define ADC_RESOLUTION 1023.0f // 10-bit ADC
#define VREF 5.06f // V
#define RAM_BYTES 13
#define UART_RX_BUF_SIZE 256
#define UART_RX_BUF_SIZE 1024
extern volatile uint32_t g_uart0_err_fef;
extern volatile uint32_t g_uart0_err_ovf;
@ -28,10 +28,16 @@ extern volatile uint32_t g_uart0_err_pef;
#define RS485_PRINT_HEX(v) uart_send_hex((v))
extern volatile uint8_t uart_rx_done;
extern volatile uint8_t uart_rx_index;
extern volatile uint16_t uart_rx_index;
extern volatile uint8_t uart_rx_buffer[UART_RX_BUF_SIZE];
extern volatile uint16_t uart_rx_length;
extern volatile uint8_t g_rs485_need_recover;
extern volatile uint32_t g_uart0_err_fef;
extern volatile uint32_t g_uart0_err_ovf;
extern volatile uint32_t g_uart0_err_pef;
extern uint8_t g_fixed_addr;
#define HOST_PRINT(s) do { \
@ -54,3 +60,6 @@ void cmd_unknown(const unsigned char *d, unsigned int len);
void rs485_init(void);
void rs485_set_tx(uint8_t on);
void rs485_recover(void);

Loading…
Cancel
Save