void *rt_page_alloc(rt_size_t npages) void rt_page_free(void *addr, rt_size_t npages) static void rt_page_init(void *addr, rt_size_t npages) void rt_system_heap_init(void *begin_addr, void *end_addr) void *rt_malloc(rt_size_t size) void rt_free(void *ptr) 这里面有个rt_...
* Please modify RT_HEAP_SIZE if you enable RT_USING_HEAP * the RT_HEAP_SIZE max value = (sram size - ZI size), 1024 means 1024 bytes */ #define RT_HEAP_SIZE (20*1024) static rt_uint8_t rt_heap[RT_HEAP_SIZE]; RT_WEAK void *rt_heap_begin_get(void) { return rt_heap; } ...
ASSERT((STACK_SIZE + HEAP_SIZE) <= 256K, "stack and heap total size larger than 256k")} 由于使用的是 gcc 编译工具链,这里格式按照 gcc的格式来编写和修改;如果使用的是SES的开发工具链,这套链接文件应该无法正常使用。本文来自博客园,作者:求隐,转载请注明原文链接:https://www.cnblogs.com/du...
#defineHEAP_MAGIC 0x1ea0structheap_mem{/* magic and used flag */rt_uint16_t magic;//标记该快属于内存管理的,赋值为0X1EA0,rt_uint16_t used;//是否被分配#ifdefARCH_CPU_64BITrt_uint32_t resv;#endifrt_size_t next,prev;#ifdefRT_USING_MEMTRACE#ifdefARCH_CPU_64BITrt_uint8_t thread...
基于正点原子的阿波罗H743进行RTT的emwin移植。屏幕是RGB屏幕,DMA控制,数据放在SDRAM,这部分单独测试没...
#define HEAP_BEGIN (&__bss_end) #endif #define SRAM_SIZE 8 #define SRAM_END (0x20000000 + SRAM_SIZE * 1024) /** * This function will initial STM32 board. */ void rt_hw_board_init() { // rtthread tick configuration // 2. Configure rtos tick and interrupt ...
voidrt_application_init(void){rt_thread_t tid;#ifdefRT_USING_HEAPtid=rt_thread_create('main',main_thread_entry,RT_NULL,RT_MAIN_THREAD_STACK_SIZE,RT_THREAD_PRIORITY_MAX/3,20);RT_ASSERT(tid!=RT_NULL);#elsert_err_t result;tid=&main_thread;result=rt_thread_init(tid,'main',main_thread...
voidrt_application_init(void){rt_thread_t tid;#ifdefRT_USING_HEAPtid=rt_thread_create('main',main_thread_entry,RT_NULL,RT_MAIN_THREAD_STACK_SIZE,RT_THREAD_PRIORITY_MAX/3,20);RT_ASSERT(tid!=RT_NULL);#elsert_err_t result;tid=&main_thread;result=rt_thread_init(tid,'main',main_thread...
#define RT_ALIGN_SIZE 4 /* 定义系统线程优先级数;通常用 RT_THREAD_PRIORITY_MAX-1 定义空闲线程的优先级 */ #define RT_THREAD_PRIORITY_MAX 32 /* 定义时钟节拍,为 100 时表示 100 个 tick 每秒,一个 tick 为 10ms */ #define RT_TICK_PER_SECOND 100 ...
rt_thread_create()创建一个动态线程,使用rt_thread_init()初始化一个静态线程,动态线程与静态线程的区别是:动态线程是系统自动从动态内存堆上分配栈空间与线程句柄(初始化 heap 之后才能使用 create 创建动态线程),静态线程是由用户分配栈空间与线程句柄。