官网地址:http://www.chibios.org/dokuwiki/doku.php

下载源码

找到STM32F407的demos程序(chibios\demos\STM32\RT-STM32F407-DISCOVERY

/*
* This is a periodic thread that does absolutely nothing except flashing
* a LED.
*/
static THD_WORKING_AREA(waThread1, 128);
static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
while (true) {
palSetPad(GPIOD, GPIOD_LED3); /* Orange. 根据个人开发板配置*/
chThdSleepMilliseconds(500);
palClearPad(GPIOD, GPIOD_LED3); /* Orange. */
chThdSleepMilliseconds(500);
}
} /*
* Application entry point.
*/
int main(void) { /*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
chSysInit(); /*
* Activates the serial driver 2 using the driver default configuration.
* PA2(TX) and PA3(RX) are routed to USART2.
*/
sdStart(&SD2, NULL); //SD2,代表UART2
palSetPadMode(GPIOA, 2, PAL_MODE_ALTERNATE(7)); //UART TX
palSetPadMode(GPIOA, 3, PAL_MODE_ALTERNATE(7)); //UART RX /*
* Creates the example thread. 创建线程
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); /*
* Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
while (true) {
if (palReadPad(GPIOA, GPIOA_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
}
}

使用烧写工具烧写。效果是串口不断打印TestThread中的信息,LED不断闪烁

ChibiOS/RT移植到STM32F407的更多相关文章

  1. zubax_gnss移植到STM32F407

    源码下载:https://github.com/Zubax/zubax_gnss.git 源码默认支持STM32F107芯片 STM32 HAL库测试:zubax_gnss\bootloader\zu ...

  2. ChibiOS/RT 2.6.9 CAN Driver

    Detailed Description Generic CAN Driver. This module implements a generic CAN (Controller Area Netwo ...

  3. rt—移植笔记1

    将rtt源码往stm32f407移植的时候,源码串口打印引脚设置有误,以下是源码引脚配置. 以下是原理图 可见配置有误.

  4. rt—移植笔记2(Lwip)

    首先参考f107已经有的目录结构添加Lwip这一组,添加各种.c文件及.文件. 还有drive下边的很重要的eth.c 到此,工程编译通过.(刚开始,小编是一个一个 的比对...一个一个错误排查... ...

  5. ChibiOS/RT 2.6.9 CAN Low Level Driver for STM32

    /* ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio Licensed under the Apache License, Version 2 ...

  6. LwIP移植uCos+stm32f407

    LwIP同操作系统一起工作的时候模型如下: 1.TCP/IP协议栈和应用程序以分离的任务运行 2.应用同协议栈沟通是通过API函数调用(API函数调用事实上就是通过OS自带的进程间通信机制,由应用程序 ...

  7. freeRTOS V10.0.1移植到STM32F407标准库 - 环境Keil5

    最近因为工作需要用到FreeRTOS,其实开始本人内心是拒绝的因为自己只学习过UCOSIII还没实际上过什么大又复杂的工程,但是谁让FreeRTOS他是Free的呢公司成本考虑肯定是不会选择USOS的 ...

  8. 【WP 8.1开发】如何把自定义字体塞进应用里

    或许,系统自带的字体不足以体现应用程序的魅力,对于表现极强的汉字来说,更是如此.这时候,我们就会想,要是能把网上下载的艺术字体塞到应用包中,那岂不美哉?那么,这可以实现吗?答案是Yes的. 接下来,阿 ...

  9. Open Source RTOS

    http://www.osrtos.com/     Name License Platforms Description Last updated FreeRTOS Modified GPL MSP ...

随机推荐

  1. 【FreeMarker】FreeMarker快速入门(一)

    什么是 FreeMarker FreeMarker 是一款 模板引擎: 即一种基于模板和要改变的数据, 并用来生成输出文本(HTML网页,电子邮件,配置文件,源代码等)的通用工具. 它不是面向最终用户 ...

  2. 通过直方图进行PCA准备

    import graphviz import mglearn from mpl_toolkits.mplot3d import Axes3D from sklearn.datasets import ...

  3. 详细介绍Oracle数据库的聚簇技术

    作者:☜ Tracy ☞ 1. 什么是聚簇 d1=A=: 聚簇是根据码值找到数据的物理存储位置,从而达到快速检索数据的目的.聚簇索引的顺序就是数据的物理存储顺序,叶节点就是数据节点.非聚簇索引的顺序与 ...

  4. PAT 甲级 1070 Mooncake (25 分)(结构体排序,贪心,简单)

    1070 Mooncake (25 分)   Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autum ...

  5. ABAP函数篇1 日期函数

    1. 日期格式字段检查 data:l_date type ekko-bedat. l_date = '20080901'. CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY ...

  6. [Google] Help employee find the nearest gbike

    You are given a campus map with the Google buildings, roads and Google bikes. You have to help the e ...

  7. 【Gstreamer开发】TI嵌入式处理器GStreamer pipeline

    Example GStreamer Pipelines From Texas Instruments Embedded Processors Wiki Jump to: navigation, sea ...

  8. 感受typescript定义变量和数据类型的神奇魔力

    变量和数据类型 你的Javascript能力到达瓶颈?那是因为你还不会typescript.掌握TS,让你的开发更加准确简洁. 今天的学习中,我们接着从TS的数据类型和变量入手,感受它们的奇妙魔力. ...

  9. TCP/IP学习笔记9--以太网之基本概念1: 分类,连接方式

    时间是变化的财富.时钟模仿它,却只有变化而无财富. -- 泰戈尔 以太网(Ethernet)一词源于Ether(以太), 是介质的意思.在爱因斯坦哥们提出量子力学之前,人们普遍认为宇宙空间充满以太,并 ...

  10. 通过docker安装elasticsearch和安装ik分词器插件及安装kibana

    前提: 已经安装好docker运行环境: 步骤: 1.安装elasticsearch 6.2.2版本,目前最新版是7.2.0,这里之所以选择6.2.2是因为最新的SpringBoot2.1.6默认支持 ...