mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-05-31 03:38:02 +08:00
[bsp/gd32] fix gd32vw553 bsp
This commit is contained in:
@@ -65,7 +65,7 @@ gd32_library = 'GD32VW55x_Firmware_Library'
|
|||||||
rtconfig.BSP_LIBRARY_TYPE = gd32_library
|
rtconfig.BSP_LIBRARY_TYPE = gd32_library
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript'), variant_dir='build/libraries', duplicate=0))
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
|||||||
@@ -10,16 +10,13 @@ MEMORY
|
|||||||
|
|
||||||
/* Run in RAM */
|
/* Run in RAM */
|
||||||
/* flash (rxai!w) : ORIGIN = 0x20000000, LENGTH = 32k
|
/* flash (rxai!w) : ORIGIN = 0x20000000, LENGTH = 32k
|
||||||
ram (wxa!ri) : ORIGIN = 0x20008000, LENGTH = 256K
|
ram (wxa!ri) : ORIGIN = 0x20008000, LENGTH = 256K */
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
__stack_size = DEFINED(__stack_size) ? __stack_size : 4K;
|
__stack_size = DEFINED(__stack_size) ? __stack_size : 4K;
|
||||||
|
|
||||||
|
|
||||||
.init :
|
.init :
|
||||||
{
|
{
|
||||||
KEEP (*(SORT_NONE(.init)))
|
KEEP (*(SORT_NONE(.init)))
|
||||||
@@ -36,6 +33,41 @@ SECTIONS
|
|||||||
PROVIDE( _ilm = . );
|
PROVIDE( _ilm = . );
|
||||||
} >flash AT>flash
|
} >flash AT>flash
|
||||||
|
|
||||||
|
_sicode = LOADADDR(.code_to_sram);
|
||||||
|
|
||||||
|
.code_to_sram :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_scode = .;
|
||||||
|
|
||||||
|
*trap_gcc.o* (.text*)
|
||||||
|
*port.o* (.text.eclic_mtip_handler)
|
||||||
|
*lib_a-memcpy.o* (.text*)
|
||||||
|
*wrapper_os.o* (.text.sys_memcpy*)
|
||||||
|
*inet_chksum.o* (.text.lwip_standard_chksum)
|
||||||
|
/**macsw/modules/ke/ke_event.o* (.rodata.ke_evt_hdlr*)
|
||||||
|
*rxl_cntrl.o* (.text.rxl_upload_evt)*/
|
||||||
|
*txl_agg.o* (.text.txl_agg_push_mpdu .text.txl_agg_finish)
|
||||||
|
*txl_he.o* (.text.txl_he_tb_prot_trigger .text.txl_he_trigger_push)
|
||||||
|
*rxl_hwdesc.o* (.text.rxl_immediate_frame_get .text.rxl_rxcntrl_frame)
|
||||||
|
|
||||||
|
|
||||||
|
*txl_agg.o* (.text.* .rodata.*)
|
||||||
|
*txl_he.o* (.text.* .rodata.*)
|
||||||
|
*rxl_hwdesc.o* (.text.* .rodata.*)
|
||||||
|
|
||||||
|
*drv_uart.o* (.text.USART0_IRQHandler .text.GD32_UART_IRQHandler) /* choose UART on condition */
|
||||||
|
*gd32vw55x_usart.o* (.text.usart_interrupt_flag_get .text.usart_interrupt_flag_clear .text.usart_flag_get .text.usart_flag_clear)
|
||||||
|
*gd32vw55x_usart.o* (.text.usart_data_receive .text.usart_data_transmit)
|
||||||
|
*gd32vw55x_usart.o* (.text.usart_interrupt_enable .text.usart_interrupt_disable)
|
||||||
|
*dev_serial.o* (.text.rt_hw_serial_isr)
|
||||||
|
*save-restore.o* (.text*)
|
||||||
|
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
_ecode = .;
|
||||||
|
} >ram AT>flash
|
||||||
|
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
*(.rodata .rodata.*)
|
*(.rodata .rodata.*)
|
||||||
@@ -153,12 +185,12 @@ SECTIONS
|
|||||||
.dalign :
|
.dalign :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
PROVIDE( _data = . );
|
|
||||||
} >ram AT>flash
|
} >ram AT>flash
|
||||||
|
|
||||||
|
|
||||||
.data :
|
.data :
|
||||||
{
|
{
|
||||||
|
PROVIDE( _data = . );
|
||||||
*(.rdata)
|
*(.rdata)
|
||||||
|
|
||||||
*(.gnu.linkonce.r.*)
|
*(.gnu.linkonce.r.*)
|
||||||
|
|||||||
@@ -191,7 +191,6 @@ online-packages.rtduino.other:
|
|||||||
kconfig:
|
kconfig:
|
||||||
- CONFIG_BSP_USING_ARDUINO=y
|
- CONFIG_BSP_USING_ARDUINO=y
|
||||||
- CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MFRC630=y
|
- CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MFRC630=y
|
||||||
- CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI5351=y
|
|
||||||
online-packages.rtduino.projects:
|
online-packages.rtduino.projects:
|
||||||
<<: *scons
|
<<: *scons
|
||||||
kconfig:
|
kconfig:
|
||||||
|
|||||||
@@ -102,12 +102,18 @@ SW_handler:
|
|||||||
/* interrupt handle */
|
/* interrupt handle */
|
||||||
call rt_interrupt_enter
|
call rt_interrupt_enter
|
||||||
/* Do the work after saving the above */
|
/* Do the work after saving the above */
|
||||||
jal rt_hw_do_after_save_above
|
call rt_hw_do_after_save_above
|
||||||
|
|
||||||
call rt_interrupt_leave
|
call rt_interrupt_leave
|
||||||
/* switch to from thread stack */
|
/* switch to from thread stack */
|
||||||
csrrw sp,mscratch,sp
|
csrrw sp,mscratch,sp
|
||||||
|
|
||||||
|
/* Check if we are in interrupt nesting, if so, skip task switching */
|
||||||
|
la t0, rt_interrupt_nest
|
||||||
|
lw t1, 0(t0)
|
||||||
|
li t2, 1
|
||||||
|
bge t1, t2, 1f
|
||||||
|
|
||||||
/* Determine whether to trigger scheduling at the interrupt function */
|
/* Determine whether to trigger scheduling at the interrupt function */
|
||||||
la t0, rt_thread_switch_interrupt_flag
|
la t0, rt_thread_switch_interrupt_flag
|
||||||
lw t2, 0(t0)
|
lw t2, 0(t0)
|
||||||
|
|||||||
Reference in New Issue
Block a user