自己DIY了一块STM32F042C6的DemoBoard。 一天突发奇想,想要把FreeRTOS移植到板子上。 头一次移植,苦恼于网上找不断Keil CM0 下移植的直接例程,程序调试也老是在xTaskCreate失败。 今天程序终于调好了,能够开始跑FreeRTOS了。/ ^* s4 R) e O 程序功能: 1.LED指示灯 2.USART1 & USART2 中断接收,轮询发送 3.CAN 中断接收,轮询发送 4.RTC 8 S& D+ u: B ` 献上代码,请多指点。- G: ?! [( b2 c" S$ e 代码未经整理,比较乱,请各位看官见谅。(该文件可直接导入eclipse C/C++工程,方便浏览。)3 ]8 g ^7 F }) w& _6 I |
【管管推荐】STM32经验分享篇
STM32固件库分享,超全系列整理
三创电子(Tcreate)-STM32F030核心板代码
STM32F0 ADC(DMA中断)多通道,注释超详细
FreeRTOS在STM32F030上的移植
基于STM32移植而引发的疑问经验分享
分享STM32F051中文参考手册(重制书签版)
游名:STM32F0+Trinamic智能步进驱动芯片TMC5160(最高20A)参考原...
【MCU实战经验】+STM32F030的步进电机加减速
STM32F0的中文技术参考手册(标签处理过)
RE:FreeRTOS V8.1.2移植到Cortex-M0(STM32F042C6)
--------------------------------------5 N, `/ m' ^9 Q |7 t: H; T* m
#define configUSE_PREEMPTION 15 B' Z; I- b8 `/ V; T
#define configUSE_IDLE_HOOK 0 1 a* B. N7 ~! l1 k: a+ W6 z/ ~: D
#define configUSE_TICK_HOOK 0 & T3 p. e6 X" l" I# u+ i
#define configCPU_CLOCK_HZ ( ( uint32_t ) 48000000 )3 v' H3 q2 n# G
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) ' ^1 H, N, \+ f1 I5 g& d0 ~
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 10 ) ( Z& |, f9 Z* s: m3 N( A
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 3400 ) ) /* 计算入Keil-ZI. */
#define configMAX_TASK_NAME_LEN ( 16 )* i3 S( F& k8 W4 N8 n! m
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 05 g; W( |( g* v* }* J6 |
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
#define configQUEUE_REGISTRY_SIZE 8- ^4 Y9 f4 O, b* y3 \% R2 F
#define configCHECK_FOR_STACK_OVERFLOW 0
#define configUSE_RECURSIVE_MUTEXES 1
#define configUSE_MALLOC_FAILED_HOOK 0% X6 \1 A" p+ }
#define configUSE_APPLICATION_TASK_TAG 0
#define configUSE_COUNTING_SEMAPHORES 1 x4 k; Z+ S1 g5 z/ S
#define configGENERATE_RUN_TIME_STATS 0# s- ^. S* P2 C% c9 k
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0+ }% i& i1 J6 H
#define configMAX_CO_ROUTINE_PRIORITIES 2# X) j Y0 b/ m6 @
/* Software timer definitions. */0 ?' d( _; q9 G" O4 X7 n
#define configUSE_TIMERS 15 ^- S1 B5 y% [
#define configTIMER_TASK_PRIORITY ( 2 )
#define configTIMER_QUEUE_LENGTH 5, ^7 ]" h4 F2 Q! s3 U3 ^, M
#define configTIMER_TASK_STACK_DEPTH ( 80 )% {9 M9 e$ g h
/* Set the following definitions to 1 to include the API function, or zero5 K' t* h9 q3 {
to exclude the API function. */$ z' ~! W' ?" x( _ h, r8 P
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1. B$ z4 X. e% ?. ` L S) L! R: r
#define INCLUDE_vTaskDelete 1% ^- Y3 } g# N
#define INCLUDE_vTaskCleanUpResources 1
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 11 L+ ?6 f% e. S2 A& y
#define INCLUDE_vTaskDelay 13 J- _& }- n1 H5 u
/* Normal assert() semantics without relying on the provision of an assert.h7 _( o7 u/ R) s& s; _. u
header file. */
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
RE:FreeRTOS V8.1.2移植到Cortex-M0(STM32F042C6)
RE:FreeRTOS V8.1.2移植到Cortex-M0(STM32F042C6)
RE:FreeRTOS V8.1.2移植到Cortex-M0(STM32F042C6)