[rtdef] use lower-case to define attributes (#6728)

* [rtdef] rename RT_WEAK attribute as rt_weak

* [rtdef] rename RT_USED attribute as rt_used

* [rtdef] rename RT_SECTION attribute as rt_section

* [rtdef] rename ALIGN attribute as rt_align

* [legacy] add RT_USED ALIGN RT_SECTION RT_WEAK as legacy support
This commit is contained in:
Man, Jianting (Meco)
2022-12-11 13:12:03 -05:00
committed by GitHub
parent a4b8762d85
commit 99bdf978d7
178 changed files with 472 additions and 462 deletions
+2 -2
View File
@@ -20,7 +20,7 @@
* this function will reset CPU
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
}
@@ -28,7 +28,7 @@ RT_WEAK void rt_hw_cpu_reset()
* this function will shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
+2 -2
View File
@@ -20,7 +20,7 @@
* this function will reset CPU
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
}
@@ -28,7 +28,7 @@ RT_WEAK void rt_hw_cpu_reset()
* this function will shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
+1 -1
View File
@@ -182,7 +182,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+1 -1
View File
@@ -156,7 +156,7 @@ void mmu_setmtt(rt_uint32_t vaddrStart, rt_uint32_t vaddrEnd, rt_uint32_t paddrS
}
/* set page table */
RT_WEAK void mmu_setmtts(void)
rt_weak void mmu_setmtts(void)
{
mmu_setmtt(0x00000000, 0xFFFFFFFF, 0x00000000, RW_NCNB); /* None cached for 4G memory */
mmu_setmtt(0x80200000, 0x80800000 - 1, 0x80200000, RW_CB); /* 126M cached DDR memory */
+2 -2
View File
@@ -146,7 +146,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
rt_kprintf("Restarting system...\n");
@@ -161,7 +161,7 @@ RT_WEAK void rt_hw_cpu_reset()
* shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+2 -2
View File
@@ -11,14 +11,14 @@
#include <rthw.h>
#include <rtthread.h>
RT_WEAK void machine_reset(void)
rt_weak void machine_reset(void)
{
rt_kprintf("reboot system...\n");
rt_hw_interrupt_disable();
while (1);
}
RT_WEAK void machine_shutdown(void)
rt_weak void machine_shutdown(void)
{
rt_kprintf("shutdown...\n");
rt_hw_interrupt_disable();
+2 -2
View File
@@ -147,7 +147,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
rt_kprintf("Restarting system...\n");
@@ -162,7 +162,7 @@ RT_WEAK void rt_hw_cpu_reset()
* shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+2 -2
View File
@@ -421,13 +421,13 @@ void mmu_invalidate_dcache_all()
#endif
/* level1 page table */
static volatile unsigned int _pgd_table[4*1024] ALIGN(16*1024);
static volatile unsigned int _pgd_table[4*1024] rt_align(16*1024);
/*
* level2 page table
* RT_MMU_PTE_SIZE must be 1024*n
*/
#define RT_MMU_PTE_SIZE 4096
static volatile unsigned int _pte_table[RT_MMU_PTE_SIZE] ALIGN(1*1024);
static volatile unsigned int _pte_table[RT_MMU_PTE_SIZE] rt_align(1*1024);
void mmu_create_pgd(struct mem_desc *mdesc)
{
+1 -1
View File
@@ -74,7 +74,7 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock)
/*@{*/
/** shutdown CPU */
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+2 -2
View File
@@ -42,12 +42,12 @@ static unsigned int _gic_max_irq;
* PE within a cluster with an Affinity 0 value equal to the bit number.
* @return {rt_uint32_t} 0 is finish , 1 is data valid
*/
RT_WEAK rt_uint32_t arm_gic_cpumask_to_affval(rt_uint32_t *cpu_mask, rt_uint32_t *cluster_id, rt_uint32_t *target_list)
rt_weak rt_uint32_t arm_gic_cpumask_to_affval(rt_uint32_t *cpu_mask, rt_uint32_t *cluster_id, rt_uint32_t *target_list)
{
return 0;
}
RT_WEAK rt_uint64_t get_main_cpu_affval(void)
rt_weak rt_uint64_t get_main_cpu_affval(void)
{
return 0;
}
+1 -1
View File
@@ -131,7 +131,7 @@ void rt_hw_hard_fault_exception(struct exception_stack_frame *contex)
/**
* reset CPU
*/
RT_WEAK void rt_hw_cpu_reset(void)
rt_weak void rt_hw_cpu_reset(void)
{
SCB_AIRCR = SCB_RESET_VALUE;//((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |SCB_AIRCR_SYSRESETREQ_Msk);
}
+1 -1
View File
@@ -132,7 +132,7 @@ void rt_hw_hard_fault_exception(struct exception_stack_frame *contex)
/**
* reset CPU
*/
RT_WEAK void rt_hw_cpu_reset(void)
rt_weak void rt_hw_cpu_reset(void)
{
SCB_AIRCR = SCB_RESET_VALUE;//((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |SCB_AIRCR_SYSRESETREQ_Msk);
}
+2 -2
View File
@@ -346,7 +346,7 @@ void rt_hw_hard_fault_exception(struct exception_info * exception_info)
/**
* shutdown CPU
*/
RT_WEAK void rt_hw_cpu_shutdown(void)
rt_weak void rt_hw_cpu_shutdown(void)
{
rt_kprintf("shutdown...\n");
@@ -356,7 +356,7 @@ RT_WEAK void rt_hw_cpu_shutdown(void)
/**
* reset CPU
*/
RT_WEAK void rt_hw_cpu_reset(void)
rt_weak void rt_hw_cpu_reset(void)
{
SCB_AIRCR = SCB_RESET_VALUE;
}
+2 -2
View File
@@ -488,7 +488,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
/**
* shutdown CPU
*/
RT_WEAK void rt_hw_cpu_shutdown(void)
rt_weak void rt_hw_cpu_shutdown(void)
{
rt_kprintf("shutdown...\n");
@@ -498,7 +498,7 @@ RT_WEAK void rt_hw_cpu_shutdown(void)
/**
* reset CPU
*/
RT_WEAK void rt_hw_cpu_reset(void)
rt_weak void rt_hw_cpu_reset(void)
{
SCB_AIRCR = SCB_RESET_VALUE;
}
+2 -2
View File
@@ -431,7 +431,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
/**
* shutdown CPU
*/
RT_WEAK void rt_hw_cpu_shutdown(void)
rt_weak void rt_hw_cpu_shutdown(void)
{
rt_kprintf("shutdown...\n");
@@ -441,7 +441,7 @@ RT_WEAK void rt_hw_cpu_shutdown(void)
/**
* reset CPU
*/
RT_WEAK void rt_hw_cpu_reset(void)
rt_weak void rt_hw_cpu_reset(void)
{
SCB_AIRCR = SCB_RESET_VALUE;
}
+2 -2
View File
@@ -430,7 +430,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
/**
* shutdown CPU
*/
RT_WEAK void rt_hw_cpu_shutdown(void)
rt_weak void rt_hw_cpu_shutdown(void)
{
rt_kprintf("shutdown...\n");
@@ -440,7 +440,7 @@ RT_WEAK void rt_hw_cpu_shutdown(void)
/**
* reset CPU
*/
RT_WEAK void rt_hw_cpu_reset(void)
rt_weak void rt_hw_cpu_reset(void)
{
SCB_AIRCR = SCB_RESET_VALUE;
}
+2 -2
View File
@@ -20,7 +20,7 @@
* this function will reset CPU
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
}
@@ -28,7 +28,7 @@ RT_WEAK void rt_hw_cpu_reset()
* this function will shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
+2 -2
View File
@@ -145,7 +145,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
rt_kprintf("Restarting system...\n");
@@ -160,7 +160,7 @@ RT_WEAK void rt_hw_cpu_reset()
* shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+2 -2
View File
@@ -421,12 +421,12 @@ void mmu_invalidate_dcache_all()
#endif
/* level1 page table */
static volatile unsigned int _pgd_table[4*1024] ALIGN(16*1024);
static volatile unsigned int _pgd_table[4*1024] rt_align(16*1024);
/*
* level2 page table
* RT_MMU_PTE_SIZE must be 1024*n
*/
static volatile unsigned int _pte_table[RT_MMU_PTE_SIZE] ALIGN(1*1024);
static volatile unsigned int _pte_table[RT_MMU_PTE_SIZE] rt_align(1*1024);
void mmu_create_pgd(struct mem_desc *mdesc)
{
+2 -2
View File
@@ -163,7 +163,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
* this function will reset CPU
*
*/
RT_WEAK void rt_hw_cpu_reset(void)
rt_weak void rt_hw_cpu_reset(void)
{
}
@@ -171,7 +171,7 @@ RT_WEAK void rt_hw_cpu_reset(void)
* this function will shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
+2 -2
View File
@@ -20,7 +20,7 @@
* this function will reset CPU
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
}
@@ -28,7 +28,7 @@ RT_WEAK void rt_hw_cpu_reset()
* this function will shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
+1 -1
View File
@@ -18,7 +18,7 @@
/*@{*/
/** shutdown CPU */
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+3 -3
View File
@@ -26,9 +26,9 @@ extern volatile rt_uint8_t rt_interrupt_nest;
struct rt_irq_desc isr_table[MAX_HANDLERS];
/* Those varibles will be accessed in ISR, so we need to share them. */
rt_uint32_t rt_interrupt_from_thread RT_SECTION(".bss.share.int");
rt_uint32_t rt_interrupt_to_thread RT_SECTION(".bss.share.int");
rt_uint32_t rt_thread_switch_interrupt_flag RT_SECTION(".bss.share.int");
rt_uint32_t rt_interrupt_from_thread rt_section(".bss.share.int");
rt_uint32_t rt_interrupt_to_thread rt_section(".bss.share.int");
rt_uint32_t rt_thread_switch_interrupt_flag rt_section(".bss.share.int");
const unsigned int VECTOR_BASE = 0x00;
extern void rt_cpu_vector_set_base(unsigned int addr);
+2 -2
View File
@@ -148,7 +148,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
/* Disable all interrupt except the WDT */
INTMSK = (~((rt_uint32_t)1 << INTWDT));
@@ -171,7 +171,7 @@ RT_WEAK void rt_hw_cpu_reset()
* shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+2 -2
View File
@@ -100,7 +100,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* this function will reset CPU
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
}
@@ -108,7 +108,7 @@ RT_WEAK void rt_hw_cpu_reset()
* this function will shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
+2 -2
View File
@@ -152,7 +152,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out
*
*/
RT_WEAK void rt_hw_cpu_reset()
rt_weak void rt_hw_cpu_reset()
{
/* enable watchdog */
@@ -173,7 +173,7 @@ RT_WEAK void rt_hw_cpu_reset()
* shutdown CPU
*
*/
RT_WEAK void rt_hw_cpu_shutdown()
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");