cmsis

Can weak symbol be resolved among libraries during linking?

佐手、 提交于 2019-12-24 04:35:52
问题 My scenario is about cross-compiling to a Arduino Due (ARM target), but I guess it's a generic C weak symbol problem. I want to break my firmware into 3 parts: 1. The hardware library (CMSIS, Middleware) -> libHardware.a 2. Realtime OS library -> libOS.a 3. Application code -> Output.elf linked to above. the referenced CMSIS implementation has declared the followings: void SysTick_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler"))); // ...and a few dozen IRQ handler hook skipped

On core_cm4.h why is there casting like ((uint32_t)(int32_t)IRQn)?

馋奶兔 提交于 2019-12-19 09:42:24
问题 In the following code from core_cm4.h why is there a double cast ((uint32_t)(int32_t)IRQn) ? For example in the following function: __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn) { NVIC->ISER[(((uint32_t)(int32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL)); } What is the purpose of this? 回答1: Since CM4 software implements negative interrupt sources for core, you have to cast value first to 32bit signed integer and later to unsigned 32bit to make proper right

stm32环境搭建

[亡魂溺海] 提交于 2019-12-17 22:13:42
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> MDK http://www.keil.com/arm/mdk.asp MDK-ARM(Microcontroller Development Kit) 是功能强大和常用的cortex-mx 开发环境。 其包含 µVision4 IDE,最新版本需要根据mcu的系列下载不同的pack包( http://www.keil.com/dd2/Pack/ )以支持特定设备,目前stm32库开发方式有两种,一种是最新的cube方式,另一种是传统的标准库方式,如果使用前者,不需要下载其它东西即可,如果需要stm的标准库开发方式,还需单独下载st官方的标准库。 因为标准库方式之前比较主流,参考资源较多,这里先学习标准库方式。 官方标准固件库 链接 Home 》Embedded Software 》MCUs Embedded Software 》STM32 Embedded Software 或 首页 》 软件 》 微控制器软件 》 STM32微控制器软件 在灰色的导航中选择 STM32 standard peripherals library,然后根据需要的型号进入对应页面,在页面最底部提供软件下载地址(需要输入邮箱) 如何使用标准库 解压下载的标准库压缩包,目录结构如下: ├── _htmresc ├──

CMSIS-RTOS's osMailFree() returns some address instead of osStatus-type value

怎甘沉沦 提交于 2019-12-10 22:48:35
问题 So I'm using CMSIS-RTOS mail-queue mechanics with Keil uVision 5.0.5 at STM32F427 microcontroller running at 180MHz . And every now and then releasing previously allocated mailbox element with osMailFree() resulted in some address being returned instead of osStatus -type value like osOK or osErrorValue or whatever is said in the docs. This address points to os_mailQ_p_##blahlbah element of a service structure allocated with osMailQDef . This also means it points right beyond the end of an

CMSIS的简介

≯℡__Kan透↙ 提交于 2019-12-10 12:48:08
起因:发布自己翻译用的 CMSIS_RTOS_Tutorial 后,陆续收到网友关于“CMSIS-RTOS是干么的?”之类的问题,再次统一回复。 众所周知,实时操作系统是嵌入式领域的基石。而可选的嵌入式操作系统有很多,如FREE-RTOS、RTX、uc-os、vcWork、uLinux等。 CMSIS-RTOS是ARM公司为统一操作系统、降低嵌入式门槛而发布的操作系统标准软件接口。通俗讲,CMSIS-RTOS将操作系统(不管是FREE-RTOS还是RTX等)屏蔽起来,然后提供CMSIS-RTOS接口函数给最终使用者调用。如此以来,最终使用者只需要学习CMSIS-ROTS即可,从而降低学习门槛。(不过,目前只有FREE-RTOS和RTX能够支持CMSIS-RTOS)。 CMSIS-RTOS 是实时操作系统的通用 API。它提供了标准化的编程接口,它只是封装了RTX/embos,以后还可能封装freeRTOS(已经封装了~~~),uc/os(好像也已经封装了)等等第三方OS CMSIS RTOS是ARM现在热推的物联网操作系统mbedOS的基础,搞懂这个RTOS API,mbedOS更容易上手. 集成在keil中,没有所谓移植概念 。 ARM官方《CMSIS-RTOS教程》http://blog.csdn.net/ichamber/article/details/53116253

ADS1259程序

爷,独闯天下 提交于 2019-12-09 23:17:14
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> 2.1 ### uVision Project, (C) Keil Software SPI FLASH 0x4 ARM-ADS STM32F103RC STMicroelectronics IROM(0x08000000,0x40000) IRAM(0x20000000,0xC000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_512 -FS08000000 -FL080000 -FP0($$Device:STM32F103RC$Flash\STM32F10x_512.FLM)) 0 $$Device:STM32F103RC$Device\Include\stm32f10x.h $$Device:STM32F103RC$SVD\STM32F103xx.svd 0 0 0 0 0 0 1 ..\..\Output\ SPI_FLASH 1 0 1 1 1 ..\..\Listing\ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 3 1

On core_cm4.h why is there casting like ((uint32_t)(int32_t)IRQn)?

廉价感情. 提交于 2019-12-01 09:22:45
In the following code from core_cm4.h why is there a double cast ((uint32_t)(int32_t)IRQn) ? For example in the following function: __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn) { NVIC->ISER[(((uint32_t)(int32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL)); } What is the purpose of this? Since CM4 software implements negative interrupt sources for core, you have to cast value first to 32bit signed integer and later to unsigned 32bit to make proper right shift with padding zeros on the left side of number. CM4 uses -15 to -1 as CM4-Core sources and from 0 to