目前還是一個學(xué)生,項目不會做,只能寫一些學(xué)習(xí)筆記,沒有什么經(jīng)驗(可能一些自己判斷的有一定錯誤,內(nèi)容僅作為參考),
個人認(rèn)為一個健全的項目首先就需要一個bootloader,所以就淺淺記錄一下自己使用rtthread studio配置qboot和app工程的制作過程.
使用工具:rtthread studio
移植qboot工程過程
1.創(chuàng)建工程
1.1 創(chuàng)建qboot的項目工程1.2 淺跑一下試試2.開始配置spi的外部flash – w25q16 (這里使用spi1,可根據(jù)具體調(diào)整)
2.1 spi硬件連接2.2 在rtthread setting內(nèi)開啟spi2.3 在board.h內(nèi)開啟使用spi12.4 CubeMX setting內(nèi)配置spi2.5 CubeMX setting內(nèi)配置芯片時鐘2.6 添加掛載spi的代碼
//****************************************
//注意這里括號顯示就沒了 自己包含一下頭文件
//****************************************
//這里添加 rtthread.h
//加上 大于小于括號
#include
#include "drv_spi.h"
#include "spi_flash_sfud.h"
//掛載spi
int rt_hw_spi_flash_init(void)
{
__HAL_RCC_GPIOB_CLK_ENABLE(); //片選引腳為PB14
rt_hw_spi_device_attach("spi1", "spi10", GPIOB, GPIO_PIN_14); //片選引腳為PB14
if (RT_NULL == rt_sfud_flash_probe("w25q16", "spi10"))
{
return -RT_ERROR;
}
return RT_EOK;
}
INIT_DEVICE_EXPORT(rt_hw_spi_flash_init);
2.7 成功創(chuàng)建spi和w25q163.使用fal設(shè)置分區(qū)
3.1 添加軟件包3.2 board.h 里定義define BSP_USING_ON_CHIP_FLASH
3.3 配置Fal3.4 添加路徑 因為運(yùn)行提示找不到fal_cfg.h的路徑在此處運(yùn)行后,會發(fā)現(xiàn)如下錯誤:(在這個地方有較多的解決方法,但是有的方法在到后面在使用后續(xù)的ota升級的時候,會擦除到app區(qū)域,具體我也不懂…….)
3.5 出現(xiàn)錯誤解決方法:(將如下代碼 全部替換 到 drv_flash_f4.c 文件)
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
*/
#include "board.h"
#ifdef BSP_USING_ON_CHIP_FLASH
#include "drv_config.h"
#include "drv_flash.h"
#if defined(PKG_USING_FAL)
#include "fal.h"
#endif
//#define DRV_DEBUG
#define LOG_TAG "drv.flash"
#include
/* Base address of the Flash sectors Bank 1 */
#define ADDR_FLASH_SECTOR_0 ((uint32_t)0x08000000) /* Base @ of Sector 0, 16 Kbytes */
#define ADDR_FLASH_SECTOR_1 ((uint32_t)0x08004000) /* Base @ of Sector 1, 16 Kbytes */
#define ADDR_FLASH_SECTOR_2 ((uint32_t)0x08008000) /* Base @ of Sector 2, 16 Kbytes */
#define ADDR_FLASH_SECTOR_3 ((uint32_t)0x0800C000) /* Base @ of Sector 3, 16 Kbytes */
#define ADDR_FLASH_SECTOR_4 ((uint32_t)0x08010000) /* Base @ of Sector 4, 64 Kbytes */
#define ADDR_FLASH_SECTOR_5 ((uint32_t)0x08020000) /* Base @ of Sector 5, 128 Kbytes */
#define ADDR_FLASH_SECTOR_6 ((uint32_t)0x08040000) /* Base @ of Sector 6, 128 Kbytes */
#define ADDR_FLASH_SECTOR_7 ((uint32_t)0x08060000) /* Base @ of Sector 7, 128 Kbytes */
#define ADDR_FLASH_SECTOR_8 ((uint32_t)0x08080000) /* Base @ of Sector 8, 128 Kbytes */
#define ADDR_FLASH_SECTOR_9 ((uint32_t)0x080A0000) /* Base @ of Sector 9, 128 Kbytes */
#define ADDR_FLASH_SECTOR_10 ((uint32_t)0x080C0000) /* Base @ of Sector 10, 128 Kbytes */
#define ADDR_FLASH_SECTOR_11 ((uint32_t)0x080E0000) /* Base @ of Sector 11, 128 Kbytes */
/* Base address of the Flash sectors Bank 2 */
#define ADDR_FLASH_SECTOR_12 ((uint32_t)0x08100000) /* Base @ of Sector 0, 16 Kbytes */
#define ADDR_FLASH_SECTOR_13 ((uint32_t)0x08104000) /* Base @ of Sector 1, 16 Kbytes */
#define ADDR_FLASH_SECTOR_14 ((uint32_t)0x08108000) /* Base @ of Sector 2, 16 Kbytes */
#define ADDR_FLASH_SECTOR_15 ((uint32_t)0x0810C000) /* Base @ of Sector 3, 16 Kbytes */
#define ADDR_FLASH_SECTOR_16 ((uint32_t)0x08110000) /* Base @ of Sector 4, 64 Kbytes */
#define ADDR_FLASH_SECTOR_17 ((uint32_t)0x08120000) /* Base @ of Sector 5, 128 Kbytes */
#define ADDR_FLASH_SECTOR_18 ((uint32_t)0x08140000) /* Base @ of Sector 6, 128 Kbytes */
#define ADDR_FLASH_SECTOR_19 ((uint32_t)0x08160000) /* Base @ of Sector 7, 128 Kbytes */
#define ADDR_FLASH_SECTOR_20 ((uint32_t)0x08180000) /* Base @ of Sector 8, 128 Kbytes */
#define ADDR_FLASH_SECTOR_21 ((uint32_t)0x081A0000) /* Base @ of Sector 9, 128 Kbytes */
#define ADDR_FLASH_SECTOR_22 ((uint32_t)0x081C0000) /* Base @ of Sector 10, 128 Kbytes */
#define ADDR_FLASH_SECTOR_23 ((uint32_t)0x081E0000) /* Base @ of Sector 11, 128 Kbytes */
/**
* @brief Gets the sector of a given address
* @param None
* @retval The sector of a given address
*/
static rt_uint32_t GetSector(rt_uint32_t Address)
{
rt_uint32_t sector = 0;
if((Address < ADDR_FLASH_SECTOR_1) && (Address >= ADDR_FLASH_SECTOR_0))
{
sector = FLASH_SECTOR_0;
}
else if((Address < ADDR_FLASH_SECTOR_2) && (Address >= ADDR_FLASH_SECTOR_1))
{
sector = FLASH_SECTOR_1;
}
else if((Address < ADDR_FLASH_SECTOR_3) && (Address >= ADDR_FLASH_SECTOR_2))
{
sector = FLASH_SECTOR_2;
}
else if((Address < ADDR_FLASH_SECTOR_4) && (Address >= ADDR_FLASH_SECTOR_3))
{
sector = FLASH_SECTOR_3;
}
else if((Address < ADDR_FLASH_SECTOR_5) && (Address >= ADDR_FLASH_SECTOR_4))
{
sector = FLASH_SECTOR_4;
}
else if((Address < ADDR_FLASH_SECTOR_6) && (Address >= ADDR_FLASH_SECTOR_5))
{
sector = FLASH_SECTOR_5;
}
else if((Address < ADDR_FLASH_SECTOR_7) && (Address >= ADDR_FLASH_SECTOR_6))
{
sector = FLASH_SECTOR_6;
}
else if((Address < ADDR_FLASH_SECTOR_8) && (Address >= ADDR_FLASH_SECTOR_7))
{
sector = FLASH_SECTOR_7;
}
#if defined(FLASH_SECTOR_8)
else if((Address < ADDR_FLASH_SECTOR_9) && (Address >= ADDR_FLASH_SECTOR_8))
{
sector = FLASH_SECTOR_8;
}
#endif
#if defined(FLASH_SECTOR_9)
else if((Address < ADDR_FLASH_SECTOR_10) && (Address >= ADDR_FLASH_SECTOR_9))
{
sector = FLASH_SECTOR_9;
}
#endif
#if defined(FLASH_SECTOR_10)
else if((Address < ADDR_FLASH_SECTOR_11) && (Address >= ADDR_FLASH_SECTOR_10))
{
sector = FLASH_SECTOR_10;
}
#endif
#if defined(FLASH_SECTOR_11)
else if((Address < ADDR_FLASH_SECTOR_12) && (Address >= ADDR_FLASH_SECTOR_11))
{
sector = FLASH_SECTOR_11;
}
#endif
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) || defined(STM32F469xx) || defined(STM32F479xx)
else if((Address < ADDR_FLASH_SECTOR_13) && (Address >= ADDR_FLASH_SECTOR_12))
{
sector = FLASH_SECTOR_12;
}
else if((Address < ADDR_FLASH_SECTOR_14) && (Address >= ADDR_FLASH_SECTOR_13))
{
sector = FLASH_SECTOR_13;
}
else if((Address < ADDR_FLASH_SECTOR_15) && (Address >= ADDR_FLASH_SECTOR_14))
{
sector = FLASH_SECTOR_14;
}
else if((Address < ADDR_FLASH_SECTOR_16) && (Address >= ADDR_FLASH_SECTOR_15))
{
sector = FLASH_SECTOR_15;
}
else if((Address < ADDR_FLASH_SECTOR_17) && (Address >= ADDR_FLASH_SECTOR_16))
{
sector = FLASH_SECTOR_16;
}
else if((Address < ADDR_FLASH_SECTOR_18) && (Address >= ADDR_FLASH_SECTOR_17))
{
sector = FLASH_SECTOR_17;
}
else if((Address < ADDR_FLASH_SECTOR_19) && (Address >= ADDR_FLASH_SECTOR_18))
{
sector = FLASH_SECTOR_18;
}
else if((Address < ADDR_FLASH_SECTOR_20) && (Address >= ADDR_FLASH_SECTOR_19))
{
sector = FLASH_SECTOR_19;
}
else if((Address < ADDR_FLASH_SECTOR_21) && (Address >= ADDR_FLASH_SECTOR_20))
{
sector = FLASH_SECTOR_20;
}
else if((Address < ADDR_FLASH_SECTOR_22) && (Address >= ADDR_FLASH_SECTOR_21))
{
sector = FLASH_SECTOR_21;
}
else if((Address < ADDR_FLASH_SECTOR_23) && (Address >= ADDR_FLASH_SECTOR_22))
{
sector = FLASH_SECTOR_22;
}
else /* (Address < FLASH_END_ADDR) && (Address >= ADDR_FLASH_SECTOR_23) */
{
sector = FLASH_SECTOR_23;
}
#endif
return sector;
}
/**
* Read data from flash.
* @note This operation's units is word.
*
* @param addr flash address
* @param buf buffer to store read data
* @param size read bytes size
*
* @return result
*/
int stm32_flash_read(rt_uint32_t addr, rt_uint8_t *buf, size_t size)
{
size_t i;
if ((addr + size) > STM32_FLASH_END_ADDRESS)
{
LOG_E("read outrange flash size! addr is (0x%p)", (void*)(addr + size));
return -1;
}
for (i = 0; i < size; i++, buf++, addr++)
{
*buf = *(rt_uint8_t *) addr;
}
return size;
}
/**
* Write data to flash.
* @note This operation's units is word.
* @note This operation must after erase. @see flash_erase.
*
* @param addr flash address
* @param buf the write data buffer
* @param size write bytes size
*
* @return result
*/
int stm32_flash_write(rt_uint32_t addr, const rt_uint8_t *buf, size_t size)
{
rt_err_t result = RT_EOK;
rt_uint32_t end_addr = addr + size;
if ((end_addr) > STM32_FLASH_END_ADDRESS)
{
LOG_E("write outrange flash size! addr is (0x%p)", (void*)(addr + size));
return -RT_EINVAL;
}
if (size < 1)
{
return -RT_EINVAL;
}
HAL_FLASH_Unlock();
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
for (size_t i = 0; i < size; i++, addr++, buf++)
{
/* write data to flash */
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, addr, (rt_uint64_t)(*buf)) == HAL_OK)
{
if (*(rt_uint8_t *)addr != *buf)
{
result = -RT_ERROR;
break;
}
}
else
{
result = -RT_ERROR;
break;
}
}
HAL_FLASH_Lock();
if (result != RT_EOK)
{
return result;
}
return size;
}
/**
* Erase data on flash.
* @note This operation is irreversible.
* @note This operation's units is different which on many chips.
*
* @param addr flash address
* @param size erase bytes size
*
* @return result
*/
int stm32_flash_erase(rt_uint32_t addr, size_t size)
{
rt_err_t result = RT_EOK;
rt_uint32_t FirstSector = 0, NbOfSectors = 0;
rt_uint32_t SECTORError = 0;
if ((addr + size) > STM32_FLASH_END_ADDRESS)
{
LOG_E("ERROR: erase outrange flash size! addr is (0x%p)\n", (void*)(addr + size));
return -RT_EINVAL;
}
/*Variable used for Erase procedure*/
FLASH_EraseInitTypeDef EraseInitStruct;
/* Unlock the Flash to enable the flash control register access */
HAL_FLASH_Unlock();
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
/* Get the 1st sector to erase */
FirstSector = GetSector(addr);
/* Get the number of sector to erase from 1st sector*/
NbOfSectors = GetSector(addr + size - 1) - FirstSector + 1;
/* Fill EraseInit structure*/
EraseInitStruct.TypeErase = FLASH_TYPEERASE_SECTORS;
EraseInitStruct.VoltageRange = FLASH_VOLTAGE_RANGE_3;
EraseInitStruct.Sector = FirstSector;
EraseInitStruct.NbSectors = NbOfSectors;
if (HAL_FLASHEx_Erase(&EraseInitStruct, (uint32_t *)&SECTORError) != HAL_OK)
{
result = -RT_ERROR;
goto __exit;
}
__exit:
HAL_FLASH_Lock();
if (result != RT_EOK)
{
return result;
}
LOG_D("erase done: addr (0x%p), size %d", (void*)addr, size);
return size;
}
#if defined(PKG_USING_FAL)
static int fal_flash_read(long offset, rt_uint8_t *buf, size_t size);
static int fal_flash_write(long offset, const rt_uint8_t *buf, size_t size);
static int fal_flash_erase(long offset, size_t size);
const struct fal_flash_dev stm32_onchip_flash = { "onchip_flash", STM32_FLASH_START_ADRESS, STM32_FLASH_SIZE, 0x800U, {NULL, fal_flash_read, fal_flash_write, fal_flash_erase} };
static int fal_flash_read(long offset, rt_uint8_t *buf, size_t size)
{
return stm32_flash_read(stm32_onchip_flash.addr + offset, buf, size);
}
static int fal_flash_write(long offset, const rt_uint8_t *buf, size_t size)
{
return stm32_flash_write(stm32_onchip_flash.addr + offset, buf, size);
}
static int fal_flash_erase(long offset, size_t size)
{
return stm32_flash_erase(stm32_onchip_flash.addr + offset, size);
}
#endif
#endif /* BSP_USING_ON_CHIP_FLASH */
再修改 fal_cfg.h 文件設(shè)置自己的分區(qū)設(shè)置(分區(qū)根據(jù)實際情況設(shè)置)
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
*/
#ifndef _FAL_CFG_H_
#define _FAL_CFG_H_
//****************************************
//注意這里括號顯示就沒了 自己包含一下頭文件
//****************************************
//加上 大于小于括號
#include rtconfig.h
#include board.h
#define NOR_FLASH_DEV_NAME "w25q16"
/* ===================== Flash device Configuration ========================= */
extern const struct fal_flash_dev stm32_onchip_flash;
/* ===================== Flash device Configuration ========================= */
extern struct fal_flash_dev nor_flash0;
/* flash device table */
#define FAL_FLASH_DEV_TABLE \
{ \
&stm32_onchip_flash, \
&nor_flash0, \
}
/* ====================== Partition Configuration ========================== */
#ifdef FAL_PART_HAS_TABLE_CFG
/* partition table */
#define FAL_PART_TABLE \
{ \
/* name dev 開始地址 大小 0 */ \
{FAL_PART_MAGIC_WORD, "qboot", "onchip_flash", 0, 128*1024, 0}, \
{FAL_PART_MAGIC_WORD, "app", "onchip_flash", 128*1024, 445*1024, 0}, \
{FAL_PART_MAGIC_WORD, "factory", "onchip_flash", (128+448)*1024, 445*1024, 0}, \
{FAL_PART_MAGIC_WORD, "filesystem", NOR_FLASH_DEV_NAME, 0, 1020*1024, 0}, \
{FAL_PART_MAGIC_WORD, "download", NOR_FLASH_DEV_NAME, 1024*1024, 510*1024, 0}, \
{FAL_PART_MAGIC_WORD, "easyflash", NOR_FLASH_DEV_NAME, (1024+512)*1024, 510*1024, 0}, \
}
#endif /* FAL_PART_HAS_TABLE_CFG */
#endif /* _FAL_CFG_H_ */
3.6 初始化工作
//****************************************
//注意這里括號顯示就沒了 自己包含一下頭文件
//****************************************
//這里添加 fal.h rtthread.h
//加上 大于小于括號
#include
#include
#include "drv_spi.h"
#include "spi_flash_sfud.h"
//注意fal的初始化要在外部flash初始化之后
int Init_FAL(void)
{
fal_init();
return 0;
}
INIT_DEVICE_EXPORT(Init_FAL);
3.7 可以看見分區(qū)已經(jīng)成功了4.開始添加qboot
4.1 添加qboot4.2 配置qboot 把沒用上的都關(guān)了4.3 qboot運(yùn)行成功(上面打印問題把main函數(shù)里面打印去掉就好了)移植app工程過程
1.創(chuàng)建工程在main中添加如下
#include "stm32f4xx_hal.h"
/*app partition begin address*/
//app分區(qū)的地址
#define RT_APP_PART_ADDR 0x08020000
static int ota_app_vtor_reconfig(void)
{
#define NVIC_VTOR_MASK 0x3FFFFF80
/* Set the Vector Table base location by user application firmware definition */
SCB->VTOR = RT_APP_PART_ADDR & NVIC_VTOR_MASK;
return 0;
}
INIT_BOARD_EXPORT(ota_app_vtor_reconfig);
int F4_clock_information(void)
{
LOG_I("System Clock information");
LOG_I("SYSCLK_Frequency = %d", HAL_RCC_GetSysClockFreq());
LOG_I("HCLK_Frequency = %d", HAL_RCC_GetHCLKFreq());
LOG_I("PCLK1_Frequency = %d", HAL_RCC_GetPCLK1Freq());
LOG_I("PCLK2_Frequency = %d", HAL_RCC_GetPCLK2Freq());
return RT_EOK;
}
INIT_DEVICE_EXPORT(F4_clock_information);
2.修改 \linkscripts\STM32F407ZG\link.lds 內(nèi)的起始地址
2.1 將0x08000000改為你的app分區(qū)的地址3.成功運(yùn)行結(jié)果
3.1 最基本的app已經(jīng)成功運(yùn)行附帶一個工程文件
https://github.com/Letian-stu/Stm32F407-rtos-qboot-app-prj
Stm32F4-spi-qboot-mini
- 對qboot的移植;
- 分區(qū)設(shè)置;
- 可以使用ymodem_ota;
Stm32F4-spi-usb-at
- 使用esp8266實現(xiàn)連接網(wǎng)絡(luò);
- http_ota;
- 使能usb-device對w25q16的filesystem讀寫;
聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。
舉報投訴
-
STM32
+關(guān)注
關(guān)注
2264文章
10854瀏覽量
354305 -
STM32F407
+關(guān)注
關(guān)注
15文章
187瀏覽量
29332 -
RTThread
+關(guān)注
關(guān)注
7文章
132瀏覽量
40776
發(fā)布評論請先 登錄
相關(guān)推薦
RTThread之操作系統(tǒng)移植
RTThread完整版學(xué)習(xí)(RCEA考試練習(xí))之操作系統(tǒng)移植(照貓畫虎版)RTThread的一大特色就是有豐富免費(fèi)的組件可以用,但是對于我這個初學(xué)者來說很難習(xí)慣它必須使用它的模板完成任
發(fā)表于 08-03 06:42
將ucosii移植到stm32F107的學(xué)習(xí)筆記
今天開始寫ucosii學(xué)習(xí)筆記,希望能堅持下去,能夠?qū)cosii移植到stm32F107。大家一起努力吧。
發(fā)表于 08-23 08:40
RTthread移植代碼自動生成方案
RTthread再學(xué)習(xí)記錄前言一、RTthread移植代碼自動生成方案二、使用CUBEMX在STM32F4上移植RTT1.官方提供的教程2.
發(fā)表于 02-11 06:29
將基于rtthread的項目移植到其他平臺的經(jīng)驗分享
和大家分享下將基于rtthread的項目移植到其他平臺的經(jīng)驗。背景最近做了一個物聯(lián)網(wǎng)項目移植。原先的項目使用的硬件平臺為stm32f401+sim800c(mcu + 2G modem),軟件平臺為
發(fā)表于 02-17 07:57
rtthread的學(xué)習(xí)筆記分享
1、rtthread定時器rtthread定時器的定時時間以時鐘一個節(jié)拍的時間為單位,創(chuàng)建并激活的定時器會以超時時間的大小排序,鏈接在rt_timer_list上,在每次硬件中斷執(zhí)行
發(fā)表于 03-15 14:07
華大單片機(jī)移植RTThread操作系統(tǒng)教程及代碼
1.華大單片機(jī)型號選擇2.RTThread源碼下載2.1 .資料說明2.3.源碼下載3.移植過程3.1.新建華大單片機(jī)最小系統(tǒng)工程模板,這里不展開3.2.在Keil MDK加入Rtthread
發(fā)表于 06-27 14:41
使用rtthread nano移植LED程序的步驟
最近做一些驗證實驗的時候想使用rtthread nano來做,這樣在內(nèi)存受限的MCU上也能使用。下面開始移植工作:STM32CubeMX生成工程使用ST官方的STM32CubeMX生成MDK工
發(fā)表于 07-11 10:56
【原創(chuàng)精選】RT-Thread征文精選技術(shù)文章合集
專欄作者 :Thomas的小火車簡介:和大家一起學(xué)習(xí)分享進(jìn)步。基于ESP32C3運(yùn)行RT-THREADNO9 專欄作者 :tian的個人專欄使用rtthread移植qboot
發(fā)表于 07-26 14:56
華大單片機(jī)移植RTThread操作系統(tǒng)
3.1.新建華大單片機(jī)最小系統(tǒng)工程模板,這里不展開3.2.在Keil MDK加入Rtthread代碼3.3添加rtthread源碼到工程中3.4 添加完成的樣子3.5
發(fā)表于 11-17 17:21
?53次下載
【STM32F767】使用RTThread和TouchGFX實現(xiàn)DIY數(shù)字儀表(一)——使用STM32CUBMX5.6移植touchGFX4.13
TouchGFX移植到RTThread系統(tǒng)3.使用RT-Thread Studio實現(xiàn)DIY數(shù)字儀表(三)——RTThread系統(tǒng)實現(xiàn)物聯(lián)網(wǎng)平臺4.使用RT-Thread Studio實現(xiàn)DIY...
發(fā)表于 12-05 16:06
?12次下載
rtthread套娃移植
和大家分享下將基于rtthread的項目移植到其他平臺的經(jīng)驗。背景最近做了一個物聯(lián)網(wǎng)項目移植。原先的項目使用的硬件平臺為stm32f401+sim800c(mcu + 2G modem),軟件平臺為
發(fā)表于 12-20 19:45
?13次下載
【rtthread學(xué)習(xí)筆記系列】第二篇:中斷
rtthread會在中斷的前期處理中切換棧指針到預(yù)先留出的中斷棧空間,等中斷退出時恢復(fù)用戶的棧指針。1.3 中斷低半部處理
發(fā)表于 01-25 17:53
?0次下載
RTThread完整版學(xué)習(xí)之操作系統(tǒng)移植
RTThread的一大特色就是有豐富免費(fèi)的組件可以用,但是對于我這個初學(xué)者來說很難習(xí)慣它必須使用它的模板完成任務(wù),而且在stm32也已經(jīng)放棄了對標(biāo)準(zhǔn)庫的支持,這讓我這個一直使用標(biāo)準(zhǔn)庫的菜鳥感到很是頭大。
評論