STM32-- keil 的option for target使用

keil版本号

1.device界面

如:stm32f103c8t6的工程,可以直接在device这里修改成stm32f103vct6,虽然引脚不一样,但是很多一样的地方,可以直接使用,有些不修改也可以下载程序。

2.target

xtal的设置不起作用了,平时也不用,不知道是不是keil版本的问题。

name of excutable,是生成hex、bin、axf文件的名字,这里能设置是否生成hex文件

4.listing界面

不选择文件夹,会默认和output一个文件夹。

c complier listing :*txt勾选会生成

stm32f1xx_hal.lst

stm32f1xx_hal.txt两种格式的文件

c  preprocess listing:*i勾选会生成

stm32f1xx_hal.i 格式文件

会给每个c文件都生成,因此没问题的情况下,是不勾选这两个选项,要不然,编译会很耗时间。

资料:

用Keil生成bin、汇编、C与汇编混合文件,再也不想debug了!

https://www.eet-china.com/mp/a41706.html

fromelf -c -o "$L@L.bin" "#L"  生成bin文件,和前面hex文件同名,同文件夹下面

fromelf -c -o "$L@L.txt" "#L"  生成txt格式的汇编文件,和hex文件同名,同文件夹下面;txt好打开,用的多些

fromelf -c -o "$L@L.asm" "#L"  生成asm格式的汇编文件,和hex文件同名,同文件夹下面

define这里可以使用宏定义定义时钟频率

### Keil 5 Target Configuration and Settings for Project Development For configuring a project within Keil 5, particularly focusing on the target setup which is crucial for developing embedded applications, several key aspects must be considered to ensure proper functionality and debugging capabilities. In the context of setting up targets in Keil 5, one begins by defining the device used in the application. This involves selecting the specific microcontroller from an extensive list provided by Keil or adding support for custom devices if necessary[^1]. Once the device has been chosen, further configurations can proceed under the 'Target' tab where options related to output files such as HEX, BIN formats may also be specified along with other settings like stack size allocation for different memory regions including FLASH and RAM areas[^3]. Another critical aspect lies within configuring debug interfaces through the menu option `Run` -> `Settings`. Here, users select appropriate hardware (such as CMSIS-DAP, J-LINK) or software-based simulators depending upon availability and preference. Properly configured connections between host PC and target board facilitate seamless downloading of compiled binaries (`TEST.elf`) directly into the target system's non-volatile storage medium during debugging sessions[^2]. Additionally, advanced features offered include customization possibilities regarding how code gets executed out of either internal flash memories versus external SRAM modules; these choices impact performance characteristics significantly based on use-case requirements. ```c // Example C Code Snippet Showing Basic Setup For An ARM Cortex-M Based Microcontroller In Keil uVision IDE. #include "stm32f4xx.h" int main(void){ // System Initialization Routine Goes Here while(1){ // Main Application Loop Starts Here } } ``` #### Important Considerations During Configuration: - **Device Selection:** Accurate selection ensures compatibility across all subsequent steps involved in building firmware images tailored specifically towards selected MCU architecture. - **Memory Layout Definition:** Appropriate partitioning among various types of available onboard resources guarantees efficient utilization without conflicts arising due to overlapping address spaces. - **Debug Interface Choice:** Selecting reliable communication channels enhances productivity throughout iterative coding-debugging cycles essential when working closely with low-level hardware components.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值